common
messageflux.iodevices.base.common
Message
this class is the basic unit that is read from, or sent to devices.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data |
Union[BinaryIO, bytes]
|
the bytes/stream containing the body of the message |
required |
headers |
Optional[MessageHeaders]
|
(optional) headers containing metadata about the message |
None
|
bytes
property
Returns:
| Type | Description |
|---|---|
|
the data of the message (reads the stream from current position to the end, than resets the position to the original value) |
stream
property
the stream for this message. notice that reading the stream, advances its position
MessageBundle
this class holds a message and device headers (to get from device, or send to device)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
message |
Message
|
The Message. |
required |
device_headers |
Optional[DeviceHeaders]
|
Additional Headers that may return data from device, or affect its operation. |
None
|