diff --git a/config/definitions.py b/config/definitions.py index ec917eb..f0ca38d 100644 --- a/config/definitions.py +++ b/config/definitions.py @@ -6,11 +6,18 @@ import enum +from spacepackets import PacketType +from spacepackets.ccsds import PacketId from spacepackets.util import UnsignedByteField PUS_APID = 0x65 CFDP_APID = 0x66 -SPACE_PACKET_IDS = (0x08 << 8 | PUS_APID, 0x08 << 8 | CFDP_APID,) +PUS_PACKET_ID = PacketId(PacketType.TM, True, PUS_APID) +CFDP_PACKET_ID = PacketId(PacketType.TM, False, CFDP_APID) +SPACE_PACKET_IDS = ( + PUS_PACKET_ID.raw(), + CFDP_PACKET_ID.raw(), +) CFDP_LOCAL_ENTITY_ID = UnsignedByteField(byte_len=2, val=1) CFDP_REMOTE_ENTITY_ID = UnsignedByteField(byte_len=2, val=CFDP_APID) diff --git a/tmtcc.py b/tmtcc.py index c13960d..5531c4c 100755 --- a/tmtcc.py +++ b/tmtcc.py @@ -436,6 +436,7 @@ def main(): try: while True: state = tmtc_backend.periodic_op(None) + tc_handler.cfdp_in_ccsds_wrapper.handler.fsm() if state.request == BackendRequest.TERMINATION_NO_ERROR: sys.exit(0) elif state.request == BackendRequest.DELAY_IDLE: