class SafetyEnable

August 13, 2019 ยท View on GitHub

Member values

Member nameData typeDescription
handleSafetyHandleHandle to safety to enable or disable
enableboolSafety enable state

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.
enable()boolvoidReturns the current value of enable. If the enable is not set, returns 0.
set_enable()voidboolSets the value of enable. After calling this, enable() will return value.
clear_enable()voidvoidClears the value of enable. After calling this, enable() will return 0.

Parent topic: DeviceConfig (C++)