AgIsoStack++
A control-function-focused implementation of the major ISOBUS and J1939 protocols
|
The DeviceProcessDataObject is the object definition of the XML element DeviceProcessData. Each object contains a single process data variable definition. More...
#include <isobus_task_controller_client_objects.hpp>
Public Types | |
enum class | PropertiesBit : std::uint8_t { MemberOfDefaultSet = 0x01 , Settable = 0x02 , ControlSource = 0x04 } |
Enumerates the properties in the properties bitset of this object. More... | |
enum class | AvailableTriggerMethods { TimeInterval = 0x01 , DistanceInterval = 0x02 , ThresholdLimits = 0x04 , OnChange = 0x08 , Total = 0x10 } |
Enumerates the trigger methods that can be set in the available trigger bitset of this object. More... | |
Public Member Functions | |
DeviceProcessDataObject (std::string processDataDesignator, std::uint16_t processDataDDI, std::uint16_t deviceValuePresentationObjectID, std::uint8_t processDataProperties, std::uint8_t processDataTriggerMethods, std::uint16_t uniqueID) | |
Constructor for a DeviceProcessDataObject. | |
~DeviceProcessDataObject () override=default | |
Destructor for a DeviceProcessDataObject. | |
std::string | get_table_id () const override |
Returns the XML element namespace for DeviceProcess-Data. | |
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::uint16_t | get_ddi () const |
Returns the DDI. | |
void | set_ddi (std::uint16_t newDDI) |
Updates the DDI associated to this DPD object. | |
std::uint16_t | get_device_value_presentation_object_id () const |
Returns Object identifier of the DeviceValuePresentation-Object for this object, or the null ID. | |
void | set_device_value_presentation_object_id (std::uint16_t id) |
Updates the object ID to use as an associated presentation for this object. | |
std::uint8_t | get_properties_bitfield () const |
Returns the object's properties bitfield. | |
void | set_properties_bitfield (std::uint8_t properties) |
Updates the properties bitfield to a new value. | |
std::uint8_t | get_trigger_methods_bitfield () const |
Returns the object's available trigger methods. | |
void | set_trigger_methods_bitfield (std::uint8_t methods) |
Updates the object's available trigger methods bitfield to a new value. | |
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::uint16_t | ddi |
Identifier of process data variable. | |
std::uint16_t | deviceValuePresentationObject |
Object identifier of DeviceValuePresentation-Object. | |
std::uint8_t | propertiesBitfield |
A bitset of properties for this object. | |
std::uint8_t | triggerMethodsBitfield |
A bitset defined in A.4.1 to A.4.5. | |
Static Private Attributes | |
static const std::string | tableID = "DPD" |
XML element namespace for DeviceProcessData. | |
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. | |
The DeviceProcessDataObject is the object definition of the XML element DeviceProcessData. Each object contains a single process data variable definition.
Referable child object: DeviceValuePresentationObject
Definition at line 297 of file isobus_task_controller_client_objects.hpp.
Enumerates the trigger methods that can be set in the available trigger bitset of this object.
Definition at line 309 of file isobus_task_controller_client_objects.hpp.
|
strong |
Enumerates the properties in the properties bitset of this object.
Enumerator | |
---|---|
MemberOfDefaultSet | member of default set |
Settable | if this object is settable |
ControlSource | Version 4, mutually exclusive with bit 2. |
Definition at line 301 of file isobus_task_controller_client_objects.hpp.
isobus::task_controller_object::DeviceProcessDataObject::DeviceProcessDataObject | ( | std::string | processDataDesignator, |
std::uint16_t | processDataDDI, | ||
std::uint16_t | deviceValuePresentationObjectID, | ||
std::uint8_t | processDataProperties, | ||
std::uint8_t | processDataTriggerMethods, | ||
std::uint16_t | uniqueID ) |
Constructor for a DeviceProcessDataObject.
[in] | processDataDesignator | Descriptive text for the object, UTF-8, 32 chars max |
[in] | processDataDDI | Identifier of process data variable (DDI) according to definitions in Annex B and ISO 11783 - 11 |
[in] | deviceValuePresentationObjectID | Object identifier of a DeviceValuePresentationObject, or the null ID |
[in] | processDataProperties | A bitset of properties associated to this object. Some combination of PropertiesBit |
[in] | processDataTriggerMethods | A bitset of available trigger methods, built from some combination of AvailableTriggerMethods |
[in] | uniqueID | The object ID of the object. Must be unique in the DDOP. |
Definition at line 339 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 363 of file isobus_task_controller_client_objects.cpp.
std::uint16_t isobus::task_controller_object::DeviceProcessDataObject::get_ddi | ( | ) | const |
Returns the DDI.
Definition at line 388 of file isobus_task_controller_client_objects.cpp.
std::uint16_t isobus::task_controller_object::DeviceProcessDataObject::get_device_value_presentation_object_id | ( | ) | const |
Returns Object identifier of the DeviceValuePresentation-Object for this object, or the null ID.
Definition at line 398 of file isobus_task_controller_client_objects.cpp.
|
overridevirtual |
Returns the object type.
Implements isobus::task_controller_object::Object.
Definition at line 358 of file isobus_task_controller_client_objects.cpp.
std::uint8_t isobus::task_controller_object::DeviceProcessDataObject::get_properties_bitfield | ( | ) | const |
Returns the object's properties bitfield.
Definition at line 408 of file isobus_task_controller_client_objects.cpp.
|
overridevirtual |
Returns the XML element namespace for DeviceProcess-Data.
Implements isobus::task_controller_object::Object.
Definition at line 353 of file isobus_task_controller_client_objects.cpp.
std::uint8_t isobus::task_controller_object::DeviceProcessDataObject::get_trigger_methods_bitfield | ( | ) | const |
Returns the object's available trigger methods.
Definition at line 418 of file isobus_task_controller_client_objects.cpp.
void isobus::task_controller_object::DeviceProcessDataObject::set_ddi | ( | std::uint16_t | newDDI | ) |
Updates the DDI associated to this DPD object.
[in] | newDDI | The DDI to associate with this object |
Definition at line 393 of file isobus_task_controller_client_objects.cpp.
void isobus::task_controller_object::DeviceProcessDataObject::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 403 of file isobus_task_controller_client_objects.cpp.
void isobus::task_controller_object::DeviceProcessDataObject::set_properties_bitfield | ( | std::uint8_t | properties | ) |
Updates the properties bitfield to a new value.
[in] | properties | The new properties bitfield to set |
Definition at line 413 of file isobus_task_controller_client_objects.cpp.
void isobus::task_controller_object::DeviceProcessDataObject::set_trigger_methods_bitfield | ( | std::uint8_t | methods | ) |
Updates the object's available trigger methods bitfield to a new value.
[in] | methods | The new trigger methods bitfield to set |
Definition at line 423 of file isobus_task_controller_client_objects.cpp.
|
private |
Identifier of process data variable.
Definition at line 381 of file isobus_task_controller_client_objects.hpp.
|
private |
Object identifier of DeviceValuePresentation-Object.
Definition at line 382 of file isobus_task_controller_client_objects.hpp.
|
private |
A bitset of properties for this object.
Definition at line 383 of file isobus_task_controller_client_objects.hpp.
|
staticprivate |
XML element namespace for DeviceProcessData.
Definition at line 380 of file isobus_task_controller_client_objects.hpp.
|
private |
A bitset defined in A.4.1 to A.4.5.
Definition at line 384 of file isobus_task_controller_client_objects.hpp.