TReK Python  5.3.3
Telemetry/Command API
SwitchSet Class Reference

This class is the abstraction for sets of information that can be switched by the value of a parameter. More...

Inherits NamedItem.

Inherited by CalibratorSwitchSet, EnumeratorSwitchSet, ExpectedStateAlarmSwitchSet, and LimitAlarmSwitchSet.

Public Member Functions

Initialize / Finalize

Functions handling class initialization and finalization.

def SwitchSet ( -> def  -> def  -> def ) -> def 
 Class initializer. More...
 
def copy (copy_from: object -> None  -> def  -> def ) -> def 
 Abstract method. More...
 
def initialize ( -> None  -> def  -> def ) -> def 
 Initializes the object. More...
 
SwitchSet Settings

Functions handling class settings

def set_default_set_name (name: str -> None  -> def  -> def ) -> def 
 Sets the default set name. More...
 
def get_default_set_name ( -> str  -> def  -> def ) -> def 
 Gets the default set name. More...
 
def set_switch_parameter_name (par_name: str -> None  -> def  -> def ) -> def 
 Sets the name of the parameter to use as a switch. More...
 
def get_switch_parameter_name ( -> str  -> def  -> def ) -> def 
 Gets the switch parameter name. More...
 
def set_switch_type ( SwitchType switch_type -> None  -> def  -> def ) -> def 
 Sets the type of switch to use. More...
 
def get_switch_type ( -> SwitchType  -> def  -> def ) -> def 
 Returns the current switch type. More...
 
def get_item_names ( -> list[str]  -> def  -> def ) -> def 
 Retrieves an array of the (e.g., calibrator) names from the set. More...
 
Enumeration Switch

Functions handling Enumeration Switches.

def add_enumeration_switch (enum_name: str, name: str -> None  -> def  -> def ) -> def 
 Adds an enumeration switch. More...
 
def get_enumeration_switches ( -> list[str]  -> def  -> def ) -> def 
 Gets the enumeration values for the switch. More...
 
def get_enumeration_info (enum_name: str -> str  -> def  -> def ) -> def 
 Gets the name for a switch based on its enumerated value. More...
 
def get_enumeration_info_length (enum_name: str -> int  -> def  -> def ) -> def 
 Gets the length for returned info of input parameter. More...
 
def delete_enumeration_switch (enum_name: str -> None  -> def  -> def ) -> def 
 Deletes the specified enumeration switch. More...
 
Range Switch

Functions handling Range Switches.

def add_range_switch (low: float, high: float, name: str -> None  -> def  -> def ) -> def 
 Adds a range switch. More...
 
def get_range_switches ( -> list[float]  -> def  -> def ) -> def 
 Gets the low value for each range switch.
 
def get_range_switch_info (low: float -> RangeSwitchInfo  -> def  -> def ) -> def 
 Gets the high value and name for a range switch based on its low value. More...
 
def get_range_switch_info_length (low: float -> int  -> def  -> def ) -> def 
 Gets the length for returned info of input parameter. More...
 
def delete_range_switch (low: float -> None  -> def  -> def ) -> def 
 Deletes the specified range switch. More...
 
Validation

Functions handling set validation.

def validate ( -> int  -> def  -> def ) -> def 
 Determines if it is safe to use the switched set. More...
 
def get_validation_errors ( -> str  -> def  -> def ) -> def 
 Gets a string of the last validation errors. More...
 
- 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 is the abstraction for sets of information that can be switched by the value of a parameter.

The switch parameter can be used to determine which set of information to use. Used for enumeration, calbiration, limits, and expected states. Two types of switching are supported: range switching and enumeration switching.

Constructor & Destructor Documentation

◆ SwitchSet()

() -> def

Class initializer.

Reimplemented from NamedItem.

Reimplemented in CalibratorSwitchSet, EnumeratorSwitchSet, ExpectedStateAlarmSwitchSet, and LimitAlarmSwitchSet.

Member Function Documentation

◆ add_enumeration_switch()

(enum_name : str