object
ccsds(SecondaryHeaderLength)
SecondaryHeaderLength- Length in bytes of the secondary header when present (0 for no secondary header parsing, or a positive integer).
CCSDS Space Packet parser following the CCSDS 133.0-B-2 standard. Parses binary packet data including optional secondary headers.
logtalk_load(ccsds(loader))static, context_switching_callsPublic predicates
parse/2
Parses CCSDS packet(s) from a source into a list of packet terms. The source can be file(File), stream(Stream), or bytes(Bytes).
staticparse(Source,Packets)parse(+compound,-list(compound)) - one_or_errorSource is a variable:instantiation_errorSource is neither a variable nor a valid source:domain_error(ccsds_source,Source)Source is a valid source but the data cannot be parsed as a CCSDS packet:domain_error(ccsds_byte_sequence,Bytes)generate/2
Generates CCSDS packet bytes to a sink from a list of packet terms. The sink can be file(File), stream(Stream), or bytes(Bytes). For file(File) and stream(Stream), writes to the binary file or stream. For bytes(Bytes), unifies Bytes with the generated byte list.
staticgenerate(Sink,Packets)generate(+compound,+list(compound)) - one_or_errorSink is a variable:instantiation_errorSink is neither a variable nor a valid sink:domain_error(ccsds_sink,Sink)Packets is a partial list or a list with an element Packet which is a variable:instantiation_errorPacket of the list Packets is neither a variable nor a valid CCSDS packet term:domain_error(ccsds_packet_term,Packet)generate/3
Generates a list of bytes from a CCSDS packet term with an open tail. Mainly used when generating arbitrary CCSDS packets.
staticgenerate(Packet,Bytes,Tail)generate(+compound,-list(byte),--variable) - one_or_errorPacket is a variable:instantiation_errorPacket is neither a variable nor a valid CCSDS packet term:domain_error(ccsds_packet_term,Packet)version/2
Extracts the version number from a packet (always 0 for CCSDS Space Packets).
staticversion(Packet,Version)version(+compound,-integer) - onetype/2
Extracts the packet type from a packet. Returns telemetry or telecommand.
statictype(Packet,Type)type(+compound,-atom) - onesecondary_header_flag/2
Extracts the secondary header flag. Returns absent or present.
staticsecondary_header_flag(Packet,Flag)secondary_header_flag(+compound,-atom) - oneapid/2
Extracts the Application Process Identifier (APID) from a packet.
staticapid(Packet,APID)apid(+compound,-integer) - onesequence_flags/2
Extracts the sequence flags. Returns continuation, first, last, or standalone.
staticsequence_flags(Packet,Flags)sequence_flags(+compound,-atom) - onesequence_count/2
Extracts the packet sequence count (0-16383).
staticsequence_count(Packet,Count)sequence_count(+compound,-integer) - onedata_length/2
Extracts the packet data length field value.
staticdata_length(Packet,Length)data_length(+compound,-integer) - oneuser_data/2
Extracts the user data field as a list of bytes.
staticuser_data(Packet,Data)user_data(+compound,-list(byte)) - onesecondary_header/2
Extracts the secondary header. Returns none if not present, or secondary_header(Bytes) with the raw bytes.
staticsecondary_header(Packet,SecondaryHeader)secondary_header(+compound,-compound) - onesecondary_header_time/2
Extracts time from a secondary header as cuc_time(Coarse, Fine) for CCSDS Unsegmented Time Code. Fails if no secondary header or time cannot be parsed.
staticsecondary_header_time(Packet,Time)secondary_header_time(+compound,-compound) - zero_or_oneProtected predicates
(no local declarations; see entity ancestors if any)
Private predicates
(no local declarations; see entity ancestors if any)
Operators
(none)