|
Libraries
|
Classes | |
| struct | trek::packet_identifier_struct |
| Structure of information needed for identifier parameters. More... | |
| class | trek::SwitchSet |
| This class is the abstraction for sets of information that can be switched by the value of a parameter. More... | |
Typedefs | |
| typedef enum identifier_types | identifier_types |
| Enumeration of types of identifiers. | |
Functions | |
| int32_t | trek::SwitchSet::SetDefaultSetName (const char *name) |
| Sets the default set name. More... | |
| const char * | trek::SwitchSet::GetDefaultSetName () |
| Gets the default set name. More... | |
| int32_t | trek::SwitchSet::SetSwitchParameterName (const char *name) |
| Sets the name of the parameter to use as a switch. More... | |
| const char * | trek::SwitchSet::GetSwitchParameterName () |
| Gets the default set name. More... | |
| void | trek::SwitchSet::SetSwitchType (switch_type input) |
| Sets the type of switch to use. More... | |
| switch_type | trek::SwitchSet::GetSwitchType () |
| Returns the current switch type. More... | |
| int32_t | trek::SwitchSet::SetSwitchParameter (Parameter *input_ptr) |
| Sets the parameter to use for switching. More... | |
| int32_t | trek::SwitchSet::AddRangeSwitch (double low, double high, const char *name) |
| Adds a range switch. More... | |
| int32_t | trek::SwitchSet::AddEnumerationSwitch (const char *enum_name, const char *name) |
| Adds an enumeration switch. More... | |
| int32_t | trek::SwitchSet::DeleteRangeSwitch (double low) |
| Deletes the specified range switch. More... | |
| int32_t | trek::SwitchSet::DeleteEnumerationSwitch (const char *enum_name) |
| Deletes the specified enumeration switch. More... | |
| int32_t | trek::SwitchSet::GetRangeSwitches (double **input, uint32_t &array_size) |
| Gets the low value for each range switch. More... | |
| void | trek::SwitchSet::GetEnumerationSwitches (StringArray &input) |
| Gets the enumeration values for the switch. More... | |
| int32_t | trek::SwitchSet::GetRangeSwitchInfo (double low, double &high, char **name) |
| Gets the high value and name for a range switch based on its low value. More... | |
| int32_t | trek::SwitchSet::GetEnumerationInfo (const char *enum_name, char **name) |
| Gets the name for a switch based on its enumerated value. More... | |
| int32_t | trek::SwitchSet::Validate () |
| Determines if it is safe to use the switched set. More... | |
| const char * | trek::SwitchSet::GetValidationErrors () |
| Gets a string of the last validation errors. More... | |
| void | trek::SwitchSet::GetItemNames (StringArray &input) |
| Retrieves an array of the (e.g., calibrator) names from the set. More... | |
Constructors, Destructor, and Other Basic Methods | |
| trek::SwitchSet::SwitchSet () | |
| Default constructor of the class. | |
| trek::SwitchSet::SwitchSet (SwitchSet &input) | |
| Copy constructor of the class. | |
| virtual | trek::SwitchSet::~SwitchSet () |
| Class destructor. More... | |
| void | trek::SwitchSet::operator= (SwitchSet &right_side) |
| Provides the equal operator. | |
| virtual void | trek::SwitchSet::Init () |
| Initializes the object. | |
| enum byte_order_type |
Byte order enumeration.
| enum identifier_types |
| enum trek::limit_type |
Enumeration of limit types allowed.
Enumeration of all valid data formats for TReK values as strings.
Enumeration of all valid data types for TReK.
| enum trek::switch_type |
Enumeration of switch types.
| Enumerator | |
|---|---|
| RANGE_SWITCH | Range switch (low < value <= high) |
| ENUMERATION_SWITCH | Enumerator switch (value == "string") |
| int32_t trek::SwitchSet::AddEnumerationSwitch | ( | const char * | enum_name, |
| const char * | name | ||
| ) |
Adds an enumeration switch.
Adds the specified enumeration switch. Checks are performed to make sure the specified enumeration does not already exist.
| [in] | enum_name | The enumerated value to use for switching. |
| [in] | name | The name of the item to switch to when the switch parameter has the specified enumeration. |
Example:
| int32_t trek::SwitchSet::AddRangeSwitch | ( | double | low, |
| double | high, | ||
| const char * | name | ||
| ) |
Adds a range switch.
Adds the specified range switch. Checks are performed to make sure the specified range does not overlap with a current range. Ranges are evaluated by low < value <= high.
| [in] | low | The low value for the range. |
| [in] | high | The high value for the range. |
| [in] | name | The name of the item to switch to when the switch parameter falls within the range. |
Example:
| int32_t trek::SwitchSet::DeleteEnumerationSwitch | ( | const char * | enum_name | ) |
Deletes the specified enumeration switch.
| [in] | enum_name | The enumerated value to delete. |
Example:
| int32_t trek::SwitchSet::DeleteRangeSwitch | ( | double | low | ) |
Deletes the specified range switch.
Only need to specify the low range as ranges are not allowed to overlap.
| [in] | low | The low range of the switch to delete. |
Example:
| const char * trek::SwitchSet::GetDefaultSetName | ( | ) |
Gets the default set name.
Example:
| int32_t trek::SwitchSet::GetEnumerationInfo | ( | const char * | enum_name, |
| char ** | name | ||
| ) |
Gets the name for a switch based on its enumerated value.
All of the enumerations can be found by calling GetEnumerationSwitches. The caller of the function is responsible for deleting the memory that is created.
| [in] | enum_name | The enumerated value to search for |
| [out] | name | The name of the item when switch is valid. |
Example:
| void trek::SwitchSet::GetEnumerationSwitches | ( | StringArray & | input | ) |
Gets the enumeration values for the switch.
The input array will be cleared prior to values being added.
| [out] | input | Will contain all of the enumerated values for the switch. |
Example:
| void trek::SwitchSet::GetItemNames | ( | StringArray & | input | ) |
Retrieves an array of the (e.g., calibrator) names from the set.
| [in] | input | The array to set. Previous items will be cleared. |
Example:
| int32_t trek::SwitchSet::GetRangeSwitches | ( | double ** | input, |
| uint32_t & | array_size | ||
| ) |
Gets the low value for each range switch.
The low range returned can be used to access details about each range by calling GetRangeSwitchInfo. The caller of the function is responsible for deleting the memory that is created.
| [out] | input | This value will contain an array of doubles that are the low value. |
| [out] | array_size | The number of values returned. |
Example:
| int32_t trek::SwitchSet::GetRangeSwitchInfo | ( | double | low, |
| double & | high, | ||
| char ** | name | ||
| ) |
Gets the high value and name for a range switch based on its low value.
All of the low ranges can be found by calling GetRangeSwitches. The caller of the function is responsible for deleting the memory that is created.
| [in] | low | The low value to search for |
| [out] | high | The corresponding low value. |
| [out] | name | The name of the item when switch is valid. |
Example:
| const char * trek::SwitchSet::GetSwitchParameterName | ( | ) |
Gets the default set name.
Example:
| switch_type trek::SwitchSet::GetSwitchType | ( | ) |
Returns the current switch type.
Example:
| const char * trek::SwitchSet::GetValidationErrors | ( | ) |
Gets a string of the last validation errors.
| int32_t trek::SwitchSet::SetDefaultSetName | ( | const char * | name | ) |
Sets the default set name.
The name of the item (e.g., calibrator) to use if no other set can be identified by switching.
| [in] | name | The name of the set. |
Example:
| int32_t trek::SwitchSet::SetSwitchParameter | ( | Parameter * | input_ptr | ) |
Sets the parameter to use for switching.
| [in] | input_ptr | A valid reference to a parameter in a packet. |
| int32_t trek::SwitchSet::SetSwitchParameterName | ( | const char * | name | ) |
Sets the name of the parameter to use as a switch.
| [in] | name | The name of the switch parameter. |
Example:
| void trek::SwitchSet::SetSwitchType | ( | switch_type | input | ) |
Sets the type of switch to use.
| input | The new switch type |
Example:
| int32_t trek::SwitchSet::Validate | ( | ) |
Determines if it is safe to use the switched set.
Insures that class is properly configured. Safe to use if 0 is returned.
Example:
|
virtual |
Class destructor.
Removes all resources created with this instance of the class.