TReK Python  5.3.3
Telemetry/Command API
RandomPacketCollection Class Reference

This class describes a parameter collection composed of one or more parameters. More...

Inherits PacketItem.

Public Member Functions

Initialize / Finalize

Functions handling class initialization and finalization.

def RandomPacketCollection ( Optional[RandomPacketCollection] random_collection=None -> def  -> def  -> def ) -> def 
 Class initializer. More...
 
def clone ( -> RandomPacketCollection  -> def  -> def ) -> def 
 Creates a new instance of the object with the same contents.
 
def copy (copy_from: object -> None  -> def  -> def ) -> def 
 Copies the contents of the provided 'copy_from' RandomPacketCollection. More...
 
def initialize ( -> None  -> def  -> def ) -> def 
 Initializes the object. More...
 
def load_file (filename: str -> None  -> def  -> def ) -> def 
 Loads the RandomPacketCollection definition from the specified file. More...
 
def save_file (filename: str -> None  -> def  -> def ) -> def 
 Saves the RandomPacketCollection definition to the specified file. More...
 
Building and Extraction
def build (buffer: bytearray -> int  -> def  -> def ) -> def 
 Builds the parameter collection and places it in the specified buffer. More...
 
def extract (buffer: bytearray, input_length: int, start_bit: int -> int  -> def  -> def ) -> def 
 Extracts all of the parameters in the collection from the specified buffer. More...
 
def get_length_in_bits ( -> int  -> def  -> def ) -> def 
 Gets the length of the parameter collection in bits. More...
 
def get_length_in_bytes ( -> int  -> def  -> def ) -> def 
 Gets the length of the parameter collection in bytes. More...
 
def get_maximum_length_in_bits ( -> int  -> def  -> def ) -> def 
 Returns the maximum length of the RandomPacketCollection in bits. More...
 
def is_complete ( -> bool  -> def  -> def ) -> def 
 Determines if all parameters have a value. More...
 
def is_modifiable (top_level: bool=True -> bool  -> def  -> def ) -> def 
 Determines if any data is modifiable. More...
 
Packet Collection

Functions handling adding / removing packets.

def add_packet ( Packet packet -> None  -> def  -> def ) -> def 
 Adds the packet to the collection. More...
 
def remove_packet (pack_name: str -> None  -> def  -> def ) -> def 
 Removes the specified Packet from the collection. More...
 
def get_number_of_packets ( -> int  -> def  -> def ) -> def 
 Returns the number of packets currently in the collection. More...
 
def has_modifiable_data (data_zone_only: bool=True -> bool  -> def  -> def ) -> def 
 Determines if any of the parameters are modifiable. More...
 
def has_variable_length_data ( -> bool  -> def  -> def ) -> def 
 Determines if the random packet collection has any variable length data. More...
 
def remove_all_packets ( -> None  -> def  -> def ) -> def 
 Removes all packets and associated memory from the collection.
 
Parameters

Functions handling parameters.

def find_parameter (name: str -> Parameter  -> def  -> def ) -> def 
 Finds the specified parameter name in the collection. More...
 
def get_parameter_list (full_name: bool=True, mod_only: bool=False -> list[str]  -> def  -> def ) -> def 
 Returns a list of all parameters within a collection. More...
 
def get_sorted_parameter_list (full_name: bool=True, mod_only: bool=False -> list[str]  -> def  -> def ) -> def 
 Returns a sorted list of all parameters within a collection by their start location. More...
 
Parameters

Functions handling Parameters.

Packet

Functions handling Packets.

- Public Member Functions inherited from NamedItem
def __eq__ (named_item: object -> bool  -> def  -> def ) -> def 
 Equality operator "==". More...
 
def get_alias ( -> str  -> def  -> def ) -> def 
 Returns the alias of the item. More...
 
def get_name ( -> str  -> def  -> def ) -> def 
 Returns the name of the item. More...
 
def get_long_description ( -> str  -> def  -> def ) -> def 
 Returns the long description of the item. More...
 
def get_short_description ( -> str  -> def  -> def ) -> def 
 Returns the short description of the item. More...
 
def get_user_description ( -> str  -> def  -> def ) -> def 
 Returns the user description of the item. More...
 
def get_owner ( -> str  -> def  -> def ) -> def 
 Returns the owner of the item. More...
 
def set_name (name: str -> None  -> def  -> def ) -> def 
 Sets the name of the item. More...
 
def set_alias (alias: str -> None  -> def  -> def ) -> def 
 Sets the alias of the item. More...
 
def set_short_description (description: str -> None  -> def  -> def ) -> def 
 Sets the short description of the item. More...
 
def set_long_description (description: str -> None  -> def  -> def ) -> def 
 Sets the long description of the item. More...
 
def set_user_description (description: str -> None  -> def  -> def ) -> def 
 Sets the user description of the item. More...
 
def set_owner (owner: str -> None  -> def  -> def ) -> def 
 Sets the owner of the item. More...
 

Detailed Description

This class describes a parameter collection composed of one or more parameters.

The RandomPacketCollection class holds one or more parameters that can be built and placed in a packet based on the start location of each parameter.

Constructor & Destructor Documentation

◆ RandomPacketCollection()

(random_collection : Optional[RandomPacketCollection]