cleave.core.network package¶
Submodules¶
cleave.core.network.backend module¶
- exception cleave.core.network.backend.BusyControllerException¶
Bases:
Exception
- class cleave.core.network.backend.BaseControllerService(controller: Controller, add_delay_s: float = 0.0)¶
Bases:
Recordable
,ABC
- class cleave.core.network.backend.UDPControllerService(controller: Controller, output_dir: Path, add_delay_s: float = 0.0)¶
Bases:
BaseControllerService
,DatagramProtocol
UDP implementation of a controller service. Receives sensor samples over UDP and pushes them to the controller for processing.
- startProtocol() None ¶
Called when a transport is connected to this protocol.
Will only be called once, even if multiple ports are connected.
- stopProtocol() None ¶
Executed during shutdown.
- datagramReceived(in_dgram: bytes, addr: Tuple[str, int])¶
Executed on each datagram received.
cleave.core.network.client module¶
- class cleave.core.network.client.RecordingUDPControlClient(controller_addr: Tuple[str, int], output_dir: Path)¶
Bases:
DatagramProtocol
,ABC
- startProtocol()¶
Called when a transport is connected to this protocol.
Will only be called once, even if multiple ports are connected.
- stopProtocol()¶
Called when the transport is disconnected.
Will only be called once, after all ports are disconnected.
- datagramReceived(datagram: bytes, addr: Tuple[str, int])¶
Called when a datagram is received.
@param datagram: the bytes received from the transport. @param addr: tuple of source of datagram.
cleave.core.network.protocol module¶
- class cleave.core.network.protocol.ControlMsgType(value)¶
Bases:
Enum
An enumeration.
- class cleave.core.network.protocol.ControlMessage(msg_type: 'ControlMsgType', seq: 'int', timestamp: 'float', payload: 'Any')¶
Bases:
ABC
- exception cleave.core.network.protocol.NoMessage¶
Bases:
Exception