|
Telescience Resource Kit
TReK Python
5.4.0 ART
|
This class describes the status associated with a parameter value. More...
Public Member Functions | |
Initialize / Finalize | |
Functions handling class initialization and destruction. | |
def | ParameterStatus (trek_status: int=0, src_status: int=0 -> None ) -> def |
Class initializer. More... | |
def | copy (copy_from: object -> None ) -> def |
Copies the contents of the provided 'copy_from' ParameterStatus into this ParameterStatus. More... | |
Manage Status | |
Functions used for setting/getting/resetting status. | |
def | clear_all_limits ( -> None ) -> def |
Clears all bits assoicated with low, high, and delta limits status. | |
def | clear_all_expected_states ( -> None ) -> def |
Clears all bits assoicated with expected states in the status. | |
def | get_source_status ( -> int ) -> def |
Gets the current source status value. More... | |
def | get_status_string ( -> str ) -> def |
Returns the status as a string. More... | |
def | get_trek_status ( -> int ) -> def |
Gets the current TReK status value. More... | |
def | reset ( -> None ) -> def |
Resets the parameter status values to zero. | |
def | reset_source_status ( -> None ) -> def |
Resets the source status value to zero. | |
def | reset_trek_status ( -> None ) -> def |
Resets the TReK status value to zero. | |
def | set_status (trek_status: int, src_status: int -> None ) -> def |
Sets the status with two integers. More... | |
Check Error Conditions | |
Functions that check the error conditions by bit or class of bits. | |
def | has_calibration_error ( -> bool ) -> def |
Determines if there is a calbration error. More... | |
def | has_delta_limit_error ( -> bool ) -> def |
Determines if a delta limit error is set. More... | |
def | has_expected_state_error ( -> bool ) -> def |
Determines if there is an expected state error. More... | |
def | has_high_limit_error ( -> bool ) -> def |
Determines if a high limit error is set. More... | |
def | has_level1_delta_limit_error ( -> bool ) -> def |
Determines if there is a level 1 delta limit error. More... | |
def | has_level1_high_limit_error ( -> bool ) -> def |
Determines if there is a level 1 high limit error. More... | |
def | has_level1_low_limit_error ( -> bool ) -> def |
Determines if there is a level 1 low limit error. More... | |
def | has_level2_delta_limit_error ( -> bool ) -> def |
Determines if there is a level 2 delta limit error. More... | |
def | has_level2_high_limit_error ( -> bool ) -> def |
Determines if there is a level 2 high limit error. More... | |
def | has_level2_low_limit_error ( -> bool ) -> def |
Determines if there is a level 2 low limit error. More... | |
def | has_level3_delta_limit_error ( -> bool ) -> def |
Determines if there is a level 3 delta limit error. More... | |
def | has_level3_high_limit_error ( -> bool ) -> def |
Determines if there is a level 3 high limit error. More... | |
def | has_level3_low_limit_error ( -> bool ) -> def |
Determines if there is a level 3 low limit error. More... | |
def | has_level4_delta_limit_error ( -> bool ) -> def |
Determines if there is a level 4 delta limit error. More... | |
def | has_level4_high_limit_error ( -> bool ) -> def |
Determines if there is a level 4 high limit error. More... | |
def | has_level4_low_limit_error ( -> bool ) -> def |
Determines if there is a level 4 low limit error. More... | |
def | has_level5_delta_limit_error ( -> bool ) -> def |
Determines if there is a level 5 delta limit error. More... | |
def | has_level5_high_limit_error ( -> bool ) -> def |
Determines if there is a level 5 high limit error. More... | |
def | has_level5_low_limit_error ( -> bool ) -> def |
Determines if there is a level 5 low limit error. More... | |
def | has_limit_error ( -> bool ) -> def |
Determines if any limit error is set. More... | |
def | has_low_limit_error ( -> bool ) -> def |
Determines if a low limit error is set. More... | |
def | has_range_error ( -> bool ) -> def |
Determines if there is a range error. More... | |
def | has_source_caution_limit ( -> bool ) -> def |
Determines if the source data indicates a caution limit. More... | |
def | has_source_warning_limit ( -> bool ) -> def |
Determines if the source data indicates a warning limit. More... | |
def | has_stale_data ( -> bool ) -> def |
Determines if the data is stale. More... | |
def | has_trek_error ( -> bool ) -> def |
Determines if there is any TReK error. More... | |
Flag Error Conditions | |
Functions that set the error condition bits. | |
def | set_alarm_switch_error ( -> None ) -> def |
Sets the status bit to indicate that an alarm switch error occurred. More... | |
def | set_calibration_general_error ( -> None ) -> def |
Sets the status bit to indicate that a calibration error has occured. More... | |
def | set_calibration_illegal_datatype_error ( -> None ) -> def |
Sets the status bit to indicate that an illegal data type for calibration error has occured. More... | |
def | set_calibration_switch_error ( -> None ) -> def |
Sets the status bit to indicate that a calibration switch error occurred. More... | |
def | set_conversion_error ( -> None ) -> def |
Sets the status bit to indicate that a conversion error has occured. More... | |
def | set_data_loss_possible_error ( -> None ) -> def |
Sets the status bit to indicate that data may have been lost (e.g., getting a float value as an integer). More... | |
def | set_data_quality_bad_length_error ( -> None ) -> def |
Sets the status bit to indicate that a length error has occured. More... | |
def | set_data_quality_checksum_error ( -> None ) -> def |
Sets the status bit to indicate that a checksum error has occured. More... | |
def | set_expected_state_error ( -> None ) -> def |
Sets the status bit to indicate that an expected state error has occured. More... | |
def | set_high_range_error ( -> None ) -> def |
Sets the status bit to indicate that a high range error has occured. More... | |
def | set_level1_delta_limit ( -> None ) -> def |
Sets the status bit to indicate that a level 1 delta error has occured. More... | |
def | set_level1_high_limit ( -> None ) -> def |
Sets the status bit to indicate that a level 1 high error has occured. More... | |
def | set_level1_low_limit ( -> None ) -> def |
Sets the status bit to indicate that a level 1 low error has occured. More... | |
def | set_level2_delta_limit ( -> None ) -> def |
Sets the status bit to indicate that a level 2 delta error has occured. More... | |
def | set_level2_high_limit ( -> None ) -> def |
Sets the status bit to indicate that a level 2 high error has occured. More... | |
def | set_level2_low_limit ( -> None ) -> def |
Sets the status bit to indicate that a level 2 low error has occured. More... | |
def | set_level3_delta_limit ( -> None ) -> def |
Sets the status bit to indicate that a level 3 delta error has occured. More... | |
def | set_level3_high_limit ( -> None ) -> def |
Sets the status bit to indicate that a level 3 high error has occured. More... | |
def | set_level3_low_limit ( -> None ) -> def |
Sets the status bit to indicate that a level 3 low error has occured. More... | |
def | set_level4_delta_limit ( -> None ) -> def |
Sets the status bit to indicate that a level 4 delta error has occured. More... | |
def | set_level4_high_limit ( -> None ) -> def |
Sets the status bit to indicate that a level 4 high error has occured. More... | |
def | set_level4_low_limit ( -> None ) -> def |
Sets the status bit to indicate that a level 4 low error has occured. More... | |
def | set_level5_delta_limit ( -> None ) -> def |
Sets the status bit to indicate that a level 5 delta error has occured. More... | |
def | set_level5_high_limit ( -> None ) -> def |
Sets the status bit to indicate that a level 5 high error has occured. More... | |
def | set_level5_low_limit ( -> None ) -> def |
Sets the status bit to indicate that a level 5 low error has occured. More... | |
def | set_low_range_error ( -> None ) -> def |
Sets the status bit to indicate that a low range error has occured. More... | |
def | set_processing_error ( -> None ) -> def |
Sets the status bit to indicate that a processing error has occured. More... | |
def | set_source_status_as_string (interp: bool -> None ) -> def |
Sets whether or not the source status is interpreted as characters. More... | |
def | set_source_status_error (error_mask: int -> None ) -> def |
Sets the source status. More... | |
def | set_stale_data ( -> None ) -> def |
Sets the status bit to indicate that data is stale. More... | |
This class describes the status associated with a parameter value.
The parameter status is a series of bit fields and associated status characters that describe important processing information with a parameter's value.
( | trek_status | : int | |
src_status | : int | ||
) | -> None |
Class initializer.
[in] | trek_status | Initial TReK status. |
[in] | src_status | Initial source status. |
( | copy_from | : object | ) | -> None |
Copies the contents of the provided 'copy_from' ParameterStatus into this ParameterStatus.
[in] | copy_from | ParameterStatus to copy from. |
TypeError | if 'copy_from' is not a ParameterStatus. |
( | ) | -> int |
Gets the current source status value.
( | ) | -> str |
Returns the status as a string.
The returned string will be in the format of XXX(YYY) where XXX is zero or more status characters corresponding to the TReK status and YYY is is the status source status value. See set_source_as_string() for more information on the format. Source status characters, if available, are defined by the source of the data. If no source status is available or the status is 'ok', the parentheses enclosing the source status characters are omitted. If no error of any kind occurs, an empty string is returned.
Status bits that are "levels" are mutually exclusive (e.g., only one "High" error can be returned). Level 5 is considered the most severe error and is returned first. Level 1 is considered the least severe error and is returned only if no other levels of errors are detected.
Character | Meaning | Character | Meaning | Character | Meaning |
---|---|---|---|---|---|
0 | Level 1 Low Limit | & | Level 1 High Limit | 0 | Level 1 Delta Limit |
- | Level 2 Low Limit | + | Level 2 High Limit | - | Level 2 Delta Limit |
v | Level 3 Low Limit | ^ | Level 3 High Limit | d | Level 3 Limit |
L | Level 4 Low Limit | H | Level 4 High Limit | D | Level 4 Delta Limit |
$ | Level 5 Low Limit | * | Level 5 High Limit | Q | Level 5 Delta Limit |
S | Data is stale; value already retrieved. | X | Alarm switch error. | ? | Possible loss of data. |
p | Processing error. | l | Bad length detected. | c | Calibration error. |
k | Bad checksum detected. | c | Calibration error. | C | Conversion error. |
t | Data type conversion representation. | r | Low range error. | R | High rangeData type conversion representation. |
E | Expected state error. |
( | ) | -> int |
Gets the current TReK status value.
( | ) | -> bool |
Determines if there is a calbration error.
( | ) | -> bool |
Determines if a delta limit error is set.
( | ) | -> bool |
Determines if there is an expected state error.
( | ) | -> bool |
Determines if a high limit error is set.
( | ) | -> bool |
Determines if there is a level 1 delta limit error.
( | ) | -> bool |
Determines if there is a level 1 high limit error.
( | ) | -> bool |
Determines if there is a level 1 low limit error.
( | ) | -> bool |
Determines if there is a level 2 delta limit error.
( | ) | -> bool |
Determines if there is a level 2 high limit error.
( | ) | -> bool |
Determines if there is a level 2 low limit error.
( | ) | -> bool |
Determines if there is a level 3 delta limit error.
( | ) | -> bool |
Determines if there is a level 3 high limit error.
( | ) | -> bool |
Determines if there is a level 3 low limit error.
( | ) | -> bool |
Determines if there is a level 4 delta limit error.
( | ) | -> bool |
Determines if there is a level 4 high limit error.
( | ) | -> bool |
Determines if there is a level 4 low limit error.
( | ) | -> bool |
Determines if there is a level 5 delta limit error.
( | ) | -> bool |
Determines if there is a level 5 high limit error.
( | ) | -> bool |
Determines if there is a level 5 low limit error.
( | ) | -> bool |
Determines if any limit error is set.
( | ) | -> bool |
Determines if a low limit error is set.
( | ) | -> bool |
Determines if there is a range error.
( | ) | -> bool |
Determines if the source data indicates a caution limit.
( | ) | -> bool |
Determines if the source data indicates a warning limit.
( | ) | -> bool |
Determines if the data is stale.
( | ) | -> bool |
Determines if there is any TReK error.
( | ) | -> None |
Sets the status bit to indicate that an alarm switch error occurred.
The bit correlating to the error is set. get_status_string() will return "X", the ALARM_SWITCH_ERROR_STATUS_CHAR as part of the status string.
( | ) | -> None |
Sets the status bit to indicate that a calibration error has occured.
The bit correlating to the error is set. get_status_string() will return "K", the CAL_GENERAL_ERROR_STATUS_CHAR as part of the status string.
( | ) | -> None |
Sets the status bit to indicate that an illegal data type for calibration error has occured.
The bit correlating to the error is set. get_status_string() will return "t", the CAL_ILLEGAL_DATATYPE_STATUS_CHAR as part of the status string.
( | ) | -> None |
Sets the status bit to indicate that a calibration switch error occurred.
The bit correlating to the error is set. get_status_string() will return "c", the CAL_SWITCH_ERROR_STATUS_CHAR as part of the status string.
( | ) | -> None |
Sets the status bit to indicate that a conversion error has occured.
The bit correlating to the error is set. get_status_string() will return "C", the CONVERSION_ERROR_STATUS_CHAR as part of the status string.
( | ) | -> None |
Sets the status bit to indicate that data may have been lost (e.g., getting a float value as an integer).
The bit correlating to the error is set. get_status_string() will return "?", the DATA_LOSS_POSSIBLE_STATUS_CHAR as part of the status string.
( | ) | -> None |
Sets the status bit to indicate that a length error has occured.
The bit correlating to the error is set. get_status_string() will return "l", the DQ_BAD_LENGTH_ERROR_STATUS_CHAR as part of the status string.
( | ) | -> None |
Sets the status bit to indicate that a checksum error has occured.
The bit correlating to the error is set. get_status_string() will return "k", the DQ_CHECKSUM_ERROR_STATUS_CHAR as part of the status string.
( | ) | -> None |
Sets the status bit to indicate that an expected state error has occured.
The bit correlating to the error is set. get_status_string() will return "E", the EXPECTED_STATE_ERROR_CHAR as part of the status string.
( | ) | -> None |
Sets the status bit to indicate that a high range error has occured.
The bit correlating to the error is set. get_status_string() will return "R", the HIGH_RANGE_STATUS_CHAR as part of the status string.
( | ) | -> None |
Sets the status bit to indicate that a level 1 delta error has occured.
The bit correlating to the error is set. get_status_string() will return "@", the LEVEL_1_DELTA_LIMIT_STATUS_CHAR as part of the status string.
( | ) | -> None |
Sets the status bit to indicate that a level 1 high error has occured.
The bit correlating to the error is set. get_status_string() will return "&", the LEVEL_1_HIGH_LIMIT_STATUS_CHAR as part of the status string.
( | ) | -> None |
Sets the status bit to indicate that a level 1 low error has occured.
The bit correlating to the error is set. get_status_string() will return "0", the LEVEL_1_LOW_LIMIT_STATUS_CHAR as part of the status string.
( | ) | -> None |
Sets the status bit to indicate that a level 2 delta error has occured.
The bit correlating to the error is set. get_status_string() will return "#", the LEVEL_2_DELTA_LIMIT_STATUS_CHAR as part of the status string.
( | ) | -> None |
Sets the status bit to indicate that a level 2 high error has occured.
The bit correlating to the error is set. get_status_string() will return "+", the LEVEL_2_HIGH_LIMIT_STATUS_CHAR as part of the status string.
( | ) | -> None |
Sets the status bit to indicate that a level 2 low error has occured.
The bit correlating to the error is set. get_status_string() will return "-", the LEVEL_2_LOW_LIMIT_STATUS_CHAR as part of the status string.
( | ) | -> None |
Sets the status bit to indicate that a level 3 delta error has occured.
The bit correlating to the error is set. get_status_string() will return the LEVEL_3_DELTA_LIMIT_STATUS_CHAR as part of the status string.
( | ) | -> None |
Sets the status bit to indicate that a level 3 high error has occured.
The bit correlating to the error is set. get_status_string() will return "d", the LEVEL_3_HIGH_LIMIT_STATUS_CHAR as part of the status string.
( | ) | -> None |
Sets the status bit to indicate that a level 3 low error has occured.
The bit correlating to the error is set. get_status_string() will return "v", the LEVEL_3_LOW_LIMIT_STATUS_CHAR as part of the status string.
( | ) | -> None |
Sets the status bit to indicate that a level 4 delta error has occured.
The bit correlating to the error is set. get_status_string() will return "D", the LEVEL_4_DELTA_LIMIT_STATUS_CHAR as part of the status string.
( | ) | -> None |
Sets the status bit to indicate that a level 4 high error has occured.
The bit correlating to the error is set. get_status_string() will return "H", the LEVEL_4_HIGH_LIMIT_STATUS_CHAR as part of the status string.
( | ) | -> None |
Sets the status bit to indicate that a level 4 low error has occured.
The bit correlating to the error is set. get_status_string() will return "L", the LEVEL_4_LOW_LIMIT_STATUS_CHAR as part of the status string.
( | ) | -> None |
Sets the status bit to indicate that a level 5 delta error has occured.
The bit correlating to the error is set. get_status_string() will return "Q", the LEVEL_5_DELTA_LIMIT_STATUS_CHAR as part of the status string.
( | ) | -> None |
Sets the status bit to indicate that a level 5 high error has occured.
The bit correlating to the error is set. get_status_string() will return "*", the LEVEL_5_HIGH_LIMIT_STATUS_CHAR as part of the status string.
( | ) | -> None |
Sets the status bit to indicate that a level 5 low error has occured.
The bit correlating to the error is set. get_status_string() will return "$", the LEVEL_5_LOW_LIMIT_STATUS_CHAR as part of the status string.
( | ) | -> None |
Sets the status bit to indicate that a low range error has occured.
The bit correlating to the error is set. get_status_string() will return "r", the LOW_RANGE_STATUS_CHAR as part of the status string.
( | ) | -> None |
Sets the status bit to indicate that a processing error has occured.
The bit correlating to the error is set. get_status_string() will return "p", the PROCESSING_ERROR_STATUS_CHAR as part of the status string.
( | interp | : bool | ) | -> None |
Sets whether or not the source status is interpreted as characters.
Sets how the source status should be interpreted. If true, each byte of the source status is interpreted as an ASCII character. If false, the source status is interpretend as an unsigned integer and the unsigned integer value displayed in the status string.
[in] | interp | Set how status should be interpreted. |
( | error_mask | : int | ) | -> None |
Sets the source status.
If the errors can be intepreted as characters, get_status_string() will return the source status characters as part of the status string.
[in] | error_mask | Error mask. |
( | ) | -> None |
Sets the status bit to indicate that data is stale.
The bit correlating to the error is set. get_status_string() will return "S", the STALE_STATUS_CHAR as part of the status string.
( | trek_status | : int | |
src_status | : int | ||
) | -> None |
Sets the status with two integers.
[in] | trek_status | The new TReK status. |
[in] | src_status | The new source status. |