Logo
Telescience Resource Kit
TReK Python  5.4.0 ART
ExpectedStateAlarm Class Reference

This class checks expected state violations. More...

Inherits NamedItem.

Public Member Functions

Initialize / Finalize

Functions handling class initialization and finalization.

def ExpectedStateAlarm ( Optional[ExpectedStateAlarm] expected_state_alarm=None, Optional[c_void_p] native_ptr=None, is_clone: bool=False -> def ) -> def 
 Class initializer. More...
 
def clone ( -> ExpectedStateAlarm ) -> def 
 Creates and returns an extact copy of the object.
 
def copy (copy_from: object -> None ) -> def 
 Copies the contents of the provided 'copy_from' ExpectedStateAlarm. More...
 
def load_file (filename: str -> None ) -> def 
 Loads the ExpectedStateAlarm definition from the specified file. More...
 
def save_file (filename: str -> None ) -> def 
 Saves the ExpectedStateAlarm definition to the specified file. More...
 
def initialize ( -> None ) -> def 
 Initializes the object. More...
 
Alarm State Management

Functions handling expected state.

def check (check_value: str, param_status: ParameterStatus -> None ) -> def 
 Checks the check_value for an expected state violation. More...
 
def get_expected_state ( -> str ) -> def 
 Gets the expected type for the alarm. More...
 
def set_expected_state (new_state: str -> None ) -> def 
 Sets the expected type for the alarm. More...
 
- Public Member Functions inherited from NamedItem
def remove_all_attributes ( -> None ) -> def 
 Removes all attributes.
 
def remove_attribute (name: str -> None ) -> def 
 Removes the attribute by name. More...
 
def __eq__ (named_item: object -> bool ) -> def 
 Equality operator "==". More...
 
def add_attribute (name: str, value: str -> None ) -> def 
 Adds an attribute to the item. More...
 
def get_alias ( -> str ) -> def 
 Returns the alias of the item. More...
 
def get_attribute (name: str -> str ) -> def 
 Get the value of the specified attribute. More...
 
def get_attribute_list ( -> list[str] ) -> def 
 Gets a list of the attribute names. More...
 
def get_name ( -> str ) -> def 
 Returns the name of the item. More...
 
def get_long_description ( -> str ) -> def 
 Returns the long description of the item. More...
 
def get_short_description ( -> str ) -> def 
 Returns the short description of the item. More...
 
def get_user_description ( -> str ) -> def 
 Returns the user description of the item. More...
 
def get_owner ( -> str ) -> def 
 Returns the owner of the item. More...
 
def get_path ( -> str ) -> def 
 Returns the path for the item. More...
 
def set_name (name: str -> None ) -> def 
 Sets the name of the item. More...
 
def set_alias (alias: str -> None ) -> def 
 Sets the alias of the item. More...
 
def set_short_description (description: str -> None ) -> def 
 Sets the short description of the item. More...
 
def set_long_description (description: str -> None ) -> def 
 Sets the long description of the item. More...
 
def set_user_description (description: str -> None ) -> def 
 Sets the user description of the item. More...
 
def set_owner (owner: str -> None ) -> def 
 Sets the owner of the item. More...
 
def set_path (path: str -> None ) -> def 
 Sets the path of the item. More...
 

Detailed Description

This class checks expected state violations.

If an expected state violation occurs, the parameter status is updated.

Constructor & Destructor Documentation

◆ ExpectedStateAlarm()

(expected_state_alarm : Optional[ExpectedStateAlarm]  
native_ptr : Optional[c_void_p]  
is_clone : bool  
) -> def

Class initializer.

Parameters
[in]expected_state_alarm(Optional) The ExpectedStateAlarm to copy construct from.
[in]native_ptr(Optional) Internal parameter, do not provide.
[in]is_clone(Optional) Internal parameter, do not provide.

Reimplemented from NamedItem.

Member Function Documentation

◆ check()

(check_value : str 
param_status : ParameterStatus 
) -> None

Checks the check_value for an expected state violation.

If a violation is detected, the parameter status is updated to reflect the violation. If no limit violations are found, the corresponding status is cleared.

Parameters
[in]check_valueThe value to check for violations.
[in,out]param_statusThe status instance to update.

◆ copy()

(copy_from : object ) -> None

Copies the contents of the provided 'copy_from' ExpectedStateAlarm.

Parameters
[in]copy_fromExpectedStateAlarm to copy from.
Exceptions
TypeErrorif 'copy_from' is not a ExpectedStateAlarm.

Reimplemented from NamedItem.

◆ get_expected_state()

() -> str

Gets the expected type for the alarm.

Returns
Expected state or "".

◆ initialize()

() -> None

Initializes the object.

Reimplemented from NamedItem.

◆ load_file()

(filename : str ) -> None

Loads the ExpectedStateAlarm definition from the specified file.

Reads an XML ExpectedStateAlarm.

Parameters
[in]filenameThe file from which to load the expected state alarm object.
Exceptions
TrekError32007 - TUA_XML_PARSER_ERROR,

1 - FAIL,

etc.

◆ save_file()

(filename : str ) -> None

Saves the ExpectedStateAlarm definition to the specified file.

Writes an XML ExpectedStateAlarm.

Parameters
[in]filenameThe file to save the expected state alarm object.
Exceptions
TrekError32007 - TUA_XML_PARSER_ERROR,

1 - FAIL,

etc.

◆ set_expected_state()

(new_state : str ) -> None

Sets the expected type for the alarm.

Parameters
[in]new_stateThe new state.