SXXXXXXX_PyMsc/pymsc/lib1553/constants.py
2025-12-02 11:21:05 +01:00

27 lines
534 B
Python

"""
Constants definition for MIL-STD-1553 over UDP protocol.
"""
from enum import IntEnum
class Marker(IntEnum):
START_1553 = 0x1553
END_1553 = 0x5315
CTRL_BEGIN = 0x3C3C
CTRL_END = 0x3E3E
class OType(IntEnum):
BC = 0x4342 # 'CB' little endian ? -> BC
RT = 0x5452 # 'TR' -> RT
class Direction(IntEnum):
RECEIVE = 0
TRANSMIT = 1
class ErrorCode(IntEnum):
OK = 0
UNSUPPORTED_VERSION = 1
INVALID_SOURCE = 2
INVALID_LEN = 3
MISSED_MSG_MARKER = 4
MSG_ERR = 1
INCOMPLETE = 2