object
ccsds_tc_services
Helpers for CCSDS telecommand segment extraction, insertion, and cross-frame TC service reassembly.
logtalk_load(ccsds_tc_services(loader))static, context_switching_callsPublic predicates
valid_segment/1
True if the argument is a valid CCSDS telecommand segment term.
staticvalid_segment(Segment)valid_segment(@compound) - zero_or_onesequence_flags/2
Extracts the telecommand segment sequence flags.
staticsequence_flags(Segment,SequenceFlags)sequence_flags(+compound,-atom) - onemap_id/2
Extracts the telecommand service-unit MAP identifier from either a telecommand segment term or a provenance-aware reassembled telecommand service-unit term.
staticmap_id(ServiceUnit,MapId)map_id(+compound,-integer) - onevalid_map_dispatch/1
True if the argument is a valid MAP-aware dispatch term grouping complete telecommand service units for a single MAP identifier.
staticvalid_map_dispatch(Dispatch)valid_map_dispatch(@compound) - zero_or_onedispatch_map_id/2
Extracts the MAP identifier from a MAP-aware dispatch term.
staticdispatch_map_id(Dispatch,MapId)dispatch_map_id(+compound,-integer) - onedispatch_service_units/2
Extracts the complete telecommand service units from a MAP-aware dispatch term.
staticdispatch_service_units(Dispatch,ServiceUnits)dispatch_service_units(+compound,-list(compound)) - onesegment_header_suffix/2
Extracts the mission-specific segment-header suffix bytes. Returns the empty list when the segment has no mission-specific suffix.
staticsegment_header_suffix(Segment,HeaderSuffix)segment_header_suffix(+compound,-list(byte)) - onevalid_reassembled_segment/1
True if the argument is a valid provenance-aware reassembled telecommand service-unit term.
staticvalid_reassembled_segment(ReassembledSegment)valid_reassembled_segment(@compound) - zero_or_onesegment_header_suffixes/2
Extracts the ordered list of per-frame mission-specific segment-header suffixes that contributed to a provenance-aware reassembled telecommand service-unit term.
staticsegment_header_suffixes(ReassembledSegment,HeaderSuffixes)segment_header_suffixes(+compound,-list(list(byte))) - onesegment_data/2
Extracts the telecommand segment data bytes.
staticsegment_data(Segment,Data)segment_data(+compound,-list(byte)) - onevalid_reassembly_state/1
True if the argument is a valid telecommand segment reassembly state term.
staticvalid_reassembly_state(State)valid_reassembly_state(@compound) - zero_or_oneinitial_reassembly_state/1
Returns the initial telecommand segment reassembly state.
staticinitial_reassembly_state(State)initial_reassembly_state(-compound) - onepending_fragments/2
Extracts the pending segmented telecommand data fragments keyed by spacecraft, virtual channel, and MAP 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_oneextract_tc_segment/2
Extracts a telecommand segment from a telecommand transfer frame using the representation tc_segment(SequenceFlags, MapId, HeaderSuffix, Data). When mission-specific segment headers use multiple octets, only the first octet is interpreted for the standard MAP and sequence semantics and the remaining octets are returned as HeaderSuffix.
staticextract_tc_segment(Frame,Segment)extract_tc_segment(+compound,-compound) - one_or_errorinsert_tc_segment/3
Updates a telecommand transfer frame from a telecommand segment term by encoding the standard MAP and sequence semantics in the first segment-header octet and preserving any remaining mission-specific segment-header octets.
staticinsert_tc_segment(Segment,Frame,UpdatedFrame)insert_tc_segment(+compound,+compound,-compound) - one_or_errorreassemble_tc_frame/4
Reassembles complete telecommand service units from a single telecommand transfer frame using the default throw discontinuity recovery policy.
staticreassemble_tc_frame(Frame,State,Segments,UpdatedState)reassemble_tc_frame(+compound,+compound,-list(compound),-compound) - one_or_errorreassemble_tc_frame/5
Reassembles complete telecommand service units from a single telecommand transfer frame using the selected discontinuity recovery policy.
staticreassemble_tc_frame(Frame,Policy,State,Segments,UpdatedState)reassemble_tc_frame(+compound,+atom,+compound,-list(compound),-compound) - one_or_errorreassemble_tc_frame/6
Reassembles complete telecommand service units from a single telecommand transfer frame using the selected discontinuity recovery policy and returns any recovery events.
staticreassemble_tc_frame(Frame,Policy,State,Segments,UpdatedState,Events)reassemble_tc_frame(+compound,+atom,+compound,-list(compound),-compound,-list(compound)) - one_or_errorreassemble_tc_frames/4
Reassembles complete telecommand service units across a sequence of telecommand transfer frames using the default throw discontinuity recovery policy.
staticreassemble_tc_frames(Frames,State,Segments,UpdatedState)reassemble_tc_frames(+list(compound),+compound,-list(compound),-compound) - one_or_errorreassemble_tc_frames/5
Reassembles complete telecommand service units across a sequence of telecommand transfer frames using the selected discontinuity recovery policy.
staticreassemble_tc_frames(Frames,Policy,State,Segments,UpdatedState)reassemble_tc_frames(+list(compound),+atom,+compound,-list(compound),-compound) - one_or_errorreassemble_tc_frames/6
Reassembles complete telecommand service units across a sequence of telecommand transfer frames using the selected discontinuity recovery policy and returns any recovery events in frame order.
staticreassemble_tc_frames(Frames,Policy,State,Segments,UpdatedState,Events)reassemble_tc_frames(+list(compound),+atom,+compound,-list(compound),-compound,-list(compound)) - one_or_errorreassemble_tc_frame_with_provenance/5
Reassembles complete telecommand service units from a single telecommand transfer frame using the default throw discontinuity recovery policy and returns provenance-aware reassembled service-unit terms.
staticreassemble_tc_frame_with_provenance(Frame,State,ReassembledSegments,UpdatedState,Events)reassemble_tc_frame_with_provenance(+compound,+compound,-list(compound),-compound,-list(compound)) - one_or_errorreassemble_tc_frame_with_provenance/6
Reassembles complete telecommand service units from a single telecommand transfer frame using the selected discontinuity recovery policy and returns provenance-aware reassembled service-unit terms plus any recovery events.
staticreassemble_tc_frame_with_provenance(Frame,Policy,State,ReassembledSegments,UpdatedState,Events)reassemble_tc_frame_with_provenance(+compound,+atom,+compound,-list(compound),-compound,-list(compound)) - one_or_errorreassemble_tc_frames_with_provenance/5
Reassembles complete telecommand service units across a sequence of telecommand transfer frames using the default throw discontinuity recovery policy and returns provenance-aware reassembled service-unit terms.
staticreassemble_tc_frames_with_provenance(Frames,State,ReassembledSegments,UpdatedState,Events)reassemble_tc_frames_with_provenance(+list(compound),+compound,-list(compound),-compound,-list(compound)) - one_or_errorreassemble_tc_frames_with_provenance/6
Reassembles complete telecommand service units across a sequence of telecommand transfer frames using the selected discontinuity recovery policy and returns provenance-aware reassembled service-unit terms plus any recovery events in frame order.
staticreassemble_tc_frames_with_provenance(Frames,Policy,State,ReassembledSegments,UpdatedState,Events)reassemble_tc_frames_with_provenance(+list(compound),+atom,+compound,-list(compound),-compound,-list(compound)) - one_or_errordispatch_service_units_by_map/2
Groups complete telecommand service-unit terms by MAP identifier, preserving the original service-unit order within each MAP bucket and the first-seen order of MAP buckets. Accepts both telecommand segment terms and provenance-aware reassembled telecommand service-unit terms.
staticdispatch_service_units_by_map(ServiceUnits,Dispatches)dispatch_service_units_by_map(+list(compound),-list(compound)) - one_or_errordispatch_service_units_by_map/3
Extracts the complete telecommand service units for a specific MAP identifier from a list of complete telecommand service-unit terms.
staticdispatch_service_units_by_map(ServiceUnits,MapId,DispatchedServiceUnits)dispatch_service_units_by_map(+list(compound),+integer,-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)