Added endianness support

This commit is contained in:
2022-04-05 20:45:58 -06:00
parent 2697b4b848
commit e822d9ff13
2 changed files with 150 additions and 35 deletions
+8 -7
View File
@@ -7,34 +7,35 @@
[[formats]]
name = "ccsds"
bit_flip = true
[[formats.fields]]
name = "Version Number"
field_type = {type = "UInt", bit_width = 3}
field_type = {type = "UInt", bit_width = 3, endianness = "BigEndian"}
[[formats.fields]]
name = "Packet Type"
field_type = {type = "UInt", bit_width = 1}
field_type = {type = "UInt", bit_width = 1, endianness = "BigEndian"}
[[formats.fields]]
name = "Secondary Header Flag"
field_type = {type = "UInt", bit_width = 1}
field_type = {type = "UInt", bit_width = 1, endianness = "BigEndian"}
[[formats.fields]]
name = "APID"
field_type = {type = "UInt", bit_width = 11}
field_type = {type = "UInt", bit_width = 11, endianness = "BigEndian"}
[[formats.fields]]
name = "Sequency Flags"
field_type = {type = "UInt", bit_width = 2}
field_type = {type = "UInt", bit_width = 2, endianness = "BigEndian"}
[[formats.fields]]
name = "Packet Sequence Count"
field_type = {type = "UInt", bit_width = 14}
field_type = {type = "UInt", bit_width = 14, endianness = "BigEndian"}
[[formats.fields]]
name = "Data Length"
field_type = {type = "UInt", bit_width = 16}
field_type = {type = "UInt", bit_width = 16, endianness = "BigEndian"}
[[formats.fields]]
name = "Data"