ait.core.server.handlers.ccsds_packet_handler module¶
-
class
ait.core.server.handlers.ccsds_packet_handler.
CCSDSPacketHandler
(input_type=None, output_type=None, **kwargs)¶ Bases:
ait.core.server.handler.Handler
This CCSDS handler provides a way to accept multiple packet types on a single stream and have them be processed. This handler takes a string of raw binary data containing CCSDS packet data. It maps the APID of the packet to a packet name from the config, and then uses the packet name to get the UID from the default telemetry dictionary. The user data field is extracted from the raw binary data, and a tuple of the UID and user data field is returned.
-
__init__
(input_type=None, output_type=None, **kwargs)¶ - Params:
- input_type: (optional) Specifies expected input type, used to
- validate handler workflow. Defaults to None.
- output_type: (optional) Specifies expected output type, used to
- validate handler workflow. Defaults to None
- packet_types: (required) APID value (string) : packet name (string) pairs
- APID value can use ‘X’ to mask out a bit For example, ‘XXXXX1011XXX’ means only bits 6-9 represent the APID
- packet_secondary_header_length: (optional) Length of secondary header in octets.
- Defaults to 0.
- Raises:
- ValueError: If packet in config is not present in default tlm dict.
-
comp_apid
(server_apid)¶ - Params:
- server_apid: APID from server
- Returns:
- Matching config_apid if one is present in config None otherwise
-
handle
(input_data)¶ - Params:
- packet: CCSDS packet
- Returns:
- tuple of packet UID and packet data field
-