2021-10-09 10:57:34 -06:00
|
|
|
# Consultative Committee for Space Data Systems (CCSDS) Space Packet Defenition
|
|
|
|
# Primary Header + Raw Payload
|
|
|
|
# Ref: https://public.ccsds.org/Pubs/133x0b2e1.pdfa
|
|
|
|
#
|
|
|
|
# Example Packet:
|
2022-04-17 10:19:44 -06:00
|
|
|
# [0x12, 0x01, 0xc0, 0x00, 0x00, 0x05, 0x01, 0x02, 0x03, 0x04, 0x05]
|
|
|
|
#
|
|
|
|
# Output:
|
|
|
|
# Version Number: 0
|
|
|
|
# Packet Type: 1
|
|
|
|
# Secondary Header Flag: 0
|
|
|
|
# APID: 0x201
|
|
|
|
# Sequence Flags: 3
|
|
|
|
# Packet Sequence Count: 0
|
|
|
|
# Data Length: 5
|
|
|
|
# Data: [1, 2, 3, 4, 5]
|
2021-10-09 10:57:34 -06:00
|
|
|
|
2022-04-09 12:34:15 -06:00
|
|
|
# CCSDS packet w/ primary header + payload
|
2021-10-09 10:57:34 -06:00
|
|
|
[[formats]]
|
|
|
|
name = "ccsds"
|
2022-04-09 11:25:09 -06:00
|
|
|
bit_flip = false
|
2021-10-09 10:57:34 -06:00
|
|
|
|
|
|
|
[[formats.fields]]
|
|
|
|
name = "Version Number"
|
2022-04-05 20:45:58 -06:00
|
|
|
field_type = {type = "UInt", bit_width = 3, endianness = "BigEndian"}
|
2021-10-09 10:57:34 -06:00
|
|
|
|
|
|
|
[[formats.fields]]
|
|
|
|
name = "Packet Type"
|
2022-04-05 20:45:58 -06:00
|
|
|
field_type = {type = "UInt", bit_width = 1, endianness = "BigEndian"}
|
2021-10-09 10:57:34 -06:00
|
|
|
|
|
|
|
[[formats.fields]]
|
|
|
|
name = "Secondary Header Flag"
|
2022-04-05 20:45:58 -06:00
|
|
|
field_type = {type = "UInt", bit_width = 1, endianness = "BigEndian"}
|
2021-10-09 10:57:34 -06:00
|
|
|
|
|
|
|
[[formats.fields]]
|
|
|
|
name = "APID"
|
2022-04-09 13:33:55 -06:00
|
|
|
print_type = {print = "Base", base = 16}
|
2022-04-05 20:45:58 -06:00
|
|
|
field_type = {type = "UInt", bit_width = 11, endianness = "BigEndian"}
|
2021-10-09 10:57:34 -06:00
|
|
|
|
|
|
|
[[formats.fields]]
|
2022-04-09 11:25:09 -06:00
|
|
|
name = "Sequence Flags"
|
2022-04-05 20:45:58 -06:00
|
|
|
field_type = {type = "UInt", bit_width = 2, endianness = "BigEndian"}
|
2021-10-09 10:57:34 -06:00
|
|
|
|
|
|
|
[[formats.fields]]
|
|
|
|
name = "Packet Sequence Count"
|
2022-04-05 20:45:58 -06:00
|
|
|
field_type = {type = "UInt", bit_width = 14, endianness = "BigEndian"}
|
2021-10-09 10:57:34 -06:00
|
|
|
|
|
|
|
[[formats.fields]]
|
|
|
|
name = "Data Length"
|
2024-04-29 19:42:37 -06:00
|
|
|
field_type = {type = "UInt", bit_width = 16, endianness = "BigEndian"}
|