hardware_messages Module¶
This modue contains all the messages taht are received.
-
AYABInterface.communication.hardware_messages.read_message_type(file)[source]¶ Read the message type from a file.
-
class
AYABInterface.communication.hardware_messages.StateIndication(file, communication)[source]¶ Bases:
AYABInterface.communication.hardware_messages.FixedSizeMessageThis message shows the state of the controller.
See also
-
MESSAGE_ID= 132¶ The first byte that indicates this message
-
carriage¶ The carriage which is reported.
Return type: AYABInterface.communication.carriages.Carriage Returns: the carriage with information about its position
-
-
class
AYABInterface.communication.hardware_messages.LineRequest(file, communication)[source]¶ Bases:
AYABInterface.communication.hardware_messages.FixedSizeMessageThe controller requests a line.
See also
-
MESSAGE_ID= 130¶ The first byte that indicates this message
-
line_number¶ The line number that was requested.
-
-
class
AYABInterface.communication.hardware_messages.TestConfirmation(file, communication)[source]¶ Bases:
AYABInterface.communication.hardware_messages.SuccessConfirmationThis message is sent at/when
-
MESSAGE_ID= 196¶ The first byte that indicates this message
-
-
class
AYABInterface.communication.hardware_messages.InformationConfirmation(file, communication)[source]¶ Bases:
AYABInterface.communication.hardware_messages.FixedSizeMessageThis message is the answer in the initial handshake.
A
InformationRequestrequests this message from the controller to start the initial handshake.See also
-
MESSAGE_ID= 195¶ The first byte that indicates this message
-
api_version_is_supported()[source]¶ Whether the communication object supports this API version.
Return type: bool
-
firmware_version¶ The firmware version of the controller.
Return type: FirmwareVersion minor_version = int() mayor_version = int() assert message.firmware_version == (mayor_version, minor_version) assert message.firmware_version.major == mayor_version assert message.firmware_version.minor == minor_version
-
-
class
AYABInterface.communication.hardware_messages.Debug(file, communication)[source]¶ Bases:
AYABInterface.communication.hardware_messages.MessageThis message contains debug output from the controller.
See also
-
class
AYABInterface.communication.hardware_messages.StartConfirmation(file, communication)[source]¶ Bases:
AYABInterface.communication.hardware_messages.SuccessConfirmationThis marks the success or failure of a reqStart message.
See also
-
MESSAGE_ID= 193¶ The first byte that indicates this message
-
-
class
AYABInterface.communication.hardware_messages.SuccessConfirmation(file, communication)[source]¶ Bases:
AYABInterface.communication.hardware_messages.FixedSizeMessageBase class for massages of success and failure.
-
class
AYABInterface.communication.hardware_messages.UnknownMessage(file, communication)[source]¶ Bases:
AYABInterface.communication.hardware_messages.FixedSizeMessageThis is a special message for unknown message types.
-
class
AYABInterface.communication.hardware_messages.Message(file, communication)[source]¶ Bases:
objectThis is the base class for messages that are received.
-
__weakref__¶ list of weak references to the object (if defined)
-
is_connection_closed()[source]¶ Whether this is a ConnectionClosed message.
Return type: bool Returns: False
-
is_from_controller()[source]¶ Whether this message is sent by the controller.
Return type: bool Returns: True
-
is_information_confirmation()[source]¶ Whether this is a InformationConfirmation message.
Return type: bool Returns: False
-
is_start_confirmation()[source]¶ Whether this is a StartConfirmation message.
Return type: bool Returns: False
-
is_state_indication()[source]¶ Whether this is a StateIndication message.
Return type: bool Returns: False
-
-
class
AYABInterface.communication.hardware_messages.ConnectionClosed(file, communication)[source]¶ Bases:
AYABInterface.communication.hardware_messages.MessageThis message is notified about when the connection is closed.
-
class
AYABInterface.communication.hardware_messages.FirmwareVersion(major, minor)¶ Bases:
tuple-
__getnewargs__()¶ Return self as a plain tuple. Used by copy and pickle.
-
__getstate__()¶ Exclude the OrderedDict from pickling
-
static
__new__(_cls, major, minor)¶ Create new instance of FirmwareVersion(major, minor)
-
__repr__()¶ Return a nicely formatted representation string
-
major¶ Alias for field number 0
-
minor¶ Alias for field number 1
-
-
class
AYABInterface.communication.hardware_messages.FixedSizeMessage(file, communication)[source]¶ Bases:
AYABInterface.communication.hardware_messages.MessageThis is a message of fixed size.