api.component.component_events
ComponentInformation Objects
@dataclasses.dataclass(frozen=True, kw_only=True)
class ComponentInformation()
Component information as an object.
ComponentInformationEvent Objects
@Message.define("event/component/information")
class ComponentInformationEvent(Event)
Contains information about a connected component; this is automatically sent whenever a connection is established (bilaterally).
Attributes:
comp_id- The component ID.comp_name- The component name.comp_version- The component version.api_protocol- The API protocol version.
component_information
def component_information() -> ComponentInformation
The component information bundled as an object.
Returns:
The component information stored in a ComponentInformation object.
build
@staticmethod
def build(message_builder: MessageBuilder,
*,
comp_id: UnitID,
comp_name: str,
comp_version: str,
chain: Message | None = None) -> EventComposer
Helper function to easily build this message.
ComponentProcessEvent Objects
@Message.define("event/component/process")
class ComponentProcessEvent(Event)
Sent periodically to the local channel to allow services to perform recurring tasks.
Attributes:
timestamp- The timestamp (in fractional seconds) of the event.
build
@staticmethod
def build(message_builder: MessageBuilder,
*,
chain: Message | None = None) -> EventComposer
Helper function to easily build this message.