TReK Python
5.3.2
Telemetry/Command API
|
This class describes a single parameter within a telemetry or command message including its value. More...
Inherits NamedItem.
Public Member Functions | |
Initialize / Finalize | |
Functions handling class initialization and finalization. | |
def | Parameter ( Optional[Parameter] parameter=None, Optional[c_void_p] native_ptr=None) -> None |
Class initializer. More... | |
def | clone () -> Parameter |
Creates a new instance of the object with the same contents. | |
def | copy (copy_from: object) -> None |
Copies the contents of the provided 'copy_from' Parameter into this Parameter. More... | |
def | initialize () -> None |
Initializes the Parameter. More... | |
def | load_file (filename: str) -> None |
Loads the Parameter definition from the specified file. More... | |
def | save_file (filename: str) -> None |
Saves the Parameter definition to the specified file. More... | |
def | get_element_name () -> str |
The name used for identifying this class in XML. More... | |
Building and Extraction | |
def | build (buffer: bytearray) -> int |
Builds the parameter and places it in the specified buffer. More... | |
def | extract (buffer: bytearray, input_length: int, start_bit: int) -> int |
Extracts the parameter from the specified buffer. More... | |
def | find_last_bit () -> int |
Find the last bit used when building the parameter. More... | |
def | get_auto_clear () -> bool |
Gets whether the auto clear behavior is enabled. More... | |
def | set_auto_clear (auto_clear: bool) -> None |
Sets the auto clear behavior of the parameter instance. More... | |
def | set_parent_packet ( packet) -> None |
Sets the parent of this parameter to allow look up of external dependencies. More... | |
def | get_start_bit () -> int |
Gets the start bit of the parameter. More... | |
def | set_start_bit (start_bit: int) -> None |
Sets the start location for the parameter as bits. More... | |
def | set_value ( Union[int, float, str, bytes] new_value, sample: int=1) -> None |
This "Virtual" function is assigned based on the type of the parameter. More... | |
def | validate () -> Tuple[bool, int, int, str] |
Validates the parameter. More... | |
Parameter Attributes | |
Functions handling parameter attributes and values. | |
def | allow_invalid_data () -> None |
Sets the Parameter to allow invalid combinations of input. More... | |
def | clear_external_num_samples () -> None |
Clears the external number of samples parameter. More... | |
def | clear_external_status () -> None |
Clears the external status parameter. More... | |
def | clear_value () -> None |
Removes the value for the parameter. More... | |
def | get_engineering_units () -> str |
Gets the engineering units of the parameter. More... | |
def | get_length () -> int |
Gets the length of the parameter. More... | |
def | get_value (sample: int=1) -> PassedType |
This "Virtual" function is assigned based on the type of the parameter. More... | |
def | get_value_status (sample: int=1) -> Tuple[PassedType, int, int] |
This "Virtual" function is assigned based on the type of the parameter. More... | |
def | get_value_as_string (sample: int=1) -> str |
Returns the value of the parameter as a string. More... | |
def | get_value_as_string_status (sample: int=1) -> Tuple[str, int, int] |
Returns the value of the parameter as a string. More... | |
def | get_value_into_trektime ( TrekTime time, sample: int=1) -> None |
Get the value of the parameter and places it into the provided TrekTime. More... | |
def | get_value_into_trektime_status ( TrekTime time, sample: int=1) -> Tuple[int, int] |
Get the value of the parameter and places it into the provided TrekTime. More... | |
def | get_byte_order () -> ParameterByteOrderType |
Gets the byte order for the parameter. More... | |
def | get_byte_order_as_string () -> str |
Returns the byte order for the parameter as a string. More... | |
def | get_data_format () -> ParameterDataFormat |
Returns the data format. More... | |
def | get_data_format_as_string () -> str |
Returns the data format (string). More... | |
def | get_data_type () -> ParameterDataType |
Gets the data type for the parameter. More... | |
def | get_data_type_as_string () -> str |
Returns the data type for the parameter as a string. More... | |
def | get_external_num_samples_parameter () -> str |
Gets the name of the external number of samples parameter. More... | |
def | get_external_status_parameter () -> str |
Gets the name of the external status parameter. More... | |
def | get_full_name () -> str |
Returns the full name for the parameter. | |
def | get_number_of_samples () -> int |
Gets the number of samples for the parameter. More... | |
def | get_number_of_syllables () -> int |
Gets the number of syllables for the parameter. More... | |
def | get_syllable_info (syll_num: int) -> SyllableInfo |
Gets the start bit and length for a syllable in a parameter. More... | |
def | has_value () -> bool |
Identifies if the parameter currently has a value. More... | |
def | is_modifiable () -> bool |
Identifies if the parameter can be modified. More... | |
def | is_valid () -> bool |
Checks to see if a parameter is valid. More... | |
def | is_variable_length () -> bool |
Identifies if the parameter can have variable length. More... | |
def | set_data_format ( ParameterDataFormat new_format) -> None |
Sets the data format for the printing the parameter to a string. More... | |
def | set_data_type ( ParameterDataType new_type, type_size: int, ParameterByteOrderType byte_order=ParameterByteOrderType.BIG_ENDIAN_BYTE_ORDER, var_len: bool=False) -> None |
Sets the data type, length, and byte order for the parameter. More... | |
def | set_engineering_units (new_units: str) -> None |
Sets the engineering units for the parameter. More... | |
def | set_external_num_samples_parameter (name: str) -> None |
Sets the name of the parameter to use as the number of samples available for the parameter. More... | |
def | set_external_status_parameter (name: str) -> None |
Sets the name of the parameter to use as the source status for the parameter. More... | |
def | set_full_name (new_name: str) -> None |
Sets the full name for the parameter. More... | |
def | set_modifiable_flag ( bool is_modifiable) -> None |
Sets the modifiable flag for the parameter. More... | |
def | set_number_of_samples (num_samples: int) -> None |
Sets the number of samples for the parameter. More... | |
def | set_number_of_syllables (num_syllables: int) -> None |
Sets the number of syllables for the parameter. More... | |
def | get_sample_offset () -> int |
Gets the sample offset for the parameter. More... | |
def | set_sample_offset (offset: int) -> None |
Sets the sample offset for the parameter. More... | |
def | set_value_from_string (new_value: str, ParameterDataFormat data_format, sample: int=1) -> None |
Sets the value of the parameter from a string by interpreting the format. More... | |
def | set_value_from_trektime ( TrekTime time, sample: int=1) -> None |
Sets the value of the parameter from a TrekTime. More... | |
def | set_syllable_info (syll_num: int, SyllableInfo syllable_info) -> None |
Sets the start bit and length for a syllable in a parameter. More... | |
Calibrators | |
Functions handling parameter calibrator. | |
def | clear_calibrator_switch_set () -> None |
Removes the calibrator switch set from the Parameter. | |
def | clear_default_calibrator () -> None |
Removes the default calibrator from the Parameter. | |
def | get_calibrator () -> Optional[Calibrator] |
Returns a copy of the calibrator. More... | |
def | get_calibrate_before_alarm_check () -> bool |
Identifies if the parameter value is calibrated prior to alarm checking the value. More... | |
def | get_calibrated_value (sample: int=1) -> float |
Gets the calibrated value of a parameter as a 64-bit floating point. More... | |
def | get_calibrated_value_status (sample: int=1) -> Tuple[float, int, int] |
Gets the calibrated value of a parameter as a 64-bit floating point. More... | |
def | get_calibrator_switch_set () -> Optional[CalibratorSwitchSet] |
Returns a copy of the calibrator switch set. More... | |
def | has_calibrator () -> bool |
Identifies if the parameter currently has calibration defined. | |
def | set_calibrate_before_alarm_check (alarm_flag: bool) -> None |
Sets a flag to indicate if alarm checks are performed prior to or after calibration. More... | |
def | set_default_calibrator ( Calibrator calibrator) -> None |
Sets the calibrator to be used for this parameter. More... | |
def | set_calibrator_switch_set ( CalibratorSwitchSet cal_switch_set) -> None |
Sets the calibrator switch set to be used for this parameter. More... | |
Dependency | |
Functions handling parameter Dependency. | |
def | add_dependency ( Dependency dependency) -> None |
Adds a dependency for the parameter. More... | |
def | clear_dependencies () -> None |
Removes all dependencies for a parameter. More... | |
def | get_dependency (num: int) -> Optional[Dependency] |
Gets the specified dependency for a parameter. More... | |
def | get_number_of_dependencies () -> int |
Gets the number of dependencies for a parameter. More... | |
Enumerator | |
Functions handling parameter Enumerators and Enumerator Switch Sets. | |
def | clear_enumerator () -> None |
Removes the enumerator from the Parameter. | |
def | clear_enumerator_switch_set () -> None |
Removes the enumerator switch set from the Parameter. | |
def | get_enumerated_value (sample: int=1) -> str |
Get the enumerated value for a parameter. More... | |
def | get_enumerated_value_status (sample: int=1) -> Tuple[str, int, int] |
Gets the enumerated value of a parameter and its associated status. More... | |
def | get_enumerator () -> Optional[BaseEnumerator] |
Returns a copy of the enumerator. More... | |
def | get_enumerator_switch_set () -> Optional[EnumeratorSwitchSet] |
Returns a copy of the enumerator switch set. More... | |
def | has_enumerator () -> bool |
Identifies if the parameter currently has an enumerator defined. More... | |
def | set_enumerator ( Enumerator enumerator) -> None |
Sets the enumerator to be used for this parameter. More... | |
def | set_enumerator_switch_set ( EnumeratorSwitchSet enum_set) -> None |
Sets the enumerator switch set to be used for this parameter. More... | |
def | set_range_enumerator ( RangeEnumerator enumerator) -> None |
Sets the range enumerator to be used for this parameter. More... | |
ExpectedStateAlarm | |
Functions handling parameter ExpectedStateAlarm and ExpectedStateAlarmSwitchSets. | |
def | clear_expected_state_alarm () -> None |
Removes expected state alarm from the Parameter. | |
def | clear_expected_state_alarm_switch_set () -> None |
Removes the enumerator switch set from the Parameter. | |
def | get_expected_state_alarm () -> Optional[ExpectedStateAlarm] |
Returns a copy of the expected state alarm. More... | |
def | get_expected_state_alarm_switch_set () -> Optional[ExpectedStateAlarmSwitchSet] |
Returns a copy of the expected state alarm switch set. More... | |
def | has_expected_state () -> bool |
Identifies if the parameter currently has an expected state defined. More... | |
def | set_expected_state_alarm ( ExpectedStateAlarm alarm) -> None |
Sets the expected state to be used for this parameter. More... | |
def | set_expected_state_alarm_switch_set ( ExpectedStateAlarmSwitchSet alarm_set) -> None |
Sets the expected state alarm switch set to be used for this parameter. More... | |
LimitAlarm | |
Functions handling parameter LimitAlarms. | |
def | clear_limits () -> None |
Removes limits from the Parameter. | |
def | clear_limit_alarm_switch_set () -> None |
Removes the limit alarm switchset from the Parameter. | |
def | get_limits () -> Optional[LimitAlarm] |
Returns a copy of the LimitAlarm. More... | |
def | get_limit_alarm_switch_set () -> Optional[LimitAlarmSwitchSet] |
Returns a copy of the limit alarm switch set. More... | |
def | has_limits () -> bool |
Identifies if the parameter currently has limits defined. More... | |
def | set_limit_alarm_switch_set ( LimitAlarmSwitchSet alarm_set) -> None |
Sets the limit alarm switch set to be used for this parameter. More... | |
def | set_limits ( LimitAlarm limitalarm) -> None |
Sets the limits to be used for this parameter. More... | |
Range | |
Functions handling range. | |
def | get_continue_on_range_error () -> bool |
Identifies if parameter processing will continue on a range error. More... | |
def | get_double_high_range () -> float |
Returns the high range value of a data type that is stored as a double (ST_DOUBLE). More... | |
def | get_double_low_range () -> float |
Returns the low range value of a data type that is stored as a double (ST_DOUBLE). More... | |
def | get_integer_high_range () -> int |
Returns the high range value of a data type that is stored as a signed integer (ST_SIGNED_64). More... | |
def | get_integer_low_range () -> int |
Returns the low range value of a data type that is stored as a signed integer (ST_SIGNED_64). More... | |
def | get_unsigned_high_range () -> int |
Returns the high range value of a data type that is stored as an unsigned integer (ST_UNSIGNED_64). More... | |
def | get_unsigned_low_range () -> int |
Returns the low range value of a data type that is stored as an unsigned integer (ST_UNSIGNED_64). More... | |
def | set_continue_on_range_error (continue_flag: bool=False) -> None |
Sets a flag to indicate if processing can continue if a range error is detected. More... | |
def | set_double_high_range (new_high: float) -> None |
Sets the high range value for a parameter that is stored as a floating point (ST_DOUBLE). More... | |
def | set_double_low_range (new_low: float) -> None |
Sets the low range value for a parameter that is stored as a floating point (ST_DOUBLE). More... | |
def | set_integer_high_range (new_high: int) -> None |
Sets the high range value for a parameter that is stored as a signed integer (ST_SIGNED_64). More... | |
def | set_integer_low_range (new_low: int) -> None |
Sets the low range value for a parameter that is stored as a signed integer (ST_SIGNED_64). More... | |
def | set_low_range_flag (new_value: bool) -> None |
Sets the low range flag for the parameter. More... | |
def | set_high_range_flag (new_value: bool) -> None |
Sets the high range flag for the parameter. More... | |
def | set_unsigned_high_range (new_high: int) -> None |
Sets the high range value for a parameter that is stored as an unsigned integer (ST_UNSIGNED_64). More... | |
def | set_unsigned_low_range (new_low: int) -> None |
Sets the low range value for a parameter that is stored as an unsigned integer (ST_UNSIGNED_64). More... | |
def | use_high_range () -> bool |
Identifies if a high range value is currently in use. More... | |
def | use_low_range () -> bool |
Identifies if a low range value is currently in use. More... | |
Get Value Functions | |
Support Methods Unless specifically necessary, use get_value() and get_value_status() instead. | |
def | get_value_bytes (sample: int=1) -> bytes |
Gets the value of a raw data parameter as bytes. More... | |
def | get_value_bytes_status (sample: int=1) -> Tuple[bytes, int, int] |
Gets the value of a raw data parameter as bytes. More... | |
def | get_value_time (sample: int=1) -> float |
Gets the value of time parameter as a float. More... | |
def | get_value_time_status (sample: int=1) -> Tuple[float, int, int] |
Gets the value of a parameter as a 64-bit floating point. More... | |
def | get_value_int32 (sample: int=1) -> int |
Gets the value of a parameter as a 32-bit signed integer. More... | |
def | get_value_int32_status (sample: int=1) -> Tuple[int, int, int] |
Gets the value of a parameter as a 32-bit signed integer and data status codes. More... | |
def | get_value_int64 (sample: int=1) -> int |
Gets the value of a parameter as a 64-bit signed integer. More... | |
def | get_value_int64_status (sample: int=1) -> Tuple[int, int, int] |
Gets the value of a parameter as a 64-bit signed integer and data status codes. More... | |
def | get_value_string (sample: int=1) -> str |
Gets the value of a parameter as a char array. More... | |
def | get_value_string_status (sample: int=1) -> Tuple[str, int, int] |
Gets the value of a parameter as a char array. More... | |
def | get_value_uint32 (sample: int=1) -> int |
Gets the value of a parameter as a 32-bit unsigned integer. More... | |
def | get_value_uint32_status (sample: int=1) -> Tuple[int, int, int] |
Gets the value of a parameter as a 32-bit unsigned integer and data status codes. More... | |
def | get_value_uint64 (sample: int=1) -> int |
Gets the value of a parameter as a 64-bit unsigned integer. More... | |
def | get_value_uint64_status (sample: int=1) -> Tuple[int, int, int] |
Gets the value of a parameter as a 64-bit unsigned integer and data status codes. More... | |
def | get_value_double (sample: int=1) -> float |
Gets the value of a parameter as a 64-bit floating point. More... | |
def | get_value_double_status (sample: int=1) -> Tuple[float, int, int] |
Gets the value of a parameter as a 64-bit floating point. More... | |
Set Value Functions | |
Unless specifically necessary, use set_value(). This virtual method points to the appropriate function for destination type. | |
def | set_value_int32 ( Union[int, float, str, bytes] new_value, sample: int=1) -> None |
Sets the value of the parameter with a 32-bit signed integer. More... | |
def | set_value_int64 ( Union[int, float, str, bytes] new_value, sample: int=1) -> None |
Sets the value of the parameter with a 64-bit signed integer. More... | |
def | set_value_uint32 ( Union[int, float, str, bytes] new_value, sample: int=1) -> None |
Sets the value of the parameter with a 32-bit unsigned integer. More... | |
def | set_value_uint64 ( PassedType new_value, sample: int=1) -> None |
Sets the value of the parameter with a 64-bit unsigned integer. More... | |
def | set_value_string ( PassedType new_value, sample: int=1) -> None |
Sets the value of the parameter with a NULL terminated string. More... | |
def | set_value_bytes ( PassedType new_value, sample: int=1) -> None |
Set the value of the parameter with a variable length raw bytes data. More... | |
def | set_value_time ( PassedType new_value, sample: int=1) -> None |
Sets the value of the parameter with a 64-bit floating point. More... | |
def | set_value_double ( PassedType new_value, sample: int=1) -> None |
Sets the value of the parameter with a 64-bit floating point. More... | |
def | set_value_undefined ( PassedType new_value, sample: int=1) -> None |
set_value method not defined for the requested data type. | |
![]() | |
def | __eq__ (named_item: object) -> bool |
Equality operator "==". More... | |
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... | |
This class describes a single parameter within a telemetry or command message including its value.
The parameter can have one or more samples. Most users will only use the Get/Set value methods along with Build and Extract.
Parameter | ( | parameter | : Optional[Parameter] |