bec_lib.endpoints.MessageEndpoints#
- class MessageEndpoints[source]#
Bases:
object
Class for message endpoints.
Methods
Endpoint for account.
Endpoint for alarms.
Endpoint for available scans.
Endpoint for bluesky events.
Endpoint for available DAP plugins.
Endpoint for DAP configuration.
Endpoint for DAP request.
Endpoint for DAP response.
Endpoint for dataset number.
Endpoint for receiving an async device readback over Redis streams.
Endpoint for device config.
Endpoint for device config history.
Endpoint for device config request.
Endpoint for device config request response.
Endpoint for device config update.
Endpoint for device info.
Endpoint for device instructions.
Endpoint for device limits.
Endpoint for device monitoring.
Endpoint for device progress.
Endpoint for device readings.
Endpoint for device configuration readings.
Endpoint for device readbacks.
Endpoint for device request status.
Endpoint for device request status container.
Endpoint for device rpc.
Endpoint for device server config request.
Endpoint for the device stage status.
Endpoint for device status.
Endpoint for file content.
Endpoint for public file_event.
Endpoint for global variables.
Endpoint for GUI configuration.
Endpoint for GUI data.
Endpoint for GUI heartbeat.
Endpoint for GUI instruction response.
Endpoint for GUI instructions.
Endpoint for log.
Endpoint for logbook.
Endpoint for metrics.
Endpoint for observer.
Endpoint for pre scan macros.
Endpoint for processed data.
Endpoint for progress.
Endpoint for public file.
Endpoint for public scan baseline readings.
Endpoint for scan info.
Endpoint for public scan segments.
Endpoint for scan baseline readings.
Endpoint for scan number.
Endpoint for scan queue history.
Endpoint for scan queue inserts.
Endpoint for scan queue modification.
Endpoint for scan queue modification request.
Endpoint for scan queue request.
Endpoint for scan queue request response.
Endpoint for scan queue status.
Endpoint for scan segment.
Endpoint for scan status.
Endpoint for scibec.
Endpoint for service response.
Endpoint for service status.
- static account() EndpointInfo [source]#
Endpoint for account. This endpoint is used to publish the current account.
- Returns:
Endpoint for account.
- Return type:
- static alarm() EndpointInfo [source]#
Endpoint for alarms. This endpoint is used by the redis connector to publish alarms using a messages.AlarmMessage message.
- Returns:
Endpoint for alarms.
- Return type:
- static available_scans() EndpointInfo [source]#
Endpoint for available scans. This endpoint is used to publish the available scans using an AvailableResourceMessage.
- Returns:
Endpoint for available scans.
- Return type:
- static bluesky_events() str [source]#
Endpoint for bluesky events. This endpoint is used by the scan bundler to publish the bluesky events using a direct msgpack dump of the bluesky event.
- Returns:
Endpoint for bluesky events.
- Return type:
str
- static dap_available_plugins(plugin_id: str) EndpointInfo [source]#
Endpoint for available DAP plugins. This endpoint is used to publish the available DAP plugins using a messages.AvailableResourceMessage message.
- Parameters:
plugin_id (str) – Plugin ID.
- Returns:
Endpoint for available DAP plugins.
- Return type:
- static dap_config() EndpointInfo [source]#
Endpoint for DAP configuration. This endpoint is used to publish the DAP configuration using a messages.DAPConfigMessage message.
- Returns:
Endpoint for DAP configuration.
- Return type:
- static dap_request() EndpointInfo [source]#
Endpoint for DAP request. This endpoint is used to request a DAP using a messages.DAPRequestMessage message.
- Returns:
Endpoint for DAP request.
- Return type:
- static dap_response(RID: str) EndpointInfo [source]#
Endpoint for DAP response. This endpoint is used to publish the DAP response using a messages.DAPResponseMessage message.
- Parameters:
RID (str) – Request ID.
- Returns:
Endpoint for DAP response.
- Return type:
- static dataset_number() EndpointInfo [source]#
Endpoint for dataset number. This endpoint is used to publish the dataset number. The dataset number is incremented after each dataset and set in redis as an integer.
- Returns:
Endpoint for dataset number.
- Return type:
- static device_async_readback(scan_id: str, device: str) EndpointInfo [source]#
Endpoint for receiving an async device readback over Redis streams. This endpoint is used by the device server to publish async device readbacks using a messages.DeviceMessage. In addition tp scan metadata, the message metadata contains information on how to concatenate multiple readings. Further keyword arguments for GUI handling might be attached.
- Parameters:
scan_id (str) – unique scan identifier
device (str) – Device name, e.g. “mcs”.
- Returns:
Endpoint for device async readback of the specified device.
- Return type:
- static device_config() EndpointInfo [source]#
Endpoint for device config. This endpoint is used by the scihub connector to set the device config.
- Returns:
Endpoint for device config.
- Return type:
- static device_config_history() EndpointInfo [source]#
Endpoint for device config history. This endpoint is used to keep track of the device config history using a messages.AvailableResourceMessage message. The endpoint is connected to a redis list.
- Returns:
Endpoint for device config history.
- Return type:
- static device_config_request() EndpointInfo [source]#
Endpoint for device config request. This endpoint can be used to request a modification to the device config. The request is sent using a messages.DeviceConfigMessage message.
- Returns:
Endpoint for device config request.
- Return type:
- static device_config_request_response(RID: str) EndpointInfo [source]#
Endpoint for device config request response. This endpoint is used by the device server and scihub connector to inform about whether the device config request was accepted or rejected. The response is sent using a messages.RequestResponseMessage message.
- Parameters:
RID (str) – Request ID.
- Returns:
Endpoint for device config request response.
- Return type:
- static device_config_update() EndpointInfo [source]#
Endpoint for device config update. This endpoint is used by the scihub connector to inform about a change to the device config. The update is sent using a messages.DeviceConfigMessage message.
- Returns:
Endpoint for device config update.
- Return type:
- static device_info(device: str) EndpointInfo [source]#
Endpoint for device info. This endpoint is used by the device server to publish the device info using a messages.DeviceInfoMessage message.
- Parameters:
device (str) – Device name, e.g. “samx”.
- Returns:
Endpoint for device info of the specified device.
- Return type:
- static device_instructions() EndpointInfo [source]#
Endpoint for device instructions. This endpoint is used by the scan server to publish the device instructions using a messages.DeviceInstructionMessage message. The device instructions are used to instruct the device server to perform certain actions, e.g. to move a motor.
- Returns:
Endpoint for device instructions.
- Return type:
- static device_limits(device: str) EndpointInfo [source]#
Endpoint for device limits. This endpoint is used by the device server to publish the device limits using a messages.DeviceMessage message.
- Parameters:
device (str) – Device name, e.g. “samx”.
- Returns:
Endpoint for device limits of the specified device.
- Return type:
- static device_monitor(device: str) EndpointInfo [source]#
Endpoint for device monitoring. This endpoint is used to publish image or wavefrom data from a monitor. An example can be a 2D area dertector or a 1D waveform (XRF), for which we forward a subset from the data to the monitoring endpoing for visualization purposes. Details on shape and type of data need to be specified in dtype/dshape of the dev.<device>.describe() method.
- Parameters:
device (str) – Device name, e.g. “eiger”.
- Returns:
Endpoint for device monitoring.
- Return type:
- static device_progress(device: str) EndpointInfo [source]#
Endpoint for device progress. This endpoint is used by the device server to publish the device progress using a messages.ProgressMessage message.
- Parameters:
device (str) – Device name, e.g. “samx”.
- Returns:
Endpoint for device progress of the specified device.
- Return type:
- static device_read(device: str) EndpointInfo [source]#
Endpoint for device readings. This endpoint is used by the device server to publish the device readings using a messages.DeviceMessage message.
- Parameters:
device (str) – Device name, e.g. “samx”.
- Returns:
Endpoint for device readings of the specified device.
- Return type:
- static device_read_configuration(device: str) EndpointInfo [source]#
Endpoint for device configuration readings. This endpoint is used by the device server to publish the device configuration readings using a messages.DeviceMessage message.
- Parameters:
device (str) – Device name, e.g. “samx”.
- Returns:
Endpoint for device configuration readings of the specified device.
- Return type:
- static device_readback(device: str) EndpointInfo [source]#
Endpoint for device readbacks. This endpoint is used by the device server to publish the device readbacks using a messages.DeviceMessage message.
- Parameters:
device (str) – Device name, e.g. “samx”.
- Returns:
Endpoint for device readbacks of the specified device.
- Return type:
- static device_req_status(device: str) EndpointInfo [source]#
Endpoint for device request status. This endpoint is used by the device server to publish the device request status using a messages.DeviceReqStatusMessage message.
- Parameters:
device (str) – Device name, e.g. “samx”.
- Returns:
Endpoint for device request status of the specified device.
- Return type:
- static device_req_status_container(RID: str) EndpointInfo [source]#
Endpoint for device request status container. This endpoint is used by the device server to publish the device request status using a messages.DeviceReqStatusMessage message.
- Parameters:
RID (str) – Request ID.
- Returns:
Endpoint for device request status container.
- Return type:
- static device_rpc(rpc_id: str) EndpointInfo [source]#
Endpoint for device rpc. This endpoint is used by the device server to publish the result of a device rpc using a messages.DeviceRPCMessage message.
- Parameters:
rpc_id (str) – RPC ID.
- Returns:
Endpoint for device rpc.
- Return type:
- static device_server_config_request() EndpointInfo [source]#
Endpoint for device server config request. This endpoint can be used to request changes to config. Typically used by the scihub connector following a device config request and validate a new configuration with the device server. The request is sent using a messages.DeviceConfigMessage message.
- Returns:
Endpoint for device server config request.
- Return type:
- static device_staged(device: str) EndpointInfo [source]#
Endpoint for the device stage status. This endpoint is used by the device server to publish the device stage status using a messages.DeviceStatusMessage message. A device is staged when it is ready to be used in a scan. A DeviceStatus of 1 means that the device is staged, 0 means that the device is not staged.
- Parameters:
device (str) – Device name, e.g. “samx”.
- Returns:
Endpoint for the device stage status of the specified device.
- Return type:
- static device_status(device: str) EndpointInfo [source]#
Endpoint for device status. This endpoint is used by the device server to publish the device status using a messages.DeviceStatusMessage message.
- Parameters:
device (str) – Device name, e.g. “samx”.
- static file_content() EndpointInfo [source]#
Endpoint for file content. This endpoint is used by the file writer to publish the file content using a messages.FileContentMessage message.
- Returns:
Endpoint for file content.
- Return type:
- static file_event(name: str) EndpointInfo [source]#
Endpoint for public file_event. This endpoint is used by the file writer to publish the status of the file writing using a messages.FileMessage message.
- Parameters:
name (str) – File name.
- Returns:
Endpoint for public file events.
- Return type:
- static global_vars(var_name: str) EndpointInfo [source]#
Endpoint for global variables. This endpoint is used to publish global variables using a messages.VariableMessage message.
- Parameters:
var_name (str) – Variable name.
- Returns:
Endpoint for global variables.
- Return type:
- static gui_config(gui_id: str) EndpointInfo [source]#
Endpoint for GUI configuration. This endpoint is used to publish the GUI configuration using a messages.GUIConfigMessage message.
- Returns:
Endpoint for GUI configuration.
- Return type:
- static gui_data(gui_id: str) EndpointInfo [source]#
Endpoint for GUI data. This endpoint is used to publish the GUI data using a messages.GUIDataMessage message.
- Returns:
Endpoint for GUI data.
- Return type:
- static gui_heartbeat(gui_id: str) EndpointInfo [source]#
Endpoint for GUI heartbeat. This endpoint is used to publish the GUI heartbeat using a messages.StatusMessage message.
Returns: EndpointInfo: Endpoint for GUI heartbeat.
- static gui_instruction_response(RID: str) EndpointInfo [source]#
Endpoint for GUI instruction response. This endpoint is used to publish the GUI instruction response using a messages.RequestResponseMessage message.
- Returns:
Endpoint for GUI instruction response.
- Return type:
- static gui_instructions(gui_id: str) EndpointInfo [source]#
Endpoint for GUI instructions. This endpoint is used to publish the GUI instructions using a messages.GUIInstructionMessage message.
- Returns:
Endpoint for GUI instructions.
- Return type:
- static log() EndpointInfo [source]#
Endpoint for log. This endpoint is used by the redis connector to publish logs using a messages.LogMessage message.
- Returns:
Endpoint for log.
- Return type:
- static logbook() EndpointInfo [source]#
Endpoint for logbook. This endpoint is used to publish logbook info such as url, user and token using a direct msgpack dump of a dictionary.
- Returns:
Endpoint for logbook.
- Return type:
- static metrics(service_id: str) EndpointInfo [source]#
Endpoint for metrics. This endpoint is used by all BEC services to publish their performance metrics using a messages.ServiceMetricMessage message.
- Parameters:
service_id (str) – Service ID, typically a uuid4 string.
- Returns:
Endpoint for metrics.
- Return type:
- static observer() EndpointInfo [source]#
Endpoint for observer. This endpoint is used to keep track of observer states using a. messages.ObserverMessage message. This endpoint is currently not used.
- Returns:
Endpoint for observer.
- Return type:
- static pre_scan_macros() EndpointInfo [source]#
Endpoint for pre scan macros. This endpoint is used to keep track of the pre scan macros. The endpoint is connected to a redis list.
- Returns:
Endpoint for pre scan macros.
- Return type:
- static processed_data(process_id: str) EndpointInfo [source]#
Endpoint for processed data. This endpoint is used to publish new processed data streams using a messages.ProcessedDataMessage message.
- Parameters:
process_id (str) – Process ID, typically a uuid4 string.
- Returns:
Endpoint for processed data.
- Return type:
- static progress(var_name) EndpointInfo [source]#
Endpoint for progress. This endpoint is used to publish the current progress using a messages.ProgressMessage message.
- Parameters:
var_name (str) – Variable name.
- Returns:
Endpoint for progress.
- Return type:
- static public_file(scan_id: str, name: str) EndpointInfo [source]#
Endpoint for public file. This endpoint is used by the file writer to publish the status of the file writing using a messages.FileMessage message.
- Parameters:
scan_id (str) – Scan ID.
name (str) – File name.
- Returns:
Endpoint for public files.
- Return type:
- static public_scan_baseline(scan_id: str) EndpointInfo [source]#
Endpoint for public scan baseline readings. This endpoint is used by the scan bundler to publish the scan baseline readings using a messages.ScanBaselineMessage message. In contrast to the scan_baseline endpoint, this endpoint is specific to a scan and has a retention time of 30 minutes.
- Parameters:
scan_id (str) – Scan ID.
- Returns:
Endpoint for public scan baseline readings.
- Return type:
- static public_scan_info(scan_id: str) EndpointInfo [source]#
Endpoint for scan info. This endpoint is used by the scan worker to publish the scan info using a messages.ScanStatusMessage message. In contrast to the scan_info endpoint, this endpoint is specific to a scan and has a retentioni time of 30 minutes.
- Parameters:
scan_id (str) – Scan ID.
- Returns:
Endpoint for scan info.
- Return type:
- static public_scan_segment(scan_id: str, point_id: int) EndpointInfo [source]#
Endpoint for public scan segments. This endpoint is used by the scan bundler to publish the scan segment using a messages.ScanMessage message. In contrast to the scan_segment endpoint, this endpoint is specific to a scan and has a retention time of 30 minutes.
- Parameters:
scan_id (str) – Scan ID.
point_id (int) – Point ID to specify a single point in a scan.
- Returns:
Endpoint for public scan segments.
- Return type:
- static scan_baseline() EndpointInfo [source]#
Endpoint for scan baseline readings. This endpoint is used by the scan bundler to publish the scan baseline readings using a messages.ScanBaselineMessage message.
- Returns:
Endpoint for scan baseline readings.
- Return type:
- static scan_number() EndpointInfo [source]#
Endpoint for scan number. This endpoint is used to publish the scan number. The scan number is incremented after each scan and set in redis as an integer.
- Returns:
Endpoint for scan number.
- Return type:
- static scan_queue_history() EndpointInfo [source]#
Endpoint for scan queue history. This endpoint is used to keep track of the scan queue history using a messages.ScanQueueHistoryMessage message. The endpoint is connected to a redis list.
- Returns:
Endpoint for scan queue history.
- Return type:
- static scan_queue_insert() EndpointInfo [source]#
Endpoint for scan queue inserts. This endpoint is used to publish accepted scans using a messages.ScanQueueMessage message. The message will be picked up by the scan queue manager and inserted into the scan queue.
- Returns:
Endpoint for scan queue inserts.
- Return type:
- static scan_queue_modification() EndpointInfo [source]#
Endpoint for scan queue modification. This endpoint is used to publish accepted scan queue modifications using a messages.ScanQueueModificationMessage message.
- Returns:
Endpoint for scan queue modification.
- Return type:
- static scan_queue_modification_request() EndpointInfo [source]#
Endpoint for scan queue modification request. This endpoint is used to request a scan queue modification using a messages.ScanQueueModificationMessage message. If accepted, the modification is published using the scan_queue_modification endpoint.
- Returns:
Endpoint for scan queue modification request.
- Return type:
- static scan_queue_request() EndpointInfo [source]#
Endpoint for scan queue request. This endpoint is used to request the new scans. The request is sent using a messages.ScanQueueMessage message.
- Returns:
Endpoint for scan queue request.
- Return type:
- static scan_queue_request_response() EndpointInfo [source]#
Endpoint for scan queue request response. This endpoint is used to publish the information on whether the scan request was accepted or rejected. The response is sent using a messages.RequestResponseMessage message.
- Returns:
Endpoint for scan queue request response.
- Return type:
- static scan_queue_status() EndpointInfo [source]#
Endpoint for scan queue status. This endpoint is used to publish the scan queue status using a messages.ScanQueueStatusMessage message.
- Returns:
Endpoint for scan queue status.
- Return type:
- static scan_segment() EndpointInfo [source]#
Endpoint for scan segment. This endpoint is used by the scan bundler to publish the scan segment using a messages.ScanMessage message.
- Returns:
Endpoint for scan segment.
- Return type:
- static scan_status() EndpointInfo [source]#
Endpoint for scan status. This endpoint is used to publish the scan status using a messages.ScanStatusMessage message.
- Returns:
Endpoint for scan status.
- Return type:
- static scibec() EndpointInfo [source]#
Endpoint for scibec. This endpoint is used to publish scibec info such as url, user and token using a CredentialsMessage.
- Returns:
Endpoint for scibec.
- Return type:
- static service_response(RID: str) EndpointInfo [source]#
Endpoint for service response. This endpoint is used by all BEC services to publish the result of a service request using a messages.ServiceResponseMessage message.
- Parameters:
RID (str) – Request ID.
- Returns:
Endpoint for service response.
- Return type:
- static service_status(service_id: str) EndpointInfo [source]#
Endpoint for service status. This endpoint is used by all BEC services to publish their status using a messages.StatusMessage message. The status message also contains the service info such as user, host, etc.
- Parameters:
service_id (str) – Service ID, typically a uuid4 string.
- Returns:
Endpoint for service status.
- Return type: