AgIsoStack++
A control-function-focused implementation of the major ISOBUS and J1939 protocols
|
DevicePropertyObject is the object definition of the XML element DeviceProperty. Each object contains a single DeviceElementProperty definition. More...
#include <isobus_task_controller_client_objects.hpp>
Public Member Functions | |
DevicePropertyObject (std::string propertyDesignator, std::int32_t propertyValue, std::uint16_t propertyDDI, std::uint16_t valuePresentationObject, std::uint16_t uniqueID) | |
Constructor for a DevicePropertyObject. | |
~DevicePropertyObject () override=default | |
Destructor for a DevicePropertyObject. | |
std::string | get_table_id () const override |
Returns the XML element namespace for DeviceProperty. | |
ObjectTypes | get_object_type () const override |
Returns the object type. | |
std::vector< std::uint8_t > | get_binary_object () const override |
Returns the binary representation of the TC object, or an empty vector if object is invalid. | |
std::int32_t | get_value () const |
Returns the property's value. | |
void | set_value (std::int32_t newValue) |
Sets the property value. | |
std::uint16_t | get_ddi () const |
Returns the DDI for this object. | |
void | set_ddi (std::uint16_t newDDI) |
Updates the DDI associated with this DPT object to a new value. | |
std::uint16_t | get_device_value_presentation_object_id () const |
Returns the object identifier of an associated DeviceValuePresentationObject. | |
void | set_device_value_presentation_object_id (std::uint16_t id) |
Updates the object ID to use as an associated presentation for this object. | |
Public Member Functions inherited from isobus::task_controller_object::Object | |
Object (std::string objectDesignator, std::uint16_t uniqueID) | |
Constructor for the TC object base class. | |
virtual | ~Object ()=default |
Destructor for a TC Object. | |
std::string | get_designator () const |
Returns the Descriptive text for this object, UTF-8 encoded, 32 characters max. | |
void | set_designator (const std::string &newDesignator) |
Updates the designator to a new value. | |
std::uint16_t | get_object_id () const |
Returns the object ID of the object. | |
void | set_object_id (std::uint16_t id) |
Updates the object ID of the object to a new value. | |
Private Attributes | |
std::int32_t | value |
The value of the property. | |
std::uint16_t | ddi |
Identifier of property (DDI) according to definitions in Annex B and ISO 11783 - 11. | |
std::uint16_t | deviceValuePresentationObject |
Object identifier of DeviceValuePresentationObject. | |
Static Private Attributes | |
static const std::string | tableID = "DPT" |
XML element namespace for DeviceProperty. | |
Additional Inherited Members | |
Static Public Attributes inherited from isobus::task_controller_object::Object | |
static constexpr std::uint16_t | MAX_OBJECT_ID = 65534 |
The max allowable "valid" object ID. | |
static constexpr std::size_t | MAX_DESIGNATOR_LENGTH = 128 |
Defines the max length of a designator (in bytes) | |
static constexpr std::size_t | MAX_DESIGNATOR_LEGACY_LENGTH = 32 |
Defines the max length of a designator (in bytes) for TCs older than version 4. | |
Protected Attributes inherited from isobus::task_controller_object::Object | |
std::string | designator |
UTF-8 Descriptive text to identify this object. Max length of 32. | |
std::uint16_t | objectID |
Unique object ID in the DDOP. | |
DevicePropertyObject is the object definition of the XML element DeviceProperty. Each object contains a single DeviceElementProperty definition.
Referable child object: DeviceValuePresentationObject
Definition at line 390 of file isobus_task_controller_client_objects.hpp.
isobus::task_controller_object::DevicePropertyObject::DevicePropertyObject | ( | std::string | propertyDesignator, |
std::int32_t | propertyValue, | ||
std::uint16_t | propertyDDI, | ||
std::uint16_t | valuePresentationObject, | ||
std::uint16_t | uniqueID ) |
Constructor for a DevicePropertyObject.
[in] | propertyDesignator | Descriptive text for the object, UTF-8, 32 chars max |
[in] | propertyValue | The value of the property |
[in] | propertyDDI | Identifier of property (DDI) according to definitions in Annex B and ISO 11783 - 11. |
[in] | valuePresentationObject | Object identifier of DeviceValuePresentationObject, or NULL object ID |
[in] | uniqueID | The object ID of the object. Must be unique in the DDOP. |
Definition at line 430 of file isobus_task_controller_client_objects.cpp.
|
overridevirtual |
Returns the binary representation of the TC object, or an empty vector if object is invalid.
Implements isobus::task_controller_object::Object.
Definition at line 452 of file isobus_task_controller_client_objects.cpp.
std::uint16_t isobus::task_controller_object::DevicePropertyObject::get_ddi | ( | ) | const |
Returns the DDI for this object.
Definition at line 489 of file isobus_task_controller_client_objects.cpp.
std::uint16_t isobus::task_controller_object::DevicePropertyObject::get_device_value_presentation_object_id | ( | ) | const |
Returns the object identifier of an associated DeviceValuePresentationObject.
Definition at line 499 of file isobus_task_controller_client_objects.cpp.
|
overridevirtual |
Returns the object type.
Implements isobus::task_controller_object::Object.
Definition at line 447 of file isobus_task_controller_client_objects.cpp.
|
overridevirtual |
Returns the XML element namespace for DeviceProperty.
Implements isobus::task_controller_object::Object.
Definition at line 442 of file isobus_task_controller_client_objects.cpp.
std::int32_t isobus::task_controller_object::DevicePropertyObject::get_value | ( | ) | const |
Returns the property's value.
Definition at line 479 of file isobus_task_controller_client_objects.cpp.
void isobus::task_controller_object::DevicePropertyObject::set_ddi | ( | std::uint16_t | newDDI | ) |
Updates the DDI associated with this DPT object to a new value.
[in] | newDDI | The DDI to associate with this object's value |
Definition at line 494 of file isobus_task_controller_client_objects.cpp.
void isobus::task_controller_object::DevicePropertyObject::set_device_value_presentation_object_id | ( | std::uint16_t | id | ) |
Updates the object ID to use as an associated presentation for this object.
[in] | id | Object identifier of the DeviceValuePresentation to use for this object, or the null ID for none |
Definition at line 504 of file isobus_task_controller_client_objects.cpp.
void isobus::task_controller_object::DevicePropertyObject::set_value | ( | std::int32_t | newValue | ) |
Sets the property value.
[in] | newValue | The value to set the property to |
Definition at line 484 of file isobus_task_controller_client_objects.cpp.
|
private |
Identifier of property (DDI) according to definitions in Annex B and ISO 11783 - 11.
Definition at line 447 of file isobus_task_controller_client_objects.hpp.
|
private |
Object identifier of DeviceValuePresentationObject.
Definition at line 448 of file isobus_task_controller_client_objects.hpp.
|
staticprivate |
XML element namespace for DeviceProperty.
Definition at line 445 of file isobus_task_controller_client_objects.hpp.
|
private |
The value of the property.
Definition at line 446 of file isobus_task_controller_client_objects.hpp.