Module enrgdaq.cnc.handlers.res_status
Classes
class ResStatusHandler (cnc: SupervisorCNC)-
Expand source code
class ResStatusHandler(CNCMessageHandler): """ Handler for CNCMessageResStatus messages. """ def __init__(self, cnc: SupervisorCNC): """ Initialize the handler. :param cnc: The SupervisorCNC instance. """ super().__init__(cnc) def handle( self, sender_identity: bytes, msg: CNCMessageResStatus ) -> Optional[Tuple[CNCMessage, bool]]: """ Handles a status response. :param sender_identity: The ZMQ identity of the message sender. :param msg: The status response message. :return: None """ sender_id_str = sender_identity.decode("utf-8") self._logger.debug(f"Received status from {sender_id_str}: {msg.status}") return NoneHandler for CNCMessageResStatus messages.
Initialize the handler. :param cnc: The SupervisorCNC instance.
Ancestors
- CNCMessageHandler
- abc.ABC
Methods
def handle(self, sender_identity: bytes, msg: CNCMessageResStatus) ‑> Tuple[CNCMessage, bool] | None-
Expand source code
def handle( self, sender_identity: bytes, msg: CNCMessageResStatus ) -> Optional[Tuple[CNCMessage, bool]]: """ Handles a status response. :param sender_identity: The ZMQ identity of the message sender. :param msg: The status response message. :return: None """ sender_id_str = sender_identity.decode("utf-8") self._logger.debug(f"Received status from {sender_id_str}: {msg.status}") return NoneHandles a status response. :param sender_identity: The ZMQ identity of the message sender. :param msg: The status response message. :return: None