Logo
Telescience Resource Kit
TReK Python  5.4.0 ART
Parameter Class Reference

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.
 
- 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 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.

Constructor & Destructor Documentation

◆ Parameter()

(parameter : Optional[Parameter]  
native_ptr : Optional[c_void_p]  
) -> None

Class initializer.

Parameters
[in]parameter(Optional) Parameter to copy.
[in]native_ptr(Optional) Internal parameter, do not provide.

Reimplemented from NamedItem.

Member Function Documentation

◆ add_dependency()

(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()).

Parameters
[in]dependencyThe dependency to add.

◆ allow_invalid_data()

() -> 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.

◆ build()

(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.

Note
It is not expected that users will use this method.
Parameters
[in]bufferThe buffer to place the parameter.
Returns
The last bit used if successful.
Exceptions
TrekError15050 - TREK_DATA_NO_VALUE,

15008 - TREK_DATA_INVALID_DATA_TYPE

◆ clear_dependencies()

() -> None

Removes all dependencies for a parameter.

Parameter will always appear in the packet when dependencies are removed.

◆ clear_external_num_samples()

() -> None

Clears the external number of samples parameter.

The value set by set_number_of_samples() will be used to retrieve data.

◆ clear_external_status()

() -> None

Clears the external status parameter.

The source status returned from calls to get_value() will always be 0.

◆ clear_value()

() -> None

Removes the value for the parameter.

This can be used as a cheat to get around parameters that aren't modifiable.

◆ copy()

(copy_from : object ) -> None

Copies the contents of the provided 'copy_from' Parameter into this Parameter.

Parameters
[in]copy_fromParameter to copy from.
Exceptions
TypeErrorif copy_from is not of type Parameter.

Reimplemented from NamedItem.

◆ extract()

(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.

Parameters
bufferThe buffer from which to extract.
input_lengthThe valid number of bits that can be read.
start_bitThe starting bit in the buffer to begin reading.
Returns
The last bit used, if successful.
Exceptions
TrekError15051 - 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

◆ find_last_bit()

() -> int

Find the last bit used when building the parameter.

Returns
Last bit.

◆ get_auto_clear()

() -> bool

Gets whether the auto clear behavior is enabled.

See also
set_auto_clear().
Returns
If enabled.

◆ get_byte_order()

Gets the byte order for the parameter.

See also
get_byte_order_as_string().
Returns
The byte order.

◆ get_byte_order_as_string()

() -> str

Returns the byte order for the parameter as a string.

Returns
byte order in a string.

◆ get_calibrate_before_alarm_check()

() -> bool

Identifies if the parameter value is calibrated prior to alarm checking the value.

Returns
If calibrated prior to checking alarms.

◆ get_calibrated_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.

Parameters
[in]sample
Returns
Calibrated value.
Exceptions
TrekError15040 - 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,

◆ get_calibrated_value_status()

(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.

Returns
Tuple[float,int,int] A tuple containing (calibrated_value, trek_status, source_status).
Exceptions
TrekError15040 - 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,

◆ get_calibrator()

() -> Optional[Calibrator]

Returns a copy of the calibrator.

Returns
Calibrator requested or None if not found.

◆ get_calibrator_switch_set()

() -> Optional[CalibratorSwitchSet]

Returns a copy of the calibrator switch set.

Returns
CalibratorSwitchSet requested or None if not found.

◆ get_continue_on_range_error()

() -> bool

Identifies if parameter processing will continue on a range error.

Returns
If processing will continue on detection of a range error.

◆ get_data_format()

Returns the data format.

Returns
Data format.

◆ get_data_format_as_string()

() -> str

Returns the data format (string).

Returns
Format as string.

◆ get_data_type()

Gets the data type for the parameter.

You can get the value as a string by calling GetDataTypeAsString()

Returns
ParameterDataType.

◆ get_data_type_as_string()

() -> str

Returns the data type for the parameter as a string.

Returns
ParameterDataType as a string.

◆ get_dependency()

(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.

Returns
Dependency or None

◆ get_double_high_range()

() -> 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.

Returns
High range value.

◆ get_double_low_range()

() -> 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.

Returns
Low range value.

◆ get_element_name()

() -> str

The name used for identifying this class in XML.

Returns
the name usinged in save_file() XML.

◆ get_engineering_units()

() -> str

Gets the engineering units of the parameter.

Returns
The engineering units (text string).

◆ get_enumerated_value()

(sample : int  ) -> str

Get the enumerated value for a parameter.

Parameters
[in]sampleSpecify the sample number desired. Default value is 1.
Returns
The enumerated value.

◆ get_enumerated_value_status()

(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.

Parameters
[in]sampleSpecify the sample number desired. Default value is 1.
Returns
Tuple(The enumerated value, trek_status, src_status).

◆ get_enumerator()

() -> Optional[BaseEnumerator]

Returns a copy of the enumerator.

Returns
An enumerator or None if not set.

◆ get_enumerator_switch_set()

() -> Optional[EnumeratorSwitchSet]

Returns a copy of the enumerator switch set.

Returns
EnumeratorSwitchSet or None if not set.

◆ get_expected_state_alarm()

() -> Optional[ExpectedStateAlarm]

Returns a copy of the expected state alarm.

Returns
ExpectedStateAlarm or None if not set.

◆ get_expected_state_alarm_switch_set()

() -> Optional[ExpectedStateAlarmSwitchSet]

Returns a copy of the expected state alarm switch set.

Returns
ExpectedStateAlarmSwitchSet or None if not set.

◆ get_external_num_samples_parameter()

() -> str

Gets the name of the external number of samples parameter.

Returns
Parameter name or empty string if not defined.

◆ get_external_status_parameter()

() -> str

Gets the name of the external status parameter.

Returns
Parameter name or empty string if not defined.

◆ get_integer_high_range()

() -> 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.

Returns
High range value.

◆ get_integer_low_range()

() -> 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.

Returns
Low range value.

◆ get_length()

() -> int

Gets the length of the parameter.

Returns
Length in bits.

◆ get_limit_alarm_switch_set()

() -> Optional[LimitAlarmSwitchSet]

Returns a copy of the limit alarm switch set.

Returns
ExpectedStateAlarm or None if not set.

◆ get_limits()

() -> Optional[LimitAlarm]

Returns a copy of the LimitAlarm.

Returns
Copy of LimitAlarm or None.

◆ get_number_of_dependencies()

() -> int

Gets the number of dependencies for a parameter.

Parameter will always appear in the packet when dependencies are removed.

Returns
Number of dependencies.

◆ get_number_of_samples()

() -> int

Gets the number of samples for the parameter.

Returns
The number of samples.

◆ get_number_of_syllables()

() -> int

Gets the number of syllables for the parameter.

Returns
The number of syllables.

◆ get_sample_offset()

() -> int

Gets the sample offset for the parameter.

Only applicable for parameters with number of samples greater than 1.

Returns
Number of bits from the end of one sample to beginning of next.

◆ get_start_bit()

() -> int

Gets the start bit of the parameter.

Returns
Start bit of parameter.

◆ get_syllable_info()

(syll_num : int ) -> SyllableInfo

Gets the start bit and length for a syllable in a parameter.

Parameters
[in]syll_numThe syllable number to retrieve for the parameter. Start with 1.
Exceptions
TrekError15114 - TREK_DATA_BAD_SYLLABLE_NUMBER

◆ get_unsigned_high_range()

() -> 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.

Returns
High range value.

◆ get_unsigned_low_range()

() -> 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.

Returns
Low range value.

◆ get_value()

(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()

Parameters
[in]sampleSpecify the sample number desired. Default value is 1.
Returns
value of the appropriate data type.

◆ get_value_as_string()

(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.

Parameters
[in]sampleSpecify the sample number desired. Default value is 1.
Returns
Value in the specified format.

◆ get_value_as_string_status()

(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.

Parameters
[in]sampleSpecify the sample number desired. Default value is 1.
Returns
(value, trek_status, src_status) Tuple containing value, and status.

◆ get_value_bytes()

(sample : int  ) -> bytes

Gets the value of a raw data parameter as bytes.

Returns
the parameter value in bytes.

◆ get_value_bytes_status()

(sample : int  ) -> Tuple[bytes, int, int]

Gets the value of a raw data parameter as bytes.

Returns
Tuple[bytes, int, int] containing, (parameter value in bytes, trek_status, source_status). See ParameterStatus.

◆ get_value_double()

(sample : int  ) -> float

Gets the value of a parameter as a 64-bit floating point.

get_value() assigned to this function if this type.

Returns
The parameters value.
Exceptions
TrekError15021 - TREK_DATA_WILL_NOT_FIT,

15013 - TREK_DATA_SAMPLE_DOES_NOT_EXIST,

15010 - TREK_DATA_POSSIBLE_LOSS_OF_DATA

◆ get_value_double_status()

(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.

Returns
Tuple[float,int,int] A tuple containing (parameter_value, trek_status, source_status).
Exceptions
TrekError15021 - TREK_DATA_WILL_NOT_FIT,

15013 - TREK_DATA_SAMPLE_DOES_NOT_EXIST,

15010 - TREK_DATA_POSSIBLE_LOSS_OF_DATA

◆ get_value_int32()

(sample : int  ) -> int

Gets the value of a parameter as a 32-bit signed integer.

get_value() assigned to this function if this type.

Returns
The parameters value.
Exceptions
TrekError15021 - TREK_DATA_WILL_NOT_FIT,

15013 - TREK_DATA_SAMPLE_DOES_NOT_EXIST

◆ get_value_int32_status()

(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.

Returns
Tuple[int,int,int] A tuple containing (parameter_value, trek_status, source_status).
Exceptions
TrekError15021 - 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

◆ get_value_int64()

(sample : int  ) -> int

Gets the value of a parameter as a 64-bit signed integer.

get_value() assigned to this function if this type.

Returns
The parameters value.
Exceptions
TrekError15021 - TREK_DATA_WILL_NOT_FIT,

15013 - TREK_DATA_SAMPLE_DOES_NOT_EXIST

◆ get_value_int64_status()

(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.

Returns
Tuple[int,int,int] A tuple containing (parameter_value, trek_status, source_status).
Exceptions
TrekError15021 - 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

◆ get_value_into_trektime()

(time : TrekTime 
sample : int  
) -> None

Get the value of the parameter and places it into the provided TrekTime.

Parameters
[in]timeTrekTime class to place the time.
[in]sampleSpecify the sample number desired. Default value is 1.

◆ get_value_into_trektime_status()

(time : TrekTime 
sample : int  
) -> Tuple[int, int]

Get the value of the parameter and places it into the provided TrekTime.

Parameters
[in]timeTrekTime class to place the time.
[in]sampleSpecify the sample number desired. Default value is 1.
Returns
(trek_status, src_status) Tuple containing status.

◆ get_value_status()

(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()

Parameters
[in]sampleSpecify the sample number desired. Default value is 1.
Returns
Tuple[Union[int,float,str],int,int] A tuple containing (parameter_value, trek_status, source_status). The first value is the Paramater current value. The middle value is the TReK Status Code and the last value is the Source Status Code. These codes can be used by ParameterStatus to provide more information on the Parameter.

◆ get_value_string()

(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.

◆ get_value_string_status()

(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.

Parameters
sampleOptional parameter specify the sample number from which the value is desired.
Returns
Tuple[int,int,int] contains (parameter_value, trek_status, source_status). The first value is the Paramater current value. The middle value is the TReK Status Code and the last value is the Source Status Code. These codes can be used by ParameterStatus to provide more information on the Parameter.

◆ get_value_time()

(sample : int  ) -> float

Gets the value of time parameter as a float.

The Parameter's data type must be either a time type.

Returns
time in fractional seconds past epoch.

◆ get_value_time_status()

(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.

Returns
Tuple[float, int, int] containing, (time, trek_status, source_status). See ParameterStatus.
Exceptions
TrekError15021 - TREK_DATA_WILL_NOT_FIT,

15013 - TREK_DATA_SAMPLE_DOES_NOT_EXIST,

15010 - TREK_DATA_POSSIBLE_LOSS_OF_DATA

◆ get_value_uint32()

(sample : int  ) -> int

Gets the value of a parameter as a 32-bit unsigned integer.

get_value() assigned to this function if this type.

Returns
The parameters value.
Exceptions
TrekError15021 - TREK_DATA_WILL_NOT_FIT,

15013 - TREK_DATA_SAMPLE_DOES_NOT_EXIST

◆ get_value_uint32_status()

(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.

Returns
Tuple[int,int,int] A tuple containing (parameter_value, trek_status, source_status).
Exceptions
TrekError15021 - 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

◆ get_value_uint64()

(sample : int  ) -> int

Gets the value of a parameter as a 64-bit unsigned integer.

get_value() assigned to this function if this type.

Returns
The parameters value.
Exceptions
TrekError15021 - TREK_DATA_WILL_NOT_FIT,

15013 - TREK_DATA_SAMPLE_DOES_NOT_EXIST

◆ get_value_uint64_status()

(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.

Returns
Tuple[int,int,int] A tuple containing (parameter_value, trek_status, source_status).
Exceptions
TrekError15021 - 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

◆ has_enumerator()

() -> bool

Identifies if the parameter currently has an enumerator defined.

Returns
If the parameter has an enumerator.

◆ has_expected_state()

() -> bool

Identifies if the parameter currently has an expected state defined.

Returns
If the parameter has an expected state.

◆ has_limits()

() -> bool

Identifies if the parameter currently has limits defined.

Returns
If parameter has limits.

◆ has_value()

() -> bool

Identifies if the parameter currently has a value.

Returns
If the parameter has a value.

◆ initialize()

() -> None

Initializes the Parameter.

Clears any set values in the Parameter. New Parameter objects do not need to be initialized.

Reimplemented from NamedItem.

◆ is_modifiable()

() -> bool

Identifies if the parameter can be modified.

Returns
True is the parameter can be modified.
Note
A parameter that is not modifiable can still be set if there is no current value.

◆ is_valid()

() -> bool

Checks to see if a parameter is valid.

Returns
If parameter is valid.

◆ is_variable_length()

() -> bool

Identifies if the parameter can have variable length.

Returns
If parameter has a variable length.

◆ load_file()

(filename : str ) -> None

Loads the Parameter definition from the specified file.

Reads an XML Parameter.

Parameters
[in]filenameThe file from which to load the parameter object.

◆ save_file()

(filename : str ) -> None

Saves the Parameter definition to the specified file.

Writes an XML Parameter.

Parameters
[in]filenameThe file to save the parameter object.

◆ set_auto_clear()

(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.

Parameters
[in]auto_clearNew auto_clear value.

◆ set_calibrate_before_alarm_check()

(alarm_flag : bool ) -> None

Sets a flag to indicate if alarm checks are performed prior to or after calibration.

The default value is true.

Parameters
[in]alarm_flagThe new calibrate before sensing option for the parameter.

◆ set_calibrator_switch_set()

(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.

Parameters
[in]cal_switch_setThe new calibrator switch set.
Note
Calibration uses a double precision floating point number in all calculations. Values that cannot be represented may yield invalid results.

◆ set_continue_on_range_error()

(continue_flag : bool  ) -> None

Sets a flag to indicate if processing can continue if a range error is detected.

Parameters
[in]continue_flagIncludes calibration. The default value is false.

◆ set_data_format()

(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().

Parameters
[in]new_formatThe new data format.
Note
Each data type can only have one format. The format controls how it is converted to string using get_value_as_string() or save_file().
Exceptions
TrekError15008 - TREK_DATA_INVALID_DATA_TYPE,

15050 - TREK_DATA_NO_VALUE

◆ set_data_type()

(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.

Parameters
[in]new_typeThe data type for the parameter.
[in]type_sizeThe length in bits.
[in]byte_orderThe byte order.
[in]var_lenIndicates the data can be variable length.
Exceptions
TrekError15017 - 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

Allowable Data Types

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

◆ set_default_calibrator()

(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.

Parameters
[in]calibratorThe new calibrator.

◆ 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).

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.

Parameters
[in]new_highNew high range.
Exceptions
TrekError15001 - TREK_DATA_VALUE_RANGE_ERROR,

15020 - TREK_DATA_INVALID_INPUT_FOR_DATA_TYPE

◆ 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).

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.

Parameters
[in]new_lowNew low range.
Exceptions
TrekError15001 - TREK_DATA_VALUE_RANGE_ERROR,

15020 - TREK_DATA_INVALID_INPUT_FOR_DATA_TYPE

◆ set_engineering_units()

(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.

Parameters
[in]new_unitsThe new units for the parameter (text string describing).

◆ set_enumerator()

(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.

Parameters
[in]enumeratorThe new enumerator. If a enumerator already exists, it will be replaced.

◆ set_enumerator_switch_set()

(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.

Parameters
[in]enum_setThe enumerator switch set.

◆ set_expected_state_alarm()

(alarm : ExpectedStateAlarm ) -> None

Sets the expected state to be used for this parameter.

Parameters
[in]alarmThe new expected state alarm. If one exists it will be replaced and any limits will be deleted.

◆ set_expected_state_alarm_switch_set()

(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.

Parameters
[in]alarm_setThe new limit alarm switched set.

◆ 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.

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.

Parameters
[in]nameThe name of the parameter holding external samples.

◆ set_external_status_parameter()

(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().

Parameters
[in]nameThe name of the parameter holding the external number of samples.

◆ set_full_name()

(new_name : str ) -> None

Sets the full name for the parameter.

Only used internally to TReK.

Parameters
[in]new_nameThe full name for the parameter.

◆ set_high_range_flag()

(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.

Parameters
[in]new_valueThe new high range flag.

◆ 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).

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.

Parameters
[in]new_highNew high range.
Exceptions
TrekError15001 - TREK_DATA_VALUE_RANGE_ERROR,

15020 - TREK_DATA_INVALID_INPUT_FOR_DATA_TYPE

◆ 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).

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.

Parameters
[in]new_lowNew low range.
Exceptions
TrekError15001 - TREK_DATA_VALUE_RANGE_ERROR,

15020 - TREK_DATA_INVALID_INPUT_FOR_DATA_TYPE

◆ set_limit_alarm_switch_set()

(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.

Parameters
[in]alarm_setThe new limit alarm switch set.

◆ set_limits()

(limitalarm : LimitAlarm ) -> None

Sets the limits to be used for this parameter.

Parameters
[in]limitalarmThe new LimitAlarm. Existing will be replaced and will also remove any expected state alarms.
Note
If calibration is available, it will be calibrated before limit checks.

◆ set_low_range_flag()

(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.

Parameters
[in]new_valueNew low range flag.

◆ set_modifiable_flag()

(is_modifiable : bool ) -> None

Sets the modifiable flag for the parameter.

The default value is true.

Parameters
[in]is_modifiableNew modifiable setting.

◆ set_number_of_samples()

(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.

Parameters
[in]num_samplesThe new number of samples of for the parameter.
Exceptions
TrekError15014 - TREK_DATA_INVALID_SAMPLE_NUMBER,

15066 - TREK_DATA_VAR_LEN_NUM_SAMPLE_ERROR

◆ set_number_of_syllables()

(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.

Parameters
[in]num_syllablesThe new number of syllables for the parameter. A value of zero will erase all syllable information and use locations as set_by_start_bit().
Exceptions
TrekError15115 - TREK_DATA_VAR_LEN_SYLLABLE_ERROR

◆ set_parent_packet()

(packet ) -> None

Sets the parent of this parameter to allow look up of external dependencies.

Parameters
[in]packetParent Packet.

◆ set_range_enumerator()

(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.

Parameters
[in]enumeratorThe new enumerator. If a enumerator already exists, it will be replaced.

◆ set_sample_offset()

(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.

Parameters
[in]offsetThe new sample offset for the parameter.

◆ set_start_bit()

(start_bit : int ) -> None

Sets the start location for the parameter as bits.

Bit numbers begin at 0. The default start bit is 0.

Parameters
[in]start_bitThe new start bit for the parameter.

◆ set_syllable_info()

(syll_num : int 
syllable_info : SyllableInfo 
) -> None

Sets the start bit and length for a syllable in a parameter.

Parameters
[in]syll_numThe syllable number to change for the parameter (start at 1).
[in]syllable_infoThe syllable information settings.
Exceptions
TrekError15114 - TREK_DATA_BAD_SYLLABLE_NUMBER

◆ 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).

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.

Parameters
[in]new_highNew high range.
Exceptions
TrekError15001 - TREK_DATA_VALUE_RANGE_ERROR,

15020 - TREK_DATA_INVALID_INPUT_FOR_DATA_TYPE

◆ 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).

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.

Parameters
[in]new_lowNew low range.
Exceptions
TrekError15001 - TREK_DATA_VALUE_RANGE_ERROR,

15020 - TREK_DATA_INVALID_INPUT_FOR_DATA_TYPE

◆ set_value()

(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()

Parameters
[in]new_valueThe new value.
[in]sampleSpecify the sample number desired. Default value is 1.
Returns
value of the appropriate data type.

◆ set_value_bytes()

(new_value : PassedType 
sample : int  
) -> None

Set the value of the parameter with a variable length raw bytes data.

Exceptions
TypeError,ifnew values is not of type bytes.
TrekErrorTREK_DATA_POSSIBLE_LOSS_OF_DATA, TREK_DATA_INVALID_LENGTH_FOR_DATA_TYPE

◆ set_value_double()

(new_value : PassedType 
sample : int  
) -> None

Sets the value of the parameter with a 64-bit floating point.

Exceptions
TrekError15010 - TREK_DATA_POSSIBLE_LOSS_OF_DATA

◆ set_value_from_string()

(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.

Parameters
[in]new_valueThe new value formatted accordingy.
[in]data_formatThe interpreted format.
[in]sample(Optional) Sample number (default is 1).
Exceptions
TrekError15024 - 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 TypeDF_ASCIIDF_BINARYDF_DECIMALDF_SCIENTIFIC*DF_HEX DF_BOOLEANDF_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

◆ set_value_from_trektime()

(time : TrekTime 
sample : int  
) -> None

Sets the value of the parameter from a TrekTime.

Parameters
[in]timeTrekTime to retrieve time from.
[in]sample(Optional) Sample number (default is 1).

◆ set_value_int32()

(new_value : Union[int, float, str, bytes] 
sample : int  
) -> None

Sets the value of the parameter with a 32-bit signed integer.

Parameters
[in]new_valueThe new value.
[in]sampleOptionally provide the sample number.
Exceptions
TrekError15024 - 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

◆ set_value_int64()

(new_value : Union[int, float, str, bytes] 
sample : int  
) -> None

Sets the value of the parameter with a 64-bit signed integer.

Parameters
[in]new_valueThe new value.
[in]sampleOptionally provide the sample number.
Exceptions
TrekError15024 - 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

◆ set_value_string()

(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.

Parameters
[in]new_valueThe new value.
[in]sampleOptionally provide the sample number.
Exceptions
TrekError15024 - 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

◆ set_value_time()

(new_value : PassedType 
sample : int  
) -> None

Sets the value of the parameter with a 64-bit floating point.

Exceptions
TrekError15010 - TREK_DATA_POSSIBLE_LOSS_OF_DATA

◆ set_value_uint32()

(new_value : Union[int, float, str, bytes] 
sample : int  
) -> None

Sets the value of the parameter with a 32-bit unsigned integer.

Parameters
[in]new_valueThe new value.
[in]sampleOptionally provide the sample number.
Exceptions
TrekError15024 - 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

◆ set_value_uint64()

(new_value : PassedType 
sample : int  
) -> None

Sets the value of the parameter with a 64-bit unsigned integer.

Parameters
[in]new_valueThe new value.
[in]sampleOptionally provide the sample number.
Exceptions
TrekError15024 - 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

◆ use_high_range()

() -> bool

Identifies if a high range value is currently in use.

Returns
If high range is in use.

◆ use_low_range()

() -> bool

Identifies if a low range value is currently in use.

Returns
If low range is in use.

◆ validate()

() -> 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.

Returns
Tuple[bool, int, int, str] containing (is_valid, num_errors, num_warnings, error_messages).