|
Telescience Resource Kit
TReK Python
5.4.0 ART
|
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 ) -> def |
Class initializer. More... | |
def | clone ( -> Parameter ) -> def |
Creates a new instance of the object with the same contents. | |
def | copy (copy_from: object -> None ) -> def |
Copies the contents of the provided 'copy_from' Parameter into this Parameter. More... | |
def | initialize ( -> None ) -> def |
Initializes the Parameter. More... | |
def | load_file (filename: str -> None ) -> def |
Loads the Parameter definition from the specified file. More... | |
def | save_file (filename: str -> None ) -> def |
Saves the Parameter definition to the specified file. More... | |
def | get_element_name ( -> str ) -> def |
The name used for identifying this class in XML. More... | |
Building and Extraction | |
def | build (buffer: bytearray -> int ) -> def |
Builds the parameter and places it in the specified buffer. More... | |
def | extract (buffer: bytearray, input_length: int, start_bit: int -> int ) -> def |
Extracts the parameter from the specified buffer. More... | |
def | find_last_bit ( -> int ) -> def |
Find the last bit used when building the parameter. More... | |
def | get_auto_clear ( -> bool ) -> def |
Gets whether the auto clear behavior is enabled. More... | |
def | set_auto_clear (auto_clear: bool -> None ) -> def |
Sets the auto clear behavior of the parameter instance. More... | |
def | set_parent_packet ( packet -> None ) -> def |
Sets the parent of this parameter to allow look up of external dependencies. More... | |
def | get_start_bit ( -> int ) -> def |
Gets the start bit of the parameter. More... | |
def | set_start_bit (start_bit: int -> None ) -> def |
Sets the start location for the parameter as bits. More... | |
def | set_value ( Union[int, float, str, bytes] new_value, sample: int=1 -> None ) -> def |
This "Virtual" function is assigned based on the type of the parameter. More... | |
def | validate ( -> Tuple[bool, int, int, str] ) -> def |
Validates the parameter. More... | |
Parameter Attributes | |
Functions handling parameter attributes and values. | |
def | allow_invalid_data ( -> None ) -> def |
Sets the Parameter to allow invalid combinations of input. More... | |
def | clear_external_num_samples ( -> None ) -> def |
Clears the external number of samples parameter. More... | |
def | clear_external_status ( -> None ) -> def |
Clears the external status parameter. More... | |
def | clear_value ( -> None ) -> def |
Removes the value for the parameter. More... | |
def | get_engineering_units ( -> str ) -> def |
Gets the engineering units of the parameter. More... | |
def | get_length ( -> int ) -> def |
Gets the length of the parameter. More... | |
def | get_value (sample: int=1 -> PassedType ) -> def |
This "Virtual" function is assigned based on the type of the parameter. More... | |
def | get_value_status (sample: int=1 -> Tuple[PassedType, int, int] ) -> def |
This "Virtual" function is assigned based on the type of the parameter. More... | |
def | get_value_as_string (sample: int=1 -> str ) -> def |
Returns the value of the parameter as a string. More... | |
def | get_value_as_string_status (sample: int=1 -> Tuple[str, int, int] ) -> def |
Returns the value of the parameter as a string. More... | |
def | get_value_into_trektime (time: TrekTime, sample: int=1 -> None ) -> def |
Get the value of the parameter and places it into the provided TrekTime. More... | |
def | get_value_into_trektime_status (time: TrekTime, sample: int=1 -> Tuple[int, int] ) -> def |
Get the value of the parameter and places it into the provided TrekTime. More... | |
def | get_byte_order ( -> ParameterByteOrderType ) -> def |
Gets the byte order for the parameter. More... | |
def | get_byte_order_as_string ( -> str ) -> def |
Returns the byte order for the parameter as a string. More... | |
def | get_data_format ( -> ParameterDataFormat ) -> def |
Returns the data format. More... | |
def | get_data_format_as_string ( -> str ) -> def |
Returns the data format (string). More... | |
def | get_data_type ( -> ParameterDataType ) -> def |
Gets the data type for the parameter. More... | |
def | get_data_type_as_string ( -> str ) -> def |
Returns the data type for the parameter as a string. More... | |
def | get_external_num_samples_parameter ( -> str ) -> def |
Gets the name of the external number of samples parameter. More... | |
def | get_external_status_parameter ( -> str ) -> def |
Gets the name of the external status parameter. More... | |
def | get_full_name ( -> str ) -> def |
Returns the full name for the parameter. | |
def | get_number_of_samples ( -> int ) -> def |
Gets the number of samples for the parameter. More... | |
def | get_number_of_syllables ( -> int ) -> def |
Gets the number of syllables for the parameter. More... | |
def | get_syllable_info (syll_num: int -> SyllableInfo ) -> def |
Gets the start bit and length for a syllable in a parameter. More... | |
def | has_value ( -> bool ) -> def |
Identifies if the parameter currently has a value. More... | |
def | is_modifiable ( -> bool ) -> def |
Identifies if the parameter can be modified. More... | |
def | is_valid ( -> bool ) -> def |
Checks to see if a parameter is valid. More... | |
def | is_variable_length ( -> bool ) -> def |
Identifies if the parameter can have variable length. More... | |
def | set_data_format (new_format: ParameterDataFormat -> None ) -> def |
Sets the data format for the printing the parameter to a string. More... | |
def | set_data_type (new_type: ParameterDataType, type_size: int, ParameterByteOrderType byte_order=ParameterByteOrderType.BIG_ENDIAN_BYTE_ORDER, var_len: bool=False -> None ) -> def |
Sets the data type, length, and byte order for the parameter. More... | |
def | set_engineering_units (new_units: str -> None ) -> def |
Sets the engineering units for the parameter. More... | |
def | set_external_num_samples_parameter (name: str -> None ) -> def |
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 ) -> def |
Sets the name of the parameter to use as the source status for the parameter. More... | |
def | set_full_name (new_name: str -> None ) -> def |
Sets the full name for the parameter. More... | |
def | set_modifiable_flag ( bool is_modifiable -> None ) -> def |
Sets the modifiable flag for the parameter. More... | |
def | set_number_of_samples (num_samples: int -> None ) -> def |
Sets the number of samples for the parameter. More... | |
def | set_number_of_syllables (num_syllables: int -> None ) -> def |
Sets the number of syllables for the parameter. More... | |
def | get_sample_offset ( -> int ) -> def |
Gets the sample offset for the parameter. More... | |
def | set_sample_offset (offset: int -> None ) -> def |
Sets the sample offset for the parameter. More... | |
def | set_value_from_string (new_value: str, data_format: ParameterDataFormat, sample: int=1 -> None ) -> def |
Sets the value of the parameter from a string by interpreting the format. More... | |
def | set_value_from_trektime (time: TrekTime, sample: int=1 -> None ) -> def |
Sets the value of the parameter from a TrekTime. More... | |
def | set_syllable_info (syll_num: int, syllable_info: SyllableInfo -> None ) -> def |
Sets the start bit and length for a syllable in a parameter. More... | |
Calibrators | |
Functions handling parameter calibrator. | |
def | clear_calibrator_switch_set ( -> None ) -> def |
Removes the calibrator switch set from the Parameter. | |
def | clear_default_calibrator ( -> None ) -> def |
Removes the default calibrator from the Parameter. | |
def | get_calibrator ( -> Optional[Calibrator] ) -> def |
Returns a copy of the calibrator. More... | |
def | get_calibrate_before_alarm_check ( -> bool ) -> def |
Identifies if the parameter value is calibrated prior to alarm checking the value. More... | |
def | get_calibrated_value (sample: int=1 -> float ) -> def |
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] ) -> def |
Gets the calibrated value of a parameter as a 64-bit floating point. More... | |
def | get_calibrator_switch_set ( -> Optional[CalibratorSwitchSet] ) -> def |
Returns a copy of the calibrator switch set. More... | |
def | has_calibrator ( -> bool ) -> def |
Identifies if the parameter currently has calibration defined. | |
def | set_calibrate_before_alarm_check (alarm_flag: bool -> None ) -> def |
Sets a flag to indicate if alarm checks are performed prior to or after calibration. More... | |
def | set_default_calibrator (calibrator: Calibrator -> None ) -> def |
Sets the calibrator to be used for this parameter. More... | |
def | set_calibrator_switch_set (cal_switch_set: CalibratorSwitchSet -> None ) -> def |
Sets the calibrator switch set to be used for this parameter. More... | |
Dependency | |
Functions handling parameter Dependency. | |
def | add_dependency (dependency: Dependency -> None ) -> def |
Adds a dependency for the parameter. More... | |
def | clear_dependencies ( -> None ) -> def |
Removes all dependencies for a parameter. More... | |
def | get_dependency (num: int -> Optional[Dependency] ) -> def |
Gets the specified dependency for a parameter. More... | |
def | get_number_of_dependencies ( -> int ) -> def |
Gets the number of dependencies for a parameter. More... | |
Enumerator | |
Functions handling parameter Enumerators and Enumerator Switch Sets. | |
def | clear_enumerator ( -> None ) -> def |
Removes the enumerator from the Parameter. | |
def | clear_enumerator_switch_set ( -> None ) -> def |
Removes the enumerator switch set from the Parameter. | |
def | get_enumerated_value (sample: int=1 -> str ) -> def |
Get the enumerated value for a parameter. More... | |
def | get_enumerated_value_status (sample: int=1 -> Tuple[str, int, int] ) -> def |
Gets the enumerated value of a parameter and its associated status. More... | |
def | get_enumerator ( -> Optional[BaseEnumerator] ) -> def |
Returns a copy of the enumerator. More... | |
def | get_enumerator_switch_set ( -> Optional[EnumeratorSwitchSet] ) -> def |
Returns a copy of the enumerator switch set. More... | |
def | has_enumerator ( -> bool ) -> def |
Identifies if the parameter currently has an enumerator defined. More... | |
def | set_enumerator (enumerator: Enumerator -> None ) -> def |
Sets the enumerator to be used for this parameter. More... | |
def | set_enumerator_switch_set (enum_set: EnumeratorSwitchSet -> None ) -> def |
Sets the enumerator switch set to be used for this parameter. More... | |
def | set_range_enumerator (enumerator: RangeEnumerator -> None ) -> def |
Sets the range enumerator to be used for this parameter. More... | |
ExpectedStateAlarm | |
Functions handling parameter ExpectedStateAlarm and ExpectedStateAlarmSwitchSets. | |
def | clear_expected_state_alarm ( -> None ) -> def |
Removes expected state alarm from the Parameter. | |
def | clear_expected_state_alarm_switch_set ( -> None ) -> def |
Removes the enumerator switch set from the Parameter. | |
def | get_expected_state_alarm ( -> Optional[ExpectedStateAlarm] ) -> def |
Returns a copy of the expected state alarm. More... | |
def | get_expected_state_alarm_switch_set ( -> Optional[ExpectedStateAlarmSwitchSet] ) -> def |
Returns a copy of the expected state alarm switch set. More... | |
def | has_expected_state ( -> bool ) -> def |
Identifies if the parameter currently has an expected state defined. More... | |
def | set_expected_state_alarm (alarm: ExpectedStateAlarm -> None ) -> def |
Sets the expected state to be used for this parameter. More... | |
def | set_expected_state_alarm_switch_set (alarm_set: ExpectedStateAlarmSwitchSet -> None ) -> def |
Sets the expected state alarm switch set to be used for this parameter. More... | |
LimitAlarm | |
Functions handling parameter LimitAlarms. | |
def | clear_limits ( -> None ) -> def |
Removes limits from the Parameter. | |
def | clear_limit_alarm_switch_set ( -> None ) -> def |
Removes the limit alarm switchset from the Parameter. | |
def | get_limits ( -> Optional[LimitAlarm] ) -> def |
Returns a copy of the LimitAlarm. More... | |
def | get_limit_alarm_switch_set ( -> Optional[LimitAlarmSwitchSet] ) -> def |
Returns a copy of the limit alarm switch set. More... | |
def | has_limits ( -> bool ) -> def |
Identifies if the parameter currently has limits defined. More... | |
def | set_limit_alarm_switch_set (alarm_set: LimitAlarmSwitchSet -> None ) -> def |
Sets the limit alarm switch set to be used for this parameter. More... | |
def | set_limits (limitalarm: LimitAlarm -> None ) -> def |
Sets the limits to be used for this parameter. More... | |
Range | |
Functions handling range. | |
def | get_continue_on_range_error ( -> bool ) -> def |
Identifies if parameter processing will continue on a range error. More... | |
def | get_double_high_range ( -> float ) -> def |
Returns the high range value of a data type that is stored as a double (ST_DOUBLE). More... | |
def | get_double_low_range ( -> float ) -> def |
Returns the low range value of a data type that is stored as a double (ST_DOUBLE). More... | |
def | get_integer_high_range ( -> int ) -> def |
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 ) -> def |
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 ) -> def |
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 ) -> def |
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 ) -> def |
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 ) -> def |
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 ) -> def |
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 ) -> def |
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 ) -> def |
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 ) -> def |
Sets the low range flag for the parameter. More... | |
def | set_high_range_flag (new_value: bool -> None ) -> def |
Sets the high range flag for the parameter. More... | |
def | set_unsigned_high_range (new_high: int -> None ) -> def |
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 ) -> def |
Sets the low range value for a parameter that is stored as an unsigned integer (ST_UNSIGNED_64). More... | |
def | use_high_range ( -> bool ) -> def |
Identifies if a high range value is currently in use. More... | |
def | use_low_range ( -> bool ) -> def |
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 ) -> def |
Gets the value of a raw data parameter as bytes. More... | |
def | get_value_bytes_status (sample: int=1 -> Tuple[bytes, int, int] ) -> def |
Gets the value of a raw data parameter as bytes. More... | |
def | get_value_time (sample: int=1 -> float ) -> def |
Gets the value of time parameter as a float. More... | |
def | get_value_time_status (sample: int=1 -> Tuple[float, int, int] ) -> def |
Gets the value of a parameter as a 64-bit floating point. More... | |
def | get_value_int32 (sample: int=1 -> int ) -> def |
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] ) -> def |
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 ) -> def |
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] ) -> def |
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 ) -> def |
Gets the value of a parameter as a char array. More... | |
def | get_value_string_status (sample: int=1 -> Tuple[str, int, int] ) -> def |
Gets the value of a parameter as a char array. More... | |
def | get_value_uint32 (sample: int=1 -> int ) -> def |
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] ) -> def |
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 ) -> def |
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] ) -> def |
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 ) -> def |
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] ) -> def |
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 ) -> def |
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 ) -> def |
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 ) -> def |
Sets the value of the parameter with a 32-bit unsigned integer. More... | |
def | set_value_uint64 (new_value: PassedType, sample: int=1 -> None ) -> def |
Sets the value of the parameter with a 64-bit unsigned integer. More... | |
def | set_value_string (new_value: PassedType, sample: int=1 -> None ) -> def |
Sets the value of the parameter with a NULL terminated string. More... | |
def | set_value_bytes (new_value: PassedType, sample: int=1 -> None ) -> def |
Set the value of the parameter with a variable length raw bytes data. More... | |
def | set_value_time (new_value: PassedType, sample: int=1 -> None ) -> def |
Sets the value of the parameter with a 64-bit floating point. More... | |
def | set_value_double (new_value: PassedType, sample: int=1 -> None ) -> def |
Sets the value of the parameter with a 64-bit floating point. More... | |
def | set_value_undefined (new_value: PassedType, sample: int=1 -> None ) -> def |
set_value method not defined for the requested data type. | |
![]() | |
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... | |
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 | : Optional[Parameter] | |
native_ptr | : Optional[c_void_p] | ||
) | -> None |
( | dependency | : Dependency | ) | -> None |
Adds a dependency for the parameter.
Adds the dependency specified for this parameter. If all dependency checks are positive, the parameter will be placed in the packet (Packet.build()) or retrieved from the packet (Packet.extract()).
[in] | dependency | The dependency to add. |
( | ) | -> None |
Sets the Parameter to allow invalid combinations of input.
The Parameter class by default will not allow invalid input. Calling this method will allow invalid data, but will require that the validate() method returns true prior to using many of the other methods (e.g., get_value(), build()). This allows input of data in any order.
( | buffer | : bytearray | ) | -> int |
Builds the parameter and places it in the specified buffer.
The parameter is converted to the data type specified from the local representation of the data. The last bit used in the buffer is returned. The data is placed according to the start bit, length, number of samples, and sample offset.
[in] | buffer | The buffer to place the parameter. |
TrekError | 15050 - TREK_DATA_NO_VALUE, 15008 - TREK_DATA_INVALID_DATA_TYPE |
( | ) | -> None |
Removes all dependencies for a parameter.
Parameter will always appear in the packet when dependencies are removed.
( | ) | -> None |
Clears the external number of samples parameter.
The value set by set_number_of_samples() will be used to retrieve data.
( | ) | -> None |
Clears the external status parameter.
The source status returned from calls to get_value() will always be 0.
( | ) | -> None |
Removes the value for the parameter.
This can be used as a cheat to get around parameters that aren't modifiable.
( | copy_from | : object | ) | -> None |
( | buffer | : bytearray | |
input_length | : int | ||
start_bit | : int | ||
) | -> int |
Extracts the parameter from the specified buffer.
The parameter is converted from the data type specified to the local representation of the data. The last bit read from in the buffer is returned as last bit used. The data is extracted according to the start bit, length, number of samples, sample offset, etc.
buffer | The buffer from which to extract. |
input_length | The valid number of bits that can be read. |
start_bit | The starting bit in the buffer to begin reading. |
TrekError | 15051 - TREK_DATA_NO_PARENT, 15053 - TREK_DATA_EXT_NUM_SAMP_EXTRACT_FAIL, 15002 - TREK_DATA_EXT_NUM_SAMP_PARAM_NOT_FOUND, 15058 - TREK_DATA_EXT_STATUS_PARAM_NOT_FOUND, 15054 - TREK_DATA_EXT_NUM_SAMP_BAD_VALUE, 15052 - TREK_DATA_EXT_NUM_SAMP_VALUE_FAIL, 15008 - TREK_DATA_INVALID_DATA_TYPE, 15012 - TREK_DATA_INVALID_BYTE_ORDER, 15008 - TREK_DATA_INVALID_DATA_TYPE, 15062 - TREK_LAST_BIT_ERROR |
( | ) | -> int |
Find the last bit used when building the parameter.
( | ) | -> bool |
( | ) | -> ParameterByteOrderType |
( | ) | -> str |
Returns the byte order for the parameter as a string.
( | ) | -> bool |
Identifies if the parameter value is calibrated prior to alarm checking the value.
( | sample | : int | ) | -> float |
Gets the calibrated value of a parameter as a 64-bit floating point.
A calibrator must be defined for the parameter.
[in] | sample |
TrekError | 15040 - TREK_DATA_CALIBRATOR_NOT_DEFINED, 15042 - TREK_DATA_RANGE_ERROR, 15043 - TREK_DATA_CALIBRATION_ERROR, 15003 - TREK_DATA_DATA_WILL_NOT_FIT, 15013 - TREK_DATA_SAMPLE_DOES_NOT_EXIST, 15010 - TREK_DATA_POSSIBLE_LOSS_OF_DATA, 15011 - TREK_DATA_INVALID_INPUT_FOR_TYPE, 15008 - TREK_DATA_INVALID_DATA_TYPE, |
( | sample | : int | ) | -> Tuple[float, int, int] |
Gets the calibrated value of a parameter as a 64-bit floating point.
A calibrator must be defined for the parameter. The trek_status and src_status can be used with ParameterStatus.
TrekError | 15040 - TREK_DATA_CALIBRATOR_NOT_DEFINED, 15042 - TREK_DATA_RANGE_ERROR, 15043 - TREK_DATA_CALIBRATION_ERROR, 15003 - TREK_DATA_DATA_WILL_NOT_FIT, 15013 - TREK_DATA_SAMPLE_DOES_NOT_EXIST, 15010 - TREK_DATA_POSSIBLE_LOSS_OF_DATA, 15011 - TREK_DATA_INVALID_INPUT_FOR_TYPE, 15008 - TREK_DATA_INVALID_DATA_TYPE, |
( | ) | -> Optional[Calibrator] |
Returns a copy of the calibrator.
( | ) | -> Optional[CalibratorSwitchSet] |
Returns a copy of the calibrator switch set.
( | ) | -> bool |
Identifies if parameter processing will continue on a range error.
( | ) | -> ParameterDataFormat |
Returns the data format.
( | ) | -> str |
Returns the data format (string).
( | ) | -> ParameterDataType |
Gets the data type for the parameter.
You can get the value as a string by calling GetDataTypeAsString()
( | ) | -> str |
Returns the data type for the parameter as a string.
( | num | : int | ) | -> Optional[Dependency] |
Gets the specified dependency for a parameter.
Dependency numbers are zero based. This method will return a None value if the dependency does not exist.
( | ) | -> float |
Returns the high range value of a data type that is stored as a double (ST_DOUBLE).
Check use_high_range() to see if the value is being used.
( | ) | -> float |
Returns the low range value of a data type that is stored as a double (ST_DOUBLE).
Check use_low_range() to see if the value is being used.
( | ) | -> str |
The name used for identifying this class in XML.
( | ) | -> str |
Gets the engineering units of the parameter.
( | sample | : int | ) | -> str |
Get the enumerated value for a parameter.
[in] | sample | Specify the sample number desired. Default value is 1. |
( | sample | : int | ) | -> Tuple[str, int, int] |
Gets the enumerated value of a parameter and its associated status.
The trek_status and src_status can be used with ParameterStatus.
[in] | sample | Specify the sample number desired. Default value is 1. |
( | ) | -> Optional[BaseEnumerator] |
Returns a copy of the enumerator.
( | ) | -> Optional[EnumeratorSwitchSet] |
Returns a copy of the enumerator switch set.
( | ) | -> Optional[ExpectedStateAlarm] |
Returns a copy of the expected state alarm.
( | ) | -> Optional[ExpectedStateAlarmSwitchSet] |
Returns a copy of the expected state alarm switch set.
( | ) | -> str |
Gets the name of the external number of samples parameter.
( | ) | -> str |
Gets the name of the external status parameter.
( | ) | -> int |
Returns the high range value of a data type that is stored as a signed integer (ST_SIGNED_64).
You should check use_high_range() to see if the value is being used.
( | ) | -> int |
Returns the low range value of a data type that is stored as a signed integer (ST_SIGNED_64).
You should check use_high_range() to see if the value is being used.
( | ) | -> int |
Gets the length of the parameter.
( | ) | -> Optional[LimitAlarmSwitchSet] |
Returns a copy of the limit alarm switch set.
( | ) | -> Optional[LimitAlarm] |
Returns a copy of the LimitAlarm.
( | ) | -> int |
Gets the number of dependencies for a parameter.
Parameter will always appear in the packet when dependencies are removed.
( | ) | -> int |
Gets the number of samples for the parameter.
( | ) | -> int |
Gets the number of syllables for the parameter.
( | ) | -> int |
Gets the sample offset for the parameter.
Only applicable for parameters with number of samples greater than 1.
( | ) | -> int |
Gets the start bit of the parameter.
( | syll_num | : int | ) | -> SyllableInfo |
Gets the start bit and length for a syllable in a parameter.
[in] | syll_num | The syllable number to retrieve for the parameter. Start with 1. |
TrekError | 15114 - TREK_DATA_BAD_SYLLABLE_NUMBER |
( | ) | -> int |
Returns the high range value of a data type that is stored as an unsigned integer (ST_UNSIGNED_64).
You should check use_high_range() to see if the value is being used.
( | ) | -> int |
Returns the low range value of a data type that is stored as an unsigned integer (ST_UNSIGNED_64).
You should check use_low_range() to see if the value is being used.
( | sample | : int | ) | -> PassedType |
This "Virtual" function is assigned based on the type of the parameter.
This allows you to call get_value() rather than calling a type-specific.
If the get_value_type() == float, it will call get_value_float()
If the get_value_type() == int32, it will call get_value_int32()
[in] | sample | Specify the sample number desired. Default value is 1. |
( | sample | : int | ) | -> str |
Returns the value of the parameter as a string.
The format of the string is based on the data type and the value set for data format (set_data_format()). If the parameter has no value, an empty string is returned. If the sample is not found, ? is returned. If a parameter is invalid, ! is returned.
[in] | sample | Specify the sample number desired. Default value is 1. |
( | sample | : int | ) | -> Tuple[str, int, int] |
Returns the value of the parameter as a string.
The format of the string is based on the data type and the value set for data format (set_data_format()). If the parameter has no value, an empty string is returned. If the sample is not found, ? is returned. If a parameter is invalid, ! is returned. The trek_status and src_status can be used with ParameterStatus.
[in] | sample | Specify the sample number desired. Default value is 1. |
( | sample | : int | ) | -> bytes |
Gets the value of a raw data parameter as bytes.
( | sample | : int | ) | -> Tuple[bytes, int, int] |
Gets the value of a raw data parameter as bytes.
( | sample | : int | ) | -> float |
Gets the value of a parameter as a 64-bit floating point.
get_value() assigned to this function if this type.
TrekError | 15021 - TREK_DATA_WILL_NOT_FIT, 15013 - TREK_DATA_SAMPLE_DOES_NOT_EXIST, 15010 - TREK_DATA_POSSIBLE_LOSS_OF_DATA |
( | sample | : int | ) | -> Tuple[float, int, int] |
Gets the value of a parameter as a 64-bit floating point.
get_value() assigned to this function if this type.
TrekError | 15021 - TREK_DATA_WILL_NOT_FIT, 15013 - TREK_DATA_SAMPLE_DOES_NOT_EXIST, 15010 - TREK_DATA_POSSIBLE_LOSS_OF_DATA |
( | sample | : int | ) | -> int |
Gets the value of a parameter as a 32-bit signed integer.
get_value() assigned to this function if this type.
TrekError | 15021 - TREK_DATA_WILL_NOT_FIT, 15013 - TREK_DATA_SAMPLE_DOES_NOT_EXIST |
( | sample | : int | ) | -> Tuple[int, int, int] |
Gets the value of a parameter as a 32-bit signed integer and data status codes.
get_value_status() assigned to this function, if parameter is this type.
TrekError | 15021 - TREK_DATA_WILL_NOT_FIT, 15013 - TREK_DATA_SAMPLE_DOES_NOT_EXIST, 15010 - TREK_DATA_POSSIBLE_LOSS_OF_DATA, 15011 - TREK_DATA_INVALID_INPUT_FOR_TYPE, 15008 - TREK_DATA_INVALID_DATA_TYPE |
( | sample | : int | ) | -> int |
Gets the value of a parameter as a 64-bit signed integer.
get_value() assigned to this function if this type.
TrekError | 15021 - TREK_DATA_WILL_NOT_FIT, 15013 - TREK_DATA_SAMPLE_DOES_NOT_EXIST |
( | sample | : int | ) | -> Tuple[int, int, int] |
Gets the value of a parameter as a 64-bit signed integer and data status codes.
get_value_status() assigned to this function, if parameter is this type.
TrekError | 15021 - TREK_DATA_WILL_NOT_FIT, 15013 - TREK_DATA_SAMPLE_DOES_NOT_EXIST, 15010 - TREK_DATA_POSSIBLE_LOSS_OF_DATA, 15011 - TREK_DATA_INVALID_INPUT_FOR_TYPE, 15008 - TREK_DATA_INVALID_DATA_TYPE |
( | time | : TrekTime | |
sample | : int | ||
) | -> None |
( | time | : TrekTime | |
sample | : int | ||
) | -> Tuple[int, int] |
( | sample | : int | ) | -> Tuple[PassedType, int, int] |
This "Virtual" function is assigned based on the type of the parameter.
This allows you to call get_value_status() rather than calling a type-specific function.
If the get_value_type() == float, it will call get_value_float_status()
If the get_value_type() == int32, it will call get_value_int32_status()
[in] | sample | Specify the sample number desired. Default value is 1. |
( | sample | : int | ) | -> str |
Gets the value of a parameter as a char array.
The Parameter's data type must be either DT_NULL_TERMINATED_STRING or DT_FIXED_LENGTH_STRING.
( | sample | : int | ) | -> Tuple[str, int, int] |
Gets the value of a parameter as a char array.
The Parameter's data type must be either DT_NULL_TERMINATED_STRING or DT_FIXED_LENGTH_STRING.
sample | Optional parameter specify the sample number from which the value is desired. |
( | sample | : int | ) | -> float |
Gets the value of time parameter as a float.
The Parameter's data type must be either a time type.
( | sample | : int | ) | -> Tuple[float, int, int] |
Gets the value of a parameter as a 64-bit floating point.
get_value() assigned to this function if this type.
TrekError | 15021 - TREK_DATA_WILL_NOT_FIT, 15013 - TREK_DATA_SAMPLE_DOES_NOT_EXIST, 15010 - TREK_DATA_POSSIBLE_LOSS_OF_DATA |
( | sample | : int | ) | -> int |
Gets the value of a parameter as a 32-bit unsigned integer.
get_value() assigned to this function if this type.
TrekError | 15021 - TREK_DATA_WILL_NOT_FIT, 15013 - TREK_DATA_SAMPLE_DOES_NOT_EXIST |
( | sample | : int | ) | -> Tuple[int, int, int] |
Gets the value of a parameter as a 32-bit unsigned integer and data status codes.
get_value_status() assigned to this function, if parameter is this type.
TrekError | 15021 - TREK_DATA_WILL_NOT_FIT, 15013 - TREK_DATA_SAMPLE_DOES_NOT_EXIST, 15010 - TREK_DATA_POSSIBLE_LOSS_OF_DATA, 15011 - TREK_DATA_INVALID_INPUT_FOR_TYPE, 15008 - TREK_DATA_INVALID_DATA_TYPE |
( | sample | : int | ) | -> int |
Gets the value of a parameter as a 64-bit unsigned integer.
get_value() assigned to this function if this type.
TrekError | 15021 - TREK_DATA_WILL_NOT_FIT, 15013 - TREK_DATA_SAMPLE_DOES_NOT_EXIST |
( | sample | : int | ) | -> Tuple[int, int, int] |
Gets the value of a parameter as a 64-bit unsigned integer and data status codes.
get_value_status() assigned to this function, if parameter is this type.
TrekError | 15021 - TREK_DATA_WILL_NOT_FIT, 15013 - TREK_DATA_SAMPLE_DOES_NOT_EXIST, 15010 - TREK_DATA_POSSIBLE_LOSS_OF_DATA, 15011 - TREK_DATA_INVALID_INPUT_FOR_TYPE, 15008 - TREK_DATA_INVALID_DATA_TYPE |
( | ) | -> bool |
Identifies if the parameter currently has an enumerator defined.
( | ) | -> bool |
Identifies if the parameter currently has an expected state defined.
( | ) | -> bool |
Identifies if the parameter currently has limits defined.
( | ) | -> bool |
Identifies if the parameter currently has a value.
( | ) | -> None |
( | ) | -> bool |
Identifies if the parameter can be modified.
( | ) | -> bool |
Checks to see if a parameter is valid.
( | ) | -> bool |
Identifies if the parameter can have variable length.
( | filename | : str | ) | -> None |
( | filename | : str | ) | -> None |
( | auto_clear | : bool | ) | -> None |
Sets the auto clear behavior of the parameter instance.
By default a parameter value is cleared prior to extracting new values so that the parameter will not have a value if extraction fails (e.g., the parameter does not exist in that packet instance). This behavior can be turned off by passing in false to this method. When turned off the parameter will contain the previous value if extraction fails.
[in] | auto_clear | New auto_clear value. |
( | alarm_flag | : bool | ) | -> None |
Sets a flag to indicate if alarm checks are performed prior to or after calibration.
The default value is true.
[in] | alarm_flag | The new calibrate before sensing option for the parameter. |
( | cal_switch_set | : CalibratorSwitchSet | ) | -> None |
Sets the calibrator switch set to be used for this parameter.
The calibrator switch set can contain any of the supplied TReK calibrators such as PolynomialCalibrator. The Parameter class makes a copy of the calibrator. If a calibrator or calibrator switch set already exists, it will be replaced.
[in] | cal_switch_set | The new calibrator switch set. |
( | continue_flag | : bool | ) | -> None |
Sets a flag to indicate if processing can continue if a range error is detected.
[in] | continue_flag | Includes calibration. The default value is false. |
( | new_format | : ParameterDataFormat | ) | -> None |
Sets the data format for the printing the parameter to a string.
Will create the format for get_value_as_string().
[in] | new_format | The new data format. |
TrekError | 15008 - TREK_DATA_INVALID_DATA_TYPE, 15050 - TREK_DATA_NO_VALUE |
( | new_type | : ParameterDataType | |
type_size | : int | ||
byte_order | : ParameterByteOrderType | ||
var_len | : bool | ||
) | -> None |
Sets the data type, length, and byte order for the parameter.
See full documentation for the allowed length of each data type. A byte order of LITTLE_ENDIAN_BYTE_ORDER is only allowed for certain data types when they are on byte boundaries. The number of samples will be reset to 1. Only a single variable length parameter is supported in a Packet. Multiple variable length parameters within a Packet will cause the packet.Packet.validate() method to fail.
[in] | new_type | The data type for the parameter. |
[in] | type_size | The length in bits. |
[in] | byte_order | The byte order. |
[in] | var_len | Indicates the data can be variable length. |
TrekError | 15017 - TREK_DATA_FIXED_LENGTH_REQUIRED, 15012 - TREK_DATA_INVALID_BYTE_ORDER, 15009 - TREK_DATA_INVALID_LENGTH_FOR_DATA_TYPE, 15066 - TREK_DATA_VAR_LEN_NUM_SAMPLE_ERROR |
Data Type | Description | Valid Length (bits) | Byte Order Allowed | Variable Length |
---|---|---|---|---|
DT_TWOS_COMPLEMENT | Two's complement signed integer | 2-64 | BIG_ENDIAN_BYTE_ORDER LITTLE_ENDIAN_BYTE_ORDER BYTE_SWAPPED_BYTE_ORDER WORD_SWAPPED_BYTE_ORDER | No |
DT_UNSIGNED_INTEGER | Unsigned integer | 1-64 | BIG_ENDIAN_BYTE_ORDER LITTLE_ENDIAN_BYTE_ORDER BYTE_SWAPPED_BYTE_ORDER WORD_SWAPPED_BYTE_ORDER | No |
DT_BINARY_CODED_DECIMAL | Binary coded decimal | 4, 8, 12, 16 | BIG_ENDIAN_BYTE_ORDER | No |
DT_DISTENDED_SIGNED_INTEGER | Distended signed integer | 16 or 32 | BIG_ENDIAN_BYTE_ORDER LITTLE_ENDIAN_BYTE_ORDER BYTE_SWAPPED_BYTE_ORDER WORD_SWAPPED_BYTE_ORDER | No |
DT_SIGN_AND_MAGNITUDE_INTEGER | Sign and magnitude integer | 2-32 | BIG_ENDIAN_BYTE_ORDER LITTLE_ENDIAN_BYTE_ORDER BYTE_SWAPPED_BYTE_ORDER WORD_SWAPPED_BYTE_ORDER | No |
DT_IEEE_FLOATING_POINT | Single or double precision IEEE floating point | 32 or 64 | BIG_ENDIAN_BYTE_ORDER LITTLE_ENDIAN_BYTE_ORDER | No |
DT_NULL_TERMINATED_STRING | ASCII string terminated by a NULL (0x00) character | 16-524,288* (multiple of 8) | BIG_ENDIAN_BYTE_ORDER BYTE_SWAPPED_BYTE_ORDER | Yes |
DT_FIXED_LENGTH_STRING | ASCII string of fixed length that may or may not contain a terminating character | 8-524,288* (multiple of 16 if BYTE_SWAPPED_BYTE_ORDER) | BIG_ENDIAN_BYTE_ORDER BYTE_SWAPPED_BYTE_ORDER | No |
DT_BOOLEAN | Single bit value where 1 indicates true and 0 indicates false | 1 | BIG_ENDIAN_BYTE_ORDER | No |
DT_UNSPECIFIED_BYTES | Binary data that has no type | 8-524,288* | BIG_ENDIAN_BYTE_ORDER | Yes |
DT_GPS_EPOCH_TIME | Number of seconds since 1980-01-06 | 32 | BIG_ENDIAN_BYTE_ORDER LITTLE_ENDIAN_BYTE_ORDER | No |
DT_EHS_TIME | Time found in the EHS Primary Protocol Header. 52 and 56 bit versions have resolution to one tenth of a second. Flag fields are not processed. | 48, 52, 56 | BIG_ENDIAN_BYTE_ORDER | No |
DT_ISS_TIME | 40 bits (32-bit seconds since GPS plus 8 bit fractional time...1 bit = ~4ms) | 40 | BIG_ENDIAN_BYTE_ORDER | No |
DT_FASTSAT_TIME | 32-bit seconds since GPS with 16-bit millisec (max value 999) | 48 | BIG_ENDIAN_BYTE_ORDER | No |
DT_DEM_TIME | 32-bit seconds since GPS with 10-bit millisec (max value 999) | 42 | BIG_ENDIAN_BYTE_ORDER | No |
DT_UNIX_TIME | Number of seconds since 1970-01-01 | 32 | BIG_ENDIAN_BYTE_ORDER LITTLE_ENDIAN_BYTE_ORDER | No |
DT_EHS_CONV_TIME | Special time conversion provided by EHS GSE time data. | 320 | BIG_ENDIAN_BYTE_ORDER | No |
DT_ISAT_TIME | 32-bit seconds since 1970-01-01 with 16-bit millisec (max value 999). | 48 | BIG_ENDIAN_BYTE_ORDER | No |
DT_SC_TIME | 40 bits (32-bit seconds since 2000-01-01 plus 8 bit fractional time with .2 second resolution) | 40 | BIG_ENDIAN_BYTE_ORDER | No |
DT_J2000_16_TIME | 48 bits (32-bit seconds since 11:58:55.816 UTC on 2000-01-01 plus 16 bit fractional time) | 48 | BIG_ENDIAN_BYTE_ORDER | No |
DT_UNIX_USEC_TIME | 32-bit seconds since 1970-01-01 with 32-bit microseconds (max value 999,999). | 64 | BIG_ENDIAN_BYTE_ORDER | No |
( | calibrator | : Calibrator | ) | -> None |
Sets the calibrator to be used for this parameter.
The calibrator can be on of the supplied TReK calibrators such as PolynomialCalibrator. The Parameter class makes a copy of the calibrator. If a calibrator or calibrator switch set already exists, it will be replaced.
[in] | calibrator | The new calibrator. |
( | new_high | : float | ) | -> None |
Sets the high range value for a parameter that is stored as a floating point (ST_DOUBLE).
The input value must be greater than the current low range value for the parameter if the low range is in use. If successful, the high range flag is automatically set to true to indicate that the high range will be used.
[in] | new_high | New high range. |
TrekError | 15001 - TREK_DATA_VALUE_RANGE_ERROR, 15020 - TREK_DATA_INVALID_INPUT_FOR_DATA_TYPE |
( | new_low | : float | ) | -> None |
Sets the low range value for a parameter that is stored as a floating point (ST_DOUBLE).
The input value must be less than the current high range value for the parameter if the high range is in use. If successful, the low range flag is automatically set to true to indicate that the low range will be used.
[in] | new_low | New low range. |
TrekError | 15001 - TREK_DATA_VALUE_RANGE_ERROR, 15020 - TREK_DATA_INVALID_INPUT_FOR_DATA_TYPE |
( | new_units | : str | ) | -> None |
Sets the engineering units for the parameter.
Although there is no predefined maximum length for the engineering units, it may be truncated to fit in a selected schema. The engineering units are for reference/display only and do not affect the parameter's value.
[in] | new_units | The new units for the parameter (text string describing). |
( | enumerator | : Enumerator | ) | -> None |
Sets the enumerator to be used for this parameter.
If the data type cannot be retrieved with a 32-bit unsigned integer, calls to get_enumerated_Value() will fail.
[in] | enumerator | The new enumerator. If a enumerator already exists, it will be replaced. |
( | enum_set | : EnumeratorSwitchSet | ) | -> None |
Sets the enumerator switch set to be used for this parameter.
The enumerator switch set can contain any of the supplied TReK enumerators such as RangeEnumerator. The Parameter class makes a copy of the enumerator switch set. If an enumerator or enumerator switch set already exists, it will be replaced.
[in] | enum_set | The enumerator switch set. |
( | alarm | : ExpectedStateAlarm | ) | -> None |
Sets the expected state to be used for this parameter.
[in] | alarm | The new expected state alarm. If one exists it will be replaced and any limits will be deleted. |
( | alarm_set | : ExpectedStateAlarmSwitchSet | ) | -> None |
Sets the expected state alarm switch set to be used for this parameter.
The expected state alarm switch set contains one or more ExpectedStateAlarm objects. The Parameter class makes a copy of the ExpectedStateAlarm. If a alarm or switch set already exists, it will be replaced.
[in] | alarm_set | The new limit alarm switched set. |
( | name | : str | ) | -> None |
Sets the name of the parameter to use as the number of samples available for the parameter.
If the external number of samples parameter is set, the value set with set_number_of_samples() will be considered the maximum number of samples allowed.
[in] | name | The name of the parameter holding external samples. |
( | name | : str | ) | -> None |
Sets the name of the parameter to use as the source status for the parameter.
If the external status parameter is set, parameter will return the value referenced by the name as the source status in calls to get_value().
[in] | name | The name of the parameter holding the external number of samples. |
( | new_name | : str | ) | -> None |
Sets the full name for the parameter.
Only used internally to TReK.
[in] | new_name | The full name for the parameter. |
( | new_value | : bool | ) | -> None |
Sets the high range flag for the parameter.
A value of true indicates that the parameter's value has a high range that should be checked. The default value is false.
[in] | new_value | The new high range flag. |
( | new_high | : int | ) | -> None |
Sets the high range value for a parameter that is stored as a signed integer (ST_SIGNED_64).
The input value must be greater than the current low range value for the parameter if the low range is in use. If successful, the high range flag is automatically set to true to indicate that the high range will be used.
[in] | new_high | New high range. |
TrekError | 15001 - TREK_DATA_VALUE_RANGE_ERROR, 15020 - TREK_DATA_INVALID_INPUT_FOR_DATA_TYPE |
( | new_low | : int | ) | -> None |
Sets the low range value for a parameter that is stored as a signed integer (ST_SIGNED_64).
The input value must be less than the current high range value for the parameter if the high range is in use. If successful, the low range flag is automatically set to true to indicate that the low range will be used.
[in] | new_low | New low range. |
TrekError | 15001 - TREK_DATA_VALUE_RANGE_ERROR, 15020 - TREK_DATA_INVALID_INPUT_FOR_DATA_TYPE |
( | alarm_set | : LimitAlarmSwitchSet | ) | -> None |
Sets the limit alarm switch set to be used for this parameter.
The limit alarm switch set can contains on or more LimitAlarm objects. The Parameter class makes a copy of the set. If a limit alarm or limit alarm switched set already exists, it will be replaced.
[in] | alarm_set | The new limit alarm switch set. |
( | limitalarm | : LimitAlarm | ) | -> None |
Sets the limits to be used for this parameter.
[in] | limitalarm | The new LimitAlarm. Existing will be replaced and will also remove any expected state alarms. |
( | new_value | : bool | ) | -> None |
Sets the low range flag for the parameter.
A value of true indicates that the parameter's value has a low range that should be checked. The default value is false.
[in] | new_value | New low range flag. |
( | is_modifiable | : bool | ) | -> None |
Sets the modifiable flag for the parameter.
The default value is true.
[in] | is_modifiable | New modifiable setting. |
( | num_samples | : int | ) | -> None |
Sets the number of samples for the parameter.
Memory will be allocated to store all of the samples. Any previous values stored will be lost. The default number of samples is 1.
[in] | num_samples | The new number of samples of for the parameter. |
TrekError | 15014 - TREK_DATA_INVALID_SAMPLE_NUMBER, 15066 - TREK_DATA_VAR_LEN_NUM_SAMPLE_ERROR |
( | num_syllables | : int | ) | -> None |
Sets the number of syllables for the parameter.
If the number of syllables is set the 'start bit' set by set_start_bit() will be ignored for processing. A parameter can have one or more syllables. Each syllable must have a length and start bit set using set_syllable_info(). The sum of the lengths for the syllables must be equal to the length of the parameter's data type as set by set_data_type(). Variable length data types cannot be multi sampled. If the number of syllables changes, all previous information about the syallables is lost.
[in] | num_syllables | The new number of syllables for the parameter. A value of zero will erase all syllable information and use locations as set_by_start_bit(). |
TrekError | 15115 - TREK_DATA_VAR_LEN_SYLLABLE_ERROR |
( | packet | ) | -> None |
Sets the parent of this parameter to allow look up of external dependencies.
[in] | packet | Parent Packet. |
( | enumerator | : RangeEnumerator | ) | -> None |
Sets the range enumerator to be used for this parameter.
If the data type cannot be retrieved with a 32-bit unsigned integer, calls to get_enumerator_value() will fail.
[in] | enumerator | The new enumerator. If a enumerator already exists, it will be replaced. |
( | offset | : int | ) | -> None |
Sets the sample offset for the parameter.
The sample offset is the number of bits between the end of one sample and the beginning of the next sample. The default value is 0. Only applicable for parameters with number of samples greater than 1.
[in] | offset | The new sample offset for the parameter. |
( | start_bit | : int | ) | -> None |
Sets the start location for the parameter as bits.
Bit numbers begin at 0. The default start bit is 0.
[in] | start_bit | The new start bit for the parameter. |
( | syll_num | : int | |
syllable_info | : SyllableInfo | ||
) | -> None |
Sets the start bit and length for a syllable in a parameter.
[in] | syll_num | The syllable number to change for the parameter (start at 1). |
[in] | syllable_info | The syllable information settings. |
TrekError | 15114 - TREK_DATA_BAD_SYLLABLE_NUMBER |
( | new_high | : int | ) | -> None |
Sets the high range value for a parameter that is stored as an unsigned integer (ST_UNSIGNED_64).
The input value must be greater than the current low range value for the parameter if the low range is in use. If successful, the high range flag is automatically set to true to indicate that the high range will be used.
[in] | new_high | New high range. |
TrekError | 15001 - TREK_DATA_VALUE_RANGE_ERROR, 15020 - TREK_DATA_INVALID_INPUT_FOR_DATA_TYPE |
( | new_low | : int | ) | -> None |
Sets the low range value for a parameter that is stored as an unsigned integer (ST_UNSIGNED_64).
The input value must be less than the current high range value for the parameter if the high range is in use. If successful, the low range flag is automatically set to true to indicate that the low range will be used.
[in] | new_low | New low range. |
TrekError | 15001 - TREK_DATA_VALUE_RANGE_ERROR, 15020 - TREK_DATA_INVALID_INPUT_FOR_DATA_TYPE |
( | new_value | : Union[int, float, str, bytes] | |
sample | : int | ||
) | -> None |
This "Virtual" function is assigned based on the type of the parameter.
This allows you to call set_value() rather than calling a type-specific.
If the get_value_type() == float, it will call set_value_float()
If the get_value_type() == int32, it will call set_value_int32()
[in] | new_value | The new value. |
[in] | sample | Specify the sample number desired. Default value is 1. |
( | new_value | : PassedType | |
sample | : int | ||
) | -> None |
Set the value of the parameter with a variable length raw bytes data.
TypeError,if | new values is not of type bytes. |
TrekError | TREK_DATA_POSSIBLE_LOSS_OF_DATA, TREK_DATA_INVALID_LENGTH_FOR_DATA_TYPE |
( | new_value | : PassedType | |
sample | : int | ||
) | -> None |
Sets the value of the parameter with a 64-bit floating point.
TrekError | 15010 - TREK_DATA_POSSIBLE_LOSS_OF_DATA |
( | new_value | : str | |
data_format | : ParameterDataFormat | ||
sample | : int | ||
) | -> None |
Sets the value of the parameter from a string by interpreting the format.
The valid data type - data format combinations are shown in the table below.
[in] | new_value | The new value formatted accordingy. |
[in] | data_format | The interpreted format. |
[in] | sample | (Optional) Sample number (default is 1). |
TrekError | 15024 - TREK_DATA_NOT_MODIFIABLE, 15013 - TREK_DATA_SAMPLE_DOES_NOT_EXIST, 15010 - TREK_DATA_POSSIBLE_LOSS_OF_DATA, 15011 - TREK_DATA_INVALID_INPUT_FOR_TYPE, 15008 - TREK_DATA_INVALID_DATA_TYPE, 15025 - TREK_DATA_VALUE_LESS_THAN_MIN, 15026 - TREK_DATA_VALUE_EXCEEDS_MAX, 15019 - TREK_DATA_INVALID_CHAR_INPUT, 15023 - TREK_DATA_NOT_BOOLEAN_TYPE, 15021 - TREK_DATA_WILL_NOT_FIT |
Data Type | DF_ASCII | DF_BINARY | DF_DECIMAL | DF_SCIENTIFIC* | DF_HEX | DF_BOOLEAN | DF_DATE_TIME |
---|---|---|---|---|---|---|---|
DT_TWOS_COMPLEMENT | X |
| |||||
DT_UNSIGNED_INTEGER | X | X | X |
| |||
DT_DISTENDED_SIGNED_INTEGER | X |
| |||||
DT_SIGN_AND_MAGNITUDE_INTEGER | X |
| |||||
DT_BINARY_CODED_DECIMAL | X |
| |||||
DT_IEEE_FLOATING_POINT | X |
| |||||
DT_NULL_TERMINATED_STRING | X |
| |||||
DT_FIXED_LENGTH_STRING | X |
| |||||
DT_BOOLEAN | X |
| |||||
DT_UNSPECIFIED_BYTES | X | X |
| ||||
DT_GPS_EPOCH_TIME | X
| ||||||
DT_EHS_TIME | X
| ||||||
DT_ISS_TIME | X
| ||||||
DT_FASTSAT_TIME | X
| ||||||
DT_DEM_TIME | X
| ||||||
DT_UNIX_TIME | X
| ||||||
DT_EHS_CONV_TIME | X
| ||||||
DT_ISAT_TIME | X |
( | time | : TrekTime | |
sample | : int | ||
) | -> None |
( | new_value | : Union[int, float, str, bytes] | |
sample | : int | ||
) | -> None |
Sets the value of the parameter with a 32-bit signed integer.
[in] | new_value | The new value. |
[in] | sample | Optionally provide the sample number. |
TrekError | 15024 - TREK_DATA_NOT_MODIFIABLE, 15013 - TREK_DATA_SAMPLE_DOES_NOT_EXIST, 15010 - TREK_DATA_POSSIBLE_LOSS_OF_DATA, 15011 - TREK_DATA_INVALID_INPUT_FOR_TYPE, 15008 - TREK_DATA_INVALID_DATA_TYPE, 15025 - TREK_DATA_VALUE_LESS_THAN_MIN, 15026 - TREK_DATA_VALUE_EXCEEDS_MAX |
( | new_value | : Union[int, float, str, bytes] | |
sample | : int | ||
) | -> None |
Sets the value of the parameter with a 64-bit signed integer.
[in] | new_value | The new value. |
[in] | sample | Optionally provide the sample number. |
TrekError | 15024 - TREK_DATA_NOT_MODIFIABLE, 15013 - TREK_DATA_SAMPLE_DOES_NOT_EXIST, 15010 - TREK_DATA_POSSIBLE_LOSS_OF_DATA, 15011 - TREK_DATA_INVALID_INPUT_FOR_TYPE, 15008 - TREK_DATA_INVALID_DATA_TYPE, 15025 - TREK_DATA_VALUE_LESS_THAN_MIN, 15026 - TREK_DATA_VALUE_EXCEEDS_MAX |
( | new_value | : PassedType | |
sample | : int | ||
) | -> None |
Sets the value of the parameter with a NULL terminated string.
If input is larger than the parameter's size allows, the value will be truncated and TREK_DATA_POSSIBLE_LOSS_OF_DATA returned.
[in] | new_value | The new value. |
[in] | sample | Optionally provide the sample number. |
TrekError | 15024 - TREK_DATA_NOT_MODIFIABLE, 15013 - TREK_DATA_SAMPLE_DOES_NOT_EXIST, 15010 - TREK_DATA_POSSIBLE_LOSS_OF_DATA, 15011 - TREK_DATA_INVALID_INPUT_FOR_TYPE, 15008 - TREK_DATA_INVALID_DATA_TYPE, 15025 - TREK_DATA_VALUE_LESS_THAN_MIN, 15026 - TREK_DATA_VALUE_EXCEEDS_MAX |
( | new_value | : PassedType | |
sample | : int | ||
) | -> None |
Sets the value of the parameter with a 64-bit floating point.
TrekError | 15010 - TREK_DATA_POSSIBLE_LOSS_OF_DATA |
( | new_value | : Union[int, float, str, bytes] | |
sample | : int | ||
) | -> None |
Sets the value of the parameter with a 32-bit unsigned integer.
[in] | new_value | The new value. |
[in] | sample | Optionally provide the sample number. |
TrekError | 15024 - TREK_DATA_NOT_MODIFIABLE, 15013 - TREK_DATA_SAMPLE_DOES_NOT_EXIST, 15010 - TREK_DATA_POSSIBLE_LOSS_OF_DATA, 15011 - TREK_DATA_INVALID_INPUT_FOR_TYPE, 15008 - TREK_DATA_INVALID_DATA_TYPE, 15025 - TREK_DATA_VALUE_LESS_THAN_MIN, 15026 - TREK_DATA_VALUE_EXCEEDS_MAX |
( | new_value | : PassedType | |
sample | : int | ||
) | -> None |
Sets the value of the parameter with a 64-bit unsigned integer.
[in] | new_value | The new value. |
[in] | sample | Optionally provide the sample number. |
TrekError | 15024 - TREK_DATA_NOT_MODIFIABLE, 15013 - TREK_DATA_SAMPLE_DOES_NOT_EXIST, 15010 - TREK_DATA_POSSIBLE_LOSS_OF_DATA, 15011 - TREK_DATA_INVALID_INPUT_FOR_TYPE, 15008 - TREK_DATA_INVALID_DATA_TYPE, 15025 - TREK_DATA_VALUE_LESS_THAN_MIN, 15026 - TREK_DATA_VALUE_EXCEEDS_MAX |
( | ) | -> bool |
Identifies if a high range value is currently in use.
( | ) | -> bool |
Identifies if a low range value is currently in use.
( | ) | -> Tuple[bool, int, int, str] |
Validates the parameter.
The Parameter class by default will not allow invalid input. If you call allow_invalid_data() then you must call this method and it must return true prior to using many of the other methods (e.g., get_value(), build()). This allows input of data in any order. A parameter is considered valid if only warnings are found.