Skip to content

component

borealis.component

Component(session_orchestrator)

Base component class.

Source code in borealis/component.py
10
11
def __init__(self, session_orchestrator):
    self._orchestrator = session_orchestrator

receive(message, **kwargs) abstractmethod

Receives and processes messages from the mediator.

Source code in borealis/component.py
18
19
20
@abstractmethod
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
13
14
15
16
def send(self, message, **kwargs):
    """Sends a message to the mediator."""
    LOGGER.debug('Sending message: %s', message)
    self._orchestrator.notify(sender=self, message=message, **kwargs)

ControllerComponent(session_orchestrator)

Bases: Component

Base controller component class.

Source code in borealis/component.py
48
49
50
def __init__(self, session_orchestrator):
    super().__init__(session_orchestrator)
    self._orchestrator.add_controller_component(self)

receive(message, **kwargs)

Receives and processes messages from the mediator.

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

DataComponent(session_orchestrator)

Bases: Component

Base data component class.

Source code in borealis/component.py
37
38
39
def __init__(self, session_orchestrator):
    super().__init__(session_orchestrator)
    self._orchestrator.add_data_component(self)

receive(message, **kwargs)

Receives and processes messages from the mediator.

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

SensorComponent(session_orchestrator)

Bases: Component

Base sensor component class.

Source code in borealis/component.py
26
27
28
def __init__(self, session_orchestrator):
    super().__init__(session_orchestrator)
    self._orchestrator.add_sensor_component(self)

receive(message, **kwargs)

Receives and processes messages from the mediator.

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