TReK Python  5.3.2
Telemetry/Command API
Enumerator Class Reference

This class maps unsigned integer values to strings for enumeration. More...

Inherits BaseEnumerator.

Public Member Functions

Initialize / Finalize

Functions handling class initialization and finalization.

def Enumerator ( Optional[Enumerator] enumerator=None, Optional[c_void_p] native_ptr=None, is_clone: bool=False) -> None 
 Class initializer. More...
 
def __eq__ (enumerator: object) -> bool 
 Equality operator "==". More...
 
def clone () -> object 
 Creates a new instance of the object with the same contents. More...
 
def copy (copy_from: object) -> None 
 Copies the contents of the provided 'copy_from' Enumerator. More...
 
def initialize () -> None 
 Initializes the object. More...
 
def load_file (filename: str) -> None 
 Loads the Enumerator definition from the specified file. More...
 
def save_file (filename: str) -> None 
 Saves the Enumerator definition to the specified file. More...
 
Enumeration Values

Functions handling enumeration names and values.

def add_enum (int_value: int, str_value: str, end_value: int=0) -> None 
 Adds the string values as enumeration for the unsigned integer value. More...
 
def get_number_of_enumerations () -> int 
 Returns the current number of enumerations. More...
 
def get_enum_value (enum_name: str) -> int 
 Finds the corresponding unsigned integer value for the specified string. More...
 
def get_enum_name (enum_value: int) -> str 
 Finds the corresponding string value for the specified unsigned integer. More...
 
def get_enum_names () -> list[str] 
 Gets a list of the string enumerations. More...
 
def get_enum_values () -> list[int] 
 Gets a list of the integer values. More...
 
def get_enum_ranges () -> list[EnumeratorRangePoint
 Gets a list of the begin and end values for which enumerators exist. More...
 
def remove_enum_all () -> None 
 Remove all enumerations. More...
 
def remove_enum_name (enum_name: str) -> None 
 Removes the enumeration specifed by the string. More...
 
def remove_enum_value (enum_value: int) -> None 
 Removes the enumeration specifed by the integer. More...
 
Initialize / Finalize

Functions handling class initialization and finalization.

Enumeration Values

Functions handling enumeration names and values.

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

Detailed Description

This class maps unsigned integer values to strings for enumeration.

The unsigned integer values is limited to 32 bits.

Constructor & Destructor Documentation

◆ Enumerator()

Enumerator (enumerator : Optional[Enumerator]