mahos.msgs.common_msgs#

Common and base definitions for mahos messages.

Classes

class mahos.msgs.common_msgs.Message#

Base class for mahos messages.

serialize() bytes#

Serialize this message to bytes.

Default implementation uses pickle. Override this method (and deserialize()) to implement custom serialization.

classmethod deserialize(b: bytes)#

Deserialize given bytes b to reconstruct an instance if this class.

Default implementation uses pickle. Override this method (and serialize()) to implement custom serialization.

class mahos.msgs.common_msgs.Request#

Base class for Request to Node.

class mahos.msgs.common_msgs.Reply(success: bool, message='', ret=None)#

Generic reply message for requests.

Variables:
  • success – requests are successful or not.

  • message – message from server (usually error message).

  • ret – return value.

class mahos.msgs.common_msgs.State(value)#

Base class for Node State.

class mahos.msgs.common_msgs.Status#

Base class for Node Status.

class mahos.msgs.common_msgs.BinaryState(value)#

Generic Node State with binary states IDLE and ACTIVE.

class mahos.msgs.common_msgs.BinaryStatus(state: BinaryState)#

Status only with state: BinaryState.

class mahos.msgs.common_msgs.StateReq(state: State, params=None, label: str = '')#

Generic state change request.

class mahos.msgs.common_msgs.SaveDataReq(file_name: str, params=None, note: str = '')#

Generic Save Data Request

class mahos.msgs.common_msgs.LoadDataReq(file_name: str, to_buffer: bool = False)#

Generic Load Data Request

class mahos.msgs.common_msgs.ExportDataReq(file_name: str, data=None, params=None)#

Generic Export Data Request

class mahos.msgs.common_msgs.ShutdownReq#

Generic shutdown request