AgIsoStack++
A control-function-focused implementation of the major ISOBUS and J1939 protocols
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | Static Private Attributes | List of all members
isobus::task_controller_object::DevicePropertyObject Class Reference

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>

Inheritance diagram for isobus::task_controller_object::DevicePropertyObject:
[legend]
Collaboration diagram for isobus::task_controller_object::DevicePropertyObject:
[legend]

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.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ DevicePropertyObject()

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.

Parameters
[in]propertyDesignatorDescriptive text for the object, UTF-8, 32 chars max
[in]propertyValueThe value of the property
[in]propertyDDIIdentifier of property (DDI) according to definitions in Annex B and ISO 11783 - 11.
[in]valuePresentationObjectObject identifier of DeviceValuePresentationObject, or NULL object ID
[in]uniqueIDThe object ID of the object. Must be unique in the DDOP.

Definition at line 430 of file isobus_task_controller_client_objects.cpp.

Member Function Documentation

◆ get_binary_object()

std::vector< std::uint8_t > isobus::task_controller_object::DevicePropertyObject::get_binary_object ( ) const
overridevirtual

Returns the binary representation of the TC object, or an empty vector if object is invalid.

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.

Here is the call graph for this function:

◆ get_ddi()

std::uint16_t isobus::task_controller_object::DevicePropertyObject::get_ddi ( ) const

Returns the DDI for this object.

Returns
The DDI for this object

Definition at line 489 of file isobus_task_controller_client_objects.cpp.

◆ get_device_value_presentation_object_id()

std::uint16_t isobus::task_controller_object::DevicePropertyObject::get_device_value_presentation_object_id ( ) const

Returns the object identifier of an associated DeviceValuePresentationObject.

Returns
The object identifier of an associated DeviceValuePresentationObject

Definition at line 499 of file isobus_task_controller_client_objects.cpp.

◆ get_object_type()

ObjectTypes isobus::task_controller_object::DevicePropertyObject::get_object_type ( ) const
overridevirtual

Returns the object type.

Returns
The object type for this object (Object::DeviceProperty)

Implements isobus::task_controller_object::Object.

Definition at line 447 of file isobus_task_controller_client_objects.cpp.

◆ get_table_id()

std::string isobus::task_controller_object::DevicePropertyObject::get_table_id ( ) const
overridevirtual

Returns the XML element namespace for DeviceProperty.

Returns
The string "DPT", the XML element namespace for DeviceProperty.

Implements isobus::task_controller_object::Object.

Definition at line 442 of file isobus_task_controller_client_objects.cpp.

◆ get_value()

std::int32_t isobus::task_controller_object::DevicePropertyObject::get_value ( ) const

Returns the property's value.

Returns
The property's value

Definition at line 479 of file isobus_task_controller_client_objects.cpp.

◆ set_ddi()

void isobus::task_controller_object::DevicePropertyObject::set_ddi ( std::uint16_t newDDI)

Updates the DDI associated with this DPT object to a new value.

Parameters
[in]newDDIThe DDI to associate with this object's value

Definition at line 494 of file isobus_task_controller_client_objects.cpp.

◆ set_device_value_presentation_object_id()

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.

Parameters
[in]idObject 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.

◆ set_value()

void isobus::task_controller_object::DevicePropertyObject::set_value ( std::int32_t newValue)

Sets the property value.

Parameters
[in]newValueThe value to set the property to

Definition at line 484 of file isobus_task_controller_client_objects.cpp.

Member Data Documentation

◆ ddi

std::uint16_t isobus::task_controller_object::DevicePropertyObject::ddi
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.

◆ deviceValuePresentationObject

std::uint16_t isobus::task_controller_object::DevicePropertyObject::deviceValuePresentationObject
private

◆ tableID

const std::string isobus::task_controller_object::DevicePropertyObject::tableID = "DPT"
staticprivate

XML element namespace for DeviceProperty.

Definition at line 445 of file isobus_task_controller_client_objects.hpp.

◆ value

std::int32_t isobus::task_controller_object::DevicePropertyObject::value
private

The value of the property.

Definition at line 446 of file isobus_task_controller_client_objects.hpp.


The documentation for this class was generated from the following files: