Skip to content

component

borealis.component

Component()

Base component class.

Source code in borealis/component.py
14
15
def __init__(self):
    self._orchestrator = session_orchestrator

receive(message, **kwargs)

Receives and processes messages from the mediator.

Source code in borealis/component.py
22
23
def receive(self, message, **kwargs):
    """Receives and processes messages from the mediator."""

send(message, **kwargs)

Sends a message to the mediator.

Source code in borealis/component.py
17
18
19
20
def send(self, message, **kwargs):
    """Sends a message to the mediator."""
    LOGGER.debug('Sending message: %s', message)
    self._orchestrator.dispatch(sender=self, message=message, **kwargs)

ControllerComponent()

Bases: DeviceComponent

Base controller component class.

Source code in borealis/component.py
57
58
59
def __init__(self):
    super().__init__()
    self._orchestrator.add_controller_component(self)

get_position() abstractmethod

ABC method to get device position as MoverPositions object.

Source code in borealis/component.py
61
62
63
@abstractmethod
def get_position(self) -> MoverPositions:
    """ABC method to get device position as MoverPositions object."""

DataComponent()

Bases: Component

Base data component class.

Source code in borealis/component.py
29
30
31
def __init__(self):
    super().__init__()
    self._orchestrator.add_data_component(self)

DeviceComponent()

Bases: Component

Source code in borealis/component.py
14
15
def __init__(self):
    self._orchestrator = session_orchestrator

get_h5_data_schema() abstractmethod

Must return a H5DataSchemas object containing: - alias: str unique identifier for this component - attributes: dict - datasets: SchemaCollection

Source code in borealis/component.py
35
36
37
38
39
40
41
42
43
@abstractmethod
def get_h5_data_schema(self) -> H5DataSchemas:
    """
    Must return a H5DataSchemas object containing:
        - alias: str  unique identifier for this component
        - attributes: dict
        - datasets: SchemaCollection

    """

SensorComponent()

Bases: DeviceComponent

Base sensor component class.

Source code in borealis/component.py
49
50
51
def __init__(self):
    super().__init__()
    self._orchestrator.add_sensor_component(self)