class SafetyInformation
August 13, 2019 ยท View on GitHub
Member values
| Member name | Data type | Description |
|---|---|---|
| handle | SafetyHandle | Safety handle that this information is about |
| can_change_safety_state | bool | True if related safety configuration can be modified |
| has_warning_threshold | bool | True if safety status can go in Warning |
| has_error_threshold | bool | True if safety status can go in Error |
| limit_type | uint32 | Safety limit type |
| default_warning_threshold | float32 | Default warning threshold (if 'limit_type' is either MINIMAL_LIMIT or MAXIMAL_LIMIT and 'has_warning_threshold' is true) |
| default_error_threshold | float32 | Default error threshold (if 'limit_type' is either MINIMAL_LIMIT or MAXIMAL_LIMIT and 'has_error_threshold' is true) |
| upper_hard_limit | float32 | Maximal threshold value (if 'limit_type' is either MINIMAL_LIMIT or MAXIMAL_LIMIT) |
| lower_hard_limit | float32 | Minimal threshold value (if 'limit_type' is either MINIMAL_LIMIT or MAXIMAL_LIMIT) |
| status | uint32 | Current Safety status |
| unit | uint32 | Unit that the safety status is in |
Member functions
| Function name | Return type | Input type | Description |
|---|---|---|---|
| has_handle() const | bool | void | Returns true if handle is set. |
| handle() | const SafetyHandle& | void | Returns the current value of handle. If handle is not set, returns a SafetyHandle with none of its fields set (possibly handle::default_instance()). |
| mutable_handle() | SafetyHandle * | void | Returns a pointer to the mutable SafetyHandle object that stores the field's value. If the field was not set prior to the call, then the returned SafetyHandle will have none of its fields set (i.e. it will be identical to a newly-allocated SafetyHandle). After calling this, has_handle() will return true and handle() will return a reference to the same instance of SafetyHandle. |
| clear_handle() | void | void | Clears the value of the field. After calling this, has_handle() will return false and handle() will return the default value. |
| set_allocated_handle() | void | SafetyHandle * | Sets the SafetyHandle object to the field and frees the previous field value if it exists. If the SafetyHandle pointer is not NULL, the message takes ownership of the allocated SafetyHandle object and has_ SafetyHandle() will return true. Otherwise, if the handle is NULL, the behavior is the same as calling clear_handle(). |
| release_handle() | SafetyHandle * | void | Releases the ownership of the field and returns the pointer of the SafetyHandle object. After calling this, caller takes the ownership of the allocated SafetyHandle object, has_handle() will return false, and handle() will return the default value. |
| can_change_safety_state() | bool | void | Returns the current value of can_change_safety_state. If the can_change_safety_state is not set, returns 0. |
| set_can_change_safety_state() | void | bool | Sets the value of can_change_safety_state. After calling this, can_change_safety_state() will return value. |
| clear_can_change_safety_state() | void | void | Clears the value of can_change_safety_state. After calling this, can_change_safety_state() will return 0. |
| has_warning_threshold() | bool | void | Returns the current value of has_warning_threshold. If the has_warning_threshold is not set, returns 0. |
| set_has_warning_threshold() | void | bool | Sets the value of has_warning_threshold. After calling this, has_warning_threshold() will return value. |
| clear_has_warning_threshold() | void | void | Clears the value of has_warning_threshold. After calling this, has_warning_threshold() will return 0. |
| has_error_threshold() | bool | void | Returns the current value of has_error_threshold. If the has_error_threshold is not set, returns 0. |
| set_has_error_threshold() | void | bool | Sets the value of has_error_threshold. After calling this, has_error_threshold() will return value. |
| clear_has_error_threshold() | void | void | Clears the value of has_error_threshold. After calling this, has_error_threshold() will return 0. |
| limit_type() const | uint32 | void | Returns the current value of limit_type. If the limit_type is not set, returns 0. |
| set_limit_type() | void | uint32 | Sets the value of limit_type. After calling this, limit_type() will return value. |
| clear_limit_type() | void | void | Clears the value of limit_type. After calling this, limit_type() will return the empty string/empty bytes. |
| default_warning_threshold() | float32 | void | Returns the current value of default_warning_threshold. If the default_warning_threshold is not set, returns 0. |
| set_default_warning_threshold() | void | float32 | Sets the value of default_warning_threshold. After calling this, default_warning_threshold() will return value. |
| clear_default_warning_threshold() | void | void | Clears the value of default_warning_threshold. After calling this, default_warning_threshold() will return 0. |
| default_error_threshold() | float32 | void | Returns the current value of default_error_threshold. If the default_error_threshold is not set, returns 0. |
| set_default_error_threshold() | void | float32 | Sets the value of default_error_threshold. After calling this, default_error_threshold() will return value. |
| clear_default_error_threshold() | void | void | Clears the value of default_error_threshold. After calling this, default_error_threshold() will return 0. |
| upper_hard_limit() | float32 | void | Returns the current value of upper_hard_limit. If the upper_hard_limit is not set, returns 0. |
| set_upper_hard_limit() | void | float32 | Sets the value of upper_hard_limit. After calling this, upper_hard_limit() will return value. |
| clear_upper_hard_limit() | void | void | Clears the value of upper_hard_limit. After calling this, upper_hard_limit() will return 0. |
| lower_hard_limit() | float32 | void | Returns the current value of lower_hard_limit. If the lower_hard_limit is not set, returns 0. |
| set_lower_hard_limit() | void | float32 | Sets the value of lower_hard_limit. After calling this, lower_hard_limit() will return value. |
| clear_lower_hard_limit() | void | void | Clears the value of lower_hard_limit. After calling this, lower_hard_limit() will return 0. |
| status() const | uint32 | void | Returns the current value of status. If the status is not set, returns 0. |
| set_status() | void | uint32 | Sets the value of status. After calling this, status() will return value. |
| clear_status() | void | void | Clears the value of status. After calling this, status() will return the empty string/empty bytes. |
| unit() const | uint32 | void | Returns the current value of unit. If the unit is not set, returns 0. |
| set_unit() | void | uint32 | Sets the value of unit. After calling this, unit() will return value. |
| clear_unit() | void | void | Clears the value of unit. After calling this, unit() will return the empty string/empty bytes. |
Parent topic: DeviceConfig (C++)