"""MyrtIO protocol constants"""

META_HEADER_PADDING = 3
MIN_MESSAGE_LENGTH = META_HEADER_PADDING + 3
MAX_MESSAGE_LENGTH = 128
# Max payload length is MAX_MESSAGE_LENGTH - header - footer
MAX_PAYLOAD_LENGTH = MAX_MESSAGE_LENGTH - META_HEADER_PADDING - 1

FIRST_HEADER_CODE = 0xFE
SECOND_HEADER_CODE = 0xEF
TAIL_CODE = 0xAF
SUCCESS_CODE = 0xEE
ERROR_CODE = 0xFF
