Source code for mxcubecore.HardwareObjects.EMBL.EMBLExporterClient
#
# Project name: MXCuBE
# https://github.com/mxcube
#
# This file is part of MXCuBE software.
#
# MXCuBE is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# MXCuBE is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with MXCuBE. If not, see <http://www.gnu.org/licenses/>.
"""EMBLExporterClient"""
from mxcubecore.BaseHardwareObjects import HardwareObject
from mxcubecore.Command import Exporter
__credits__ = ["EMBL Hamburg"]
__license__ = "LGPLv3+"
__category__ = "General"
[docs]class EMBLExporterClient(HardwareObject):
"""EMBLExport client"""
def __init__(self, *args):
HardwareObject.__init__(self, *args)
self.exporter_client = None
[docs] def init(self):
for client in Exporter.exporter_clients:
self.exporter_client = Exporter.exporter_clients[client]
return
[docs] def get_client_info(self):
"""
Returns client info
:return:
"""
for exporter_client in Exporter.exporter_clients:
return exporter_client
[docs] def get_method_list(self):
"""
Returns list with available methods
:return: list
"""
method_list = []
for exporter_client in Exporter.exporter_clients:
client = Exporter.exporter_clients[exporter_client]
method_list.extend(client.get_method_list())
return method_list
[docs] def get_property_list(self):
"""
Returns list with properties
:return:
"""
property_list = []
for exporter_client in Exporter.exporter_clients:
client = Exporter.exporter_clients[exporter_client]
property_list.extend(client.get_propertyList())
return property_list
[docs] def read_property(self, property_name):
"""
Returns property value
:param property_name: str
:return:
"""
return self.exporter_client.readProperty(property_name)