class SafetyInformation

August 13, 2019 ยท View on GitHub

Member values

Member nameData typeDescription
handleSafetyHandleSafety handle that this information is about
can_change_safety_stateboolTrue if related safety configuration can be modified
has_warning_thresholdboolTrue if safety status can go in Warning
has_error_thresholdboolTrue if safety status can go in Error
limit_typeuint32Safety limit type
default_warning_thresholdfloat32Default warning threshold (if 'limit_type' is either MINIMAL_LIMIT or MAXIMAL_LIMIT and 'has_warning_threshold' is true)
default_error_thresholdfloat32Default error threshold (if 'limit_type' is either MINIMAL_LIMIT or MAXIMAL_LIMIT and 'has_error_threshold' is true)
upper_hard_limitfloat32Maximal threshold value (if 'limit_type' is either MINIMAL_LIMIT or MAXIMAL_LIMIT)
lower_hard_limitfloat32Minimal threshold value (if 'limit_type' is either MINIMAL_LIMIT or MAXIMAL_LIMIT)
statusuint32Current Safety status
unituint32Unit that the safety status is in

Member functions

Function nameReturn typeInput typeDescription
has_handle() constboolvoidReturns true if handle is set.
handle()const SafetyHandle&voidReturns 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 *voidReturns 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()voidvoidClears the value of the field. After calling this, has_handle() will return false and handle() will return the default value.
set_allocated_handle()voidSafetyHandle *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 *voidReleases 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()boolvoidReturns the current value of can_change_safety_state. If the can_change_safety_state is not set, returns 0.
set_can_change_safety_state()voidboolSets the value of can_change_safety_state. After calling this, can_change_safety_state() will return value.
clear_can_change_safety_state()voidvoidClears the value of can_change_safety_state. After calling this, can_change_safety_state() will return 0.
has_warning_threshold()boolvoidReturns the current value of has_warning_threshold. If the has_warning_threshold is not set, returns 0.
set_has_warning_threshold()voidboolSets the value of has_warning_threshold. After calling this, has_warning_threshold() will return value.
clear_has_warning_threshold()voidvoidClears the value of has_warning_threshold. After calling this, has_warning_threshold() will return 0.
has_error_threshold()boolvoidReturns the current value of has_error_threshold. If the has_error_threshold is not set, returns 0.
set_has_error_threshold()voidboolSets the value of has_error_threshold. After calling this, has_error_threshold() will return value.
clear_has_error_threshold()voidvoidClears the value of has_error_threshold. After calling this, has_error_threshold() will return 0.
limit_type() constuint32voidReturns the current value of limit_type. If the limit_type is not set, returns 0.
set_limit_type()voiduint32Sets the value of limit_type. After calling this, limit_type() will return value.
clear_limit_type()voidvoidClears the value of limit_type. After calling this, limit_type() will return the empty string/empty bytes.
default_warning_threshold()float32voidReturns the current value of default_warning_threshold. If the default_warning_threshold is not set, returns 0.
set_default_warning_threshold()voidfloat32Sets the value of default_warning_threshold. After calling this, default_warning_threshold() will return value.
clear_default_warning_threshold()voidvoidClears the value of default_warning_threshold. After calling this, default_warning_threshold() will return 0.
default_error_threshold()float32voidReturns the current value of default_error_threshold. If the default_error_threshold is not set, returns 0.
set_default_error_threshold()voidfloat32Sets the value of default_error_threshold. After calling this, default_error_threshold() will return value.
clear_default_error_threshold()voidvoidClears the value of default_error_threshold. After calling this, default_error_threshold() will return 0.
upper_hard_limit()float32voidReturns the current value of upper_hard_limit. If the upper_hard_limit is not set, returns 0.
set_upper_hard_limit()voidfloat32Sets the value of upper_hard_limit. After calling this, upper_hard_limit() will return value.
clear_upper_hard_limit()voidvoidClears the value of upper_hard_limit. After calling this, upper_hard_limit() will return 0.
lower_hard_limit()float32voidReturns the current value of lower_hard_limit. If the lower_hard_limit is not set, returns 0.
set_lower_hard_limit()voidfloat32Sets the value of lower_hard_limit. After calling this, lower_hard_limit() will return value.
clear_lower_hard_limit()voidvoidClears the value of lower_hard_limit. After calling this, lower_hard_limit() will return 0.
status() constuint32voidReturns the current value of status. If the status is not set, returns 0.
set_status()voiduint32Sets the value of status. After calling this, status() will return value.
clear_status()voidvoidClears the value of status. After calling this, status() will return the empty string/empty bytes.
unit() constuint32voidReturns the current value of unit. If the unit is not set, returns 0.
set_unit()voiduint32Sets the value of unit. After calling this, unit() will return value.
clear_unit()voidvoidClears the value of unit. After calling this, unit() will return the empty string/empty bytes.

Parent topic: DeviceConfig (C++)