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

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>

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

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.
 

Detailed Description

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.

Member Enumeration Documentation

◆ AvailableTriggerMethods

Enumerates the trigger methods that can be set in the available trigger bitset of this object.

Enumerator
TimeInterval 

The device can provide these device process data based on a time interval.

DistanceInterval 

The device can provide these device process data based on a distance interval.

ThresholdLimits 

The device can provide these device process data based on a surpassing of the value threshold.

OnChange 

The device can provide these device process data when its value changes.

Total 

These device process data are a total.

Definition at line 309 of file isobus_task_controller_client_objects.hpp.

◆ PropertiesBit

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.

Constructor & Destructor Documentation

◆ DeviceProcessDataObject()

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.

Parameters
[in]processDataDesignatorDescriptive text for the object, UTF-8, 32 chars max
[in]processDataDDIIdentifier of process data variable (DDI) according to definitions in Annex B and ISO 11783 - 11
[in]deviceValuePresentationObjectIDObject identifier of a DeviceValuePresentationObject, or the null ID
[in]processDataPropertiesA bitset of properties associated to this object. Some combination of PropertiesBit
[in]processDataTriggerMethodsA bitset of available trigger methods, built from some combination of AvailableTriggerMethods
[in]uniqueIDThe object ID of the object. Must be unique in the DDOP.

Definition at line 339 of file isobus_task_controller_client_objects.cpp.

Member Function Documentation

◆ get_binary_object()

std::vector< std::uint8_t > isobus::task_controller_object::DeviceProcessDataObject::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 363 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::DeviceProcessDataObject::get_ddi ( ) const

Returns the DDI.

Returns
the DDI for this property

Definition at line 388 of file isobus_task_controller_client_objects.cpp.

◆ get_device_value_presentation_object_id()

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.

Returns
Object identifier of DeviceValuePresentation-Object for this object

Definition at line 398 of file isobus_task_controller_client_objects.cpp.

◆ get_object_type()

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

Returns the object type.

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

Implements isobus::task_controller_object::Object.

Definition at line 358 of file isobus_task_controller_client_objects.cpp.

◆ get_properties_bitfield()

std::uint8_t isobus::task_controller_object::DeviceProcessDataObject::get_properties_bitfield ( ) const

Returns the object's properties bitfield.

Returns
The properties bitfield for this object

Definition at line 408 of file isobus_task_controller_client_objects.cpp.

◆ get_table_id()

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

Returns the XML element namespace for DeviceProcess-Data.

Returns
The string "DPD", 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.

◆ get_trigger_methods_bitfield()

std::uint8_t isobus::task_controller_object::DeviceProcessDataObject::get_trigger_methods_bitfield ( ) const

Returns the object's available trigger methods.

Returns
The available trigger methods bitfield for this object

Definition at line 418 of file isobus_task_controller_client_objects.cpp.

◆ set_ddi()

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

Updates the DDI associated to this DPD object.

Parameters
[in]newDDIThe DDI to associate with this object

Definition at line 393 of file isobus_task_controller_client_objects.cpp.

◆ set_device_value_presentation_object_id()

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.

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

◆ set_properties_bitfield()

void isobus::task_controller_object::DeviceProcessDataObject::set_properties_bitfield ( std::uint8_t properties)

Updates the properties bitfield to a new value.

Parameters
[in]propertiesThe new properties bitfield to set

Definition at line 413 of file isobus_task_controller_client_objects.cpp.

◆ set_trigger_methods_bitfield()

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.

Parameters
[in]methodsThe new trigger methods bitfield to set

Definition at line 423 of file isobus_task_controller_client_objects.cpp.

Member Data Documentation

◆ ddi

std::uint16_t isobus::task_controller_object::DeviceProcessDataObject::ddi
private

Identifier of process data variable.

Definition at line 381 of file isobus_task_controller_client_objects.hpp.

◆ deviceValuePresentationObject

std::uint16_t isobus::task_controller_object::DeviceProcessDataObject::deviceValuePresentationObject
private

Object identifier of DeviceValuePresentation-Object.

Definition at line 382 of file isobus_task_controller_client_objects.hpp.

◆ propertiesBitfield

std::uint8_t isobus::task_controller_object::DeviceProcessDataObject::propertiesBitfield
private

A bitset of properties for this object.

Definition at line 383 of file isobus_task_controller_client_objects.hpp.

◆ tableID

const std::string isobus::task_controller_object::DeviceProcessDataObject::tableID = "DPD"
staticprivate

XML element namespace for DeviceProcessData.

Definition at line 380 of file isobus_task_controller_client_objects.hpp.

◆ triggerMethodsBitfield

std::uint8_t isobus::task_controller_object::DeviceProcessDataObject::triggerMethodsBitfield
private

A bitset defined in A.4.1 to A.4.5.

Definition at line 384 of file isobus_task_controller_client_objects.hpp.


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