Module: OpenC3::PacketLogConstants

Included in:
PacketLogReader, PacketLogWriter
Defined in:
lib/openc3/logs/packet_log_constants.rb

Constant Summary collapse

COSMOS2_FILE_HEADER =

Constants to detect old file formats

'COSMOS2_'.freeze
COSMOS4_FILE_HEADER =
'COSMOS4_'.freeze
OPENC3_FILE_HEADER =

OPENC3 5 Constants

'COSMOS5_'.freeze
OPENC3_INDEX_HEADER =
'COSIDX5_'.freeze
OPENC3_HEADER_LENGTH =
OPENC3_FILE_HEADER.length
OPENC3_ENTRY_TYPE_MASK =

Flags which are bit masked into file entries

0xF000
OPENC3_TARGET_DECLARATION_ENTRY_TYPE_MASK =
0x1000
OPENC3_PACKET_DECLARATION_ENTRY_TYPE_MASK =
0x2000
OPENC3_RAW_PACKET_ENTRY_TYPE_MASK =
0x3000
OPENC3_JSON_PACKET_ENTRY_TYPE_MASK =
0x4000
OPENC3_OFFSET_MARKER_ENTRY_TYPE_MASK =
0x5000
OPENC3_KEY_MAP_ENTRY_TYPE_MASK =
0x6000
OPENC3_RECEIVED_TIME_FLAG_MASK =
0x0040
OPENC3_EXTRA_FLAG_MASK =
0x0080
OPENC3_CBOR_FLAG_MASK =
0x0100
OPENC3_ID_FLAG_MASK =
0x0200
OPENC3_STORED_FLAG_MASK =
0x0400
OPENC3_CMD_FLAG_MASK =
0x0800
OPENC3_ID_FIXED_SIZE =
32
OPENC3_MAX_PACKET_INDEX =
65535
OPENC3_MAX_TARGET_INDEX =
65535
OPENC3_PRIMARY_FIXED_SIZE =

2 bytes for flags - Size of length field is not included in length value

2
OPENC3_TARGET_DECLARATION_SECONDARY_FIXED_SIZE =

No additional data beyond ‘Nn’ (Length, Flags)

0
OPENC3_TARGET_DECLARATION_PACK_DIRECTIVE =
'Nn'.freeze
OPENC3_TARGET_DECLARATION_PACK_ITEMS =

Useful for testing

2
OPENC3_PACKET_DECLARATION_SECONDARY_FIXED_SIZE =
2
OPENC3_PACKET_DECLARATION_PACK_DIRECTIVE =
'Nnn'.freeze
OPENC3_PACKET_DECLARATION_PACK_ITEMS =

Useful for testing

3
OPENC3_OFFSET_MARKER_SECONDARY_FIXED_SIZE =
0
OPENC3_OFFSET_MARKER_PACK_DIRECTIVE =
'Nn'.freeze
OPENC3_OFFSET_MARKER_PACK_ITEMS =

Useful for testing

2
OPENC3_KEY_MAP_SECONDARY_FIXED_SIZE =
2
OPENC3_KEY_MAP_PACK_DIRECTIVE =
'Nnn'.freeze
OPENC3_KEY_MAP_PACK_ITEMS =

Useful for testing

3
OPENC3_PACKET_SECONDARY_FIXED_SIZE =
10
OPENC3_PACKET_PACK_DIRECTIVE =
'NnnQ>'.freeze
OPENC3_PACKET_PACK_ITEMS =

Useful for testing

4
OPENC3_RECEIVED_TIME_FIXED_SIZE =
8
OPENC3_RECEIVED_TIME_PACK_DIRECTIVE =
'Q>'.freeze
OPENC3_RECEIVED_TIME_PACK_ITEMS =

Useful for testing

1
OPENC3_EXTRA_LENGTH_FIXED_SIZE =
4
OPENC3_EXTRA_LENGTH_PACK_DIRECTIVE =
'N'.freeze
OPENC3_EXTRA_LENGTH_PACK_ITEMS =

Useful for testing

1