AgIsoStack++
A control-function-focused implementation of the major ISOBUS and J1939 protocols
|
A wrapper for a DDOP value which tells you if the value was actually supplied by the DDOP. More...
#include <isobus_device_descriptor_object_pool_helpers.hpp>
Public Member Functions | |
ObjectPoolValue ()=default | |
Default constructor for ObjectPoolValue which defaults the value to being non-existant and not settable. | |
operator bool () const | |
overloads the bool operator so that you can check for this value's existence by doing if(thisObject) | |
bool | exists () const |
Returns if this variable exists. A variable exists if it was either provided in the DDOP, or has been set manually as part of a DPD value command. | |
bool | editable () const |
Returns if this value is editable. DPDs are editable. DPTs are not. | |
std::int32_t | get () const |
Returns the value. If the value doesn't exist this will return 0. | |
Protected Attributes | |
std::int32_t | value = 0 |
The value being wrapped by this object. | |
bool | isValuePresent = false |
Stores if the value has ever been set. | |
bool | isSettable = false |
Stores if the value can be set, such as on a DPD's value. | |
Friends | |
class | DeviceDescriptorObjectPoolHelper |
Allow our helper to change the values. | |
A wrapper for a DDOP value which tells you if the value was actually supplied by the DDOP.
Definition at line 30 of file isobus_device_descriptor_object_pool_helpers.hpp.
bool isobus::DeviceDescriptorObjectPoolHelper::ObjectPoolValue::editable | ( | ) | const |
Returns if this value is editable. DPDs are editable. DPTs are not.
Definition at line 25 of file isobus_device_descriptor_object_pool_helpers.cpp.
bool isobus::DeviceDescriptorObjectPoolHelper::ObjectPoolValue::exists | ( | ) | const |
Returns if this variable exists. A variable exists if it was either provided in the DDOP, or has been set manually as part of a DPD value command.
Definition at line 20 of file isobus_device_descriptor_object_pool_helpers.cpp.
std::int32_t isobus::DeviceDescriptorObjectPoolHelper::ObjectPoolValue::get | ( | ) | const |
Returns the value. If the value doesn't exist this will return 0.
Definition at line 30 of file isobus_device_descriptor_object_pool_helpers.cpp.
|
explicit |
overloads the bool operator so that you can check for this value's existence by doing if(thisObject)
Definition at line 15 of file isobus_device_descriptor_object_pool_helpers.cpp.
|
friend |
Allow our helper to change the values.
Definition at line 57 of file isobus_device_descriptor_object_pool_helpers.hpp.
|
protected |
Stores if the value can be set, such as on a DPD's value.
Definition at line 61 of file isobus_device_descriptor_object_pool_helpers.hpp.
|
protected |
Stores if the value has ever been set.
Definition at line 60 of file isobus_device_descriptor_object_pool_helpers.hpp.
|
protected |
The value being wrapped by this object.
Definition at line 59 of file isobus_device_descriptor_object_pool_helpers.hpp.