messages#
Message classes for explicit typing and the sanity of clear expectations
- class perceptivo.networking.messages.Message(message_number: Optional[int] = None, timestamp: Optional[datetime.datetime] = None, key: str = '', **kwargs)#
Bases:
perceptivo.root.Perceptivo_Object
Message container implementing msgpack-based numpy array de/serialization.
Subclass this to make specific message types!
- Parameters
**kwargs (dict) – key/value pairs stored in
Message.value
- Attrs:
value (dict): (deserialized) dictionary of values passed from **kwargs
- counter = count(0)#
- __init__(message_number: Optional[int] = None, timestamp: Optional[datetime.datetime] = None, key: str = '', **kwargs)#
- Parameters
**kwargs (dict) – key/value pairs stored in
Message.value
- Attrs:
value (dict): (deserialized) dictionary of values passed from **kwargs
- classmethod from_serialized(msg: bytes) perceptivo.networking.messages.Message #
Create an instance of Message from a msgpack serialized bytestring