object
ccsds_packet_services
Helpers for CCSDS packet service packet-zone splitting and cross-frame TM/AOS packet reassembly.
logtalk_load(ccsds_packet_services(loader))static, context_switching_callsPublic predicates
valid_reassembly_state/1
True if the argument is a valid packet reassembly state term.
staticvalid_reassembly_state(State)valid_reassembly_state(@compound) - zero_or_oneinitial_reassembly_state/1
Returns the initial cross-frame packet reassembly state.
staticinitial_reassembly_state(State)initial_reassembly_state(-compound) - onepending_data/2
Extracts the currently buffered trailing packet fragment bytes from a packet reassembly state.
staticpending_data(State,Bytes)pending_data(+compound,-list(byte)) - onevalid_channel_reassembly_state/1
True if the argument is a valid frame-channel packet reassembly state term keyed by frame type, spacecraft identifier, and virtual channel identifier.
staticvalid_channel_reassembly_state(State)valid_channel_reassembly_state(@compound) - zero_or_oneinitial_channel_reassembly_state/1
Returns the initial frame-channel packet reassembly state.
staticinitial_channel_reassembly_state(State)initial_channel_reassembly_state(-compound) - onepending_fragments/2
Extracts the non-empty pending packet fragments buffered per frame type, spacecraft identifier, and virtual channel identifier.
staticpending_fragments(State,PendingFragments)pending_fragments(+compound,-list(compound)) - onevalid_discontinuity_policy/1
True if the argument is a valid discontinuity recovery policy atom. Valid values are throw, drop, and resynchronize.
staticvalid_discontinuity_policy(Policy)valid_discontinuity_policy(@atom) - zero_or_onevalid/1
True if the argument is a valid packet-zone term.
staticvalid(PacketZone)valid(@compound) - zero_or_oneprefix_data/2
Extracts the bytes that precede the first complete packet in a packet zone.
staticprefix_data(PacketZone,PrefixData)prefix_data(+compound,-list(byte)) - onepackets/2
Extracts the list of complete packets in a packet zone.
staticpackets(PacketZone,Packets)packets(+compound,-list(compound)) - onesuffix_data/2
Extracts the bytes that trail the last complete packet in a packet zone.
staticsuffix_data(PacketZone,SuffixData)suffix_data(+compound,-list(byte)) - onesplit_packet_zone/4
Splits a packet-zone byte sequence using the first header pointer and parses any complete packets starting at that offset. A pointer value of 2047 denotes that no packet starts in the zone.
staticsplit_packet_zone(Bytes,FirstHeaderPointer,SecondaryHeaderLength,PacketZone)split_packet_zone(+list(byte),+integer,+integer,-compound) - one_or_errorjoin_packet_zone/4
Encodes a packet-zone term back into bytes and returns the corresponding first header pointer. When the packet list is empty, the pointer is set to 2047.
staticjoin_packet_zone(PacketZone,SecondaryHeaderLength,Bytes,FirstHeaderPointer)join_packet_zone(+compound,+integer,-list(byte),-integer) - one_or_errorextract_tm_packets/3
Extracts a TM transfer frame packet zone as a packet-zone term using the frame first header pointer and the given packet secondary header length.
staticextract_tm_packets(Frame,SecondaryHeaderLength,PacketZone)extract_tm_packets(+compound,+integer,-compound) - one_or_errorinsert_tm_packets/4
Updates a TM transfer frame data field and first header pointer from a packet-zone term while preserving the remaining frame fields unchanged.
staticinsert_tm_packets(PacketZone,SecondaryHeaderLength,Frame,UpdatedFrame)insert_tm_packets(+compound,+integer,+compound,-compound) - one_or_errorsplit_aos_packet_zone/3
Splits an AOS M_PDU packet-service data field into a packet-zone term. The first two octets are interpreted as the M_PDU first header pointer field, where 2046 denotes idle data only and 2047 denotes that no packet starts in the packet zone.
staticsplit_aos_packet_zone(Bytes,SecondaryHeaderLength,PacketZone)split_aos_packet_zone(+list(byte),+integer,-compound) - one_or_errorjoin_aos_packet_zone/3
Encodes a packet-zone term as an AOS M_PDU packet-service data field, including the two-octet first header pointer field.
staticjoin_aos_packet_zone(PacketZone,SecondaryHeaderLength,Bytes)join_aos_packet_zone(+compound,+integer,-list(byte)) - one_or_errorreassemble_packet_zone/5
Reassembles complete packets from a packet-zone term and a prior packet reassembly state, returning any complete packets plus the updated trailing fragment state.
staticreassemble_packet_zone(PacketZone,SecondaryHeaderLength,State,Packets,UpdatedState)reassemble_packet_zone(+compound,+integer,+compound,-list(compound),-compound) - one_or_errorextract_aos_packets/3
Extracts an AOS transfer frame packet zone as a packet-zone term using the two-octet M_PDU header at the beginning of the frame data field.
staticextract_aos_packets(Frame,SecondaryHeaderLength,PacketZone)extract_aos_packets(+compound,+integer,-compound) - one_or_errorinsert_aos_packets/4
Updates an AOS transfer frame data field from a packet-zone term by regenerating the M_PDU first header pointer and packet-zone bytes while preserving the remaining frame fields unchanged.
staticinsert_aos_packets(PacketZone,SecondaryHeaderLength,Frame,UpdatedFrame)insert_aos_packets(+compound,+integer,+compound,-compound) - one_or_errorreassemble_tm_packets/5
Extracts the packet zone from a TM transfer frame, using the default throw discontinuity recovery policy, and returns the complete packets plus the updated channel reassembly state.
staticreassemble_tm_packets(Frame,SecondaryHeaderLength,State,Packets,UpdatedState)reassemble_tm_packets(+compound,+integer,+compound,-list(compound),-compound) - one_or_errorreassemble_tm_packets/6
Extracts the packet zone from a TM transfer frame, applies the selected discontinuity recovery policy when frame-count continuity is broken, and returns the complete packets plus the updated channel reassembly state.
staticreassemble_tm_packets(Frame,SecondaryHeaderLength,Policy,State,Packets,UpdatedState)reassemble_tm_packets(+compound,+integer,+atom,+compound,-list(compound),-compound) - one_or_errorreassemble_tm_packets/7
Extracts the packet zone from a TM transfer frame, applies the selected discontinuity recovery policy when frame-count continuity is broken, and returns the complete packets, updated channel reassembly state, and explicit recovery events.
staticreassemble_tm_packets(Frame,SecondaryHeaderLength,Policy,State,Packets,UpdatedState,Events)reassemble_tm_packets(+compound,+integer,+atom,+compound,-list(compound),-compound,-list(compound)) - one_or_errorreassemble_tm_frames/5
Reassembles complete packets across a sequence of TM transfer frames using the default throw discontinuity recovery policy.
staticreassemble_tm_frames(Frames,SecondaryHeaderLength,State,Packets,UpdatedState)reassemble_tm_frames(+list(compound),+integer,+compound,-list(compound),-compound) - one_or_errorreassemble_tm_frames/6
Reassembles complete packets across a sequence of TM transfer frames using the selected discontinuity recovery policy.
staticreassemble_tm_frames(Frames,SecondaryHeaderLength,Policy,State,Packets,UpdatedState)reassemble_tm_frames(+list(compound),+integer,+atom,+compound,-list(compound),-compound) - one_or_errorreassemble_tm_frames/7
Reassembles complete packets across a sequence of TM transfer frames using the selected discontinuity recovery policy and returns any recovery events in frame order.
staticreassemble_tm_frames(Frames,SecondaryHeaderLength,Policy,State,Packets,UpdatedState,Events)reassemble_tm_frames(+list(compound),+integer,+atom,+compound,-list(compound),-compound,-list(compound)) - one_or_errorreassemble_aos_packets/5
Extracts the packet zone from an AOS transfer frame, using the default throw discontinuity recovery policy, and returns the complete packets plus the updated channel reassembly state.
staticreassemble_aos_packets(Frame,SecondaryHeaderLength,State,Packets,UpdatedState)reassemble_aos_packets(+compound,+integer,+compound,-list(compound),-compound) - one_or_errorreassemble_aos_packets/6
Extracts the packet zone from an AOS transfer frame, applies the selected discontinuity recovery policy when frame-count continuity is broken, and returns the complete packets plus the updated channel reassembly state.
staticreassemble_aos_packets(Frame,SecondaryHeaderLength,Policy,State,Packets,UpdatedState)reassemble_aos_packets(+compound,+integer,+atom,+compound,-list(compound),-compound) - one_or_errorreassemble_aos_packets/7
Extracts the packet zone from an AOS transfer frame, applies the selected discontinuity recovery policy when frame-count continuity is broken, and returns the complete packets, updated channel reassembly state, and explicit recovery events.
staticreassemble_aos_packets(Frame,SecondaryHeaderLength,Policy,State,Packets,UpdatedState,Events)reassemble_aos_packets(+compound,+integer,+atom,+compound,-list(compound),-compound,-list(compound)) - one_or_errorreassemble_aos_frames/5
Reassembles complete packets across a sequence of AOS transfer frames using the default throw discontinuity recovery policy.
staticreassemble_aos_frames(Frames,SecondaryHeaderLength,State,Packets,UpdatedState)reassemble_aos_frames(+list(compound),+integer,+compound,-list(compound),-compound) - one_or_errorreassemble_aos_frames/6
Reassembles complete packets across a sequence of AOS transfer frames using the selected discontinuity recovery policy.
staticreassemble_aos_frames(Frames,SecondaryHeaderLength,Policy,State,Packets,UpdatedState)reassemble_aos_frames(+list(compound),+integer,+atom,+compound,-list(compound),-compound) - one_or_errorreassemble_aos_frames/7
Reassembles complete packets across a sequence of AOS transfer frames using the selected discontinuity recovery policy and returns any recovery events in frame order.
staticreassemble_aos_frames(Frames,SecondaryHeaderLength,Policy,State,Packets,UpdatedState,Events)reassemble_aos_frames(+list(compound),+integer,+atom,+compound,-list(compound),-compound,-list(compound)) - one_or_errorProtected predicates
(no local declarations; see entity ancestors if any)
Private predicates
(no local declarations; see entity ancestors if any)
Operators
(none)