class documentation
Represents an Analog-to-Digital Converter (ADC) input status.
Class Method | unpack |
Unpacks a bytes sequence into an IOADC object. |
Method | pack |
Packs the IOADC object into a bytes sequence. |
Class Variable | address |
Undocumented |
Class Variable | value |
Undocumented |
Unpacks a bytes sequence into an IOADC object.
Parameters | |
data:bytes | The bytes to unpack, expected to be 3 bytes (1 uint8 + 1 uint16). |
Returns | |
IOADC | An IOADC object. |
Raises | |
struct.error | If the input bytes are not the expected size (3 bytes). |
Packs the IOADC object into a bytes sequence.
Packs the address (uint8) and value (uint16) into a byte string. Uses little-endian byte order.
Returns | |
bytes | A bytes object representing the packed data (1 + 2 = 3 bytes). |