GenericTMPacket#
- class stixcore.tmtc.packets.GenericTMPacket(data, idb=None, *, keep_parse_tree=True)[source]#
Bases:
objectGeneric TM packet all specific TM packets are subclasses of this class.
- Parameters:
data (binary data or
stixcore.tmtc.packets.TMPacket) – Data to create TM packet from
Methods Summary
export([descr])Export the packet in dict object that can be used for JSON export.
get(name)List of parameter names that should be decompressed.
get_idb()Combine the flattened data array of nested repeaters into a nested list.
print(*[, descr, stream])Print the packet in a verbose and formatted way to the given stream or stdout.
Methods Documentation
- export(descr=False)[source]#
Export the packet in dict object that can be used for JSON export.
- Parameters:
descr (bool, optional) – should a description (from IDB) be added to each NIX parameter, by default False
- Returns:
dict – a dict object with all data
- get_decompression_parameter()[source]#
List of parameter names that should be decompressed.
The corresponding decompressions setting parameters are also attached.
- Returns:
dictor None – {‘NIX00472’: (“NIXD0007”, “NIXD0008”, “NIXD0009”), …}
- group_repeaters()[source]#
Combine the flattened data array of nested repeaters into a nested list.
Has to be overridden by individual TM packets with nested repeaters.
- print(*, descr=False, stream=None)[source]#
Print the packet in a verbose and formatted way to the given stream or stdout.
- Parameters:
descr (bool, optional) – should a description (from IDB) be added to the printout , by default False
stream (IO, optional) – the stream to print in, by default None then stdout