Source code for frame_msg.tx_code

from dataclasses import dataclass

[docs] @dataclass class TxCode: """ A simple message containing only a message code and an optional byte value. Used for signaling the frameside app to take some action. """ value: int = 0
[docs] def pack(self) -> bytes: """Pack the message into a single byte.""" return bytes([self.value & 0xFF])