GenericTMPacket#

class stixcore.tmtc.packets.GenericTMPacket(data, idb=None, *, keep_parse_tree=True)[source]#

Bases: object

Generic TM packet all specific TM packets are subclasses of this class.

_registry#

Dictionary mapping classes (key) to function (value) which validates input.

Type:

dict

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)

get_calibration_params()

get_decompression_parameter()

List of parameter names that should be decompressed.

get_idb()

group_repeaters()

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(name)[source]#
get_calibration_params()[source]#
get_decompression_parameter()[source]#

List of parameter names that should be decompressed.

The corresponding decompressions setting parameters are also attached.

Returns:

dict or None – {‘NIX00472’: (“NIXD0007”, “NIXD0008”, “NIXD0009”), …}

get_idb()[source]#
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