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

A base class for a Task Controller Object. More...

#include <isobus_task_controller_client_objects.hpp>

Inheritance diagram for isobus::task_controller_object::Object:
[legend]

Public Member Functions

 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.
 
virtual std::string get_table_id () const =0
 Returns the XML namespace for the object.
 
virtual ObjectTypes get_object_type () const =0
 Returns the derived TC object type fot the object.
 
virtual std::vector< std::uint8_t > get_binary_object () const =0
 Returns the binary representation of the TC object, or an empty vector if object is invalid.
 

Static Public Attributes

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

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

A base class for a Task Controller Object.

Definition at line 33 of file isobus_task_controller_client_objects.hpp.

Constructor & Destructor Documentation

◆ Object()

isobus::task_controller_object::Object::Object ( std::string objectDesignator,
std::uint16_t uniqueID )

Constructor for the TC object base class.

Parameters
[in]objectDesignatorDescriptive text for this object, UTF-8 encoded, 32 characters max
[in]uniqueIDThe object ID of the object. Must be unique in the DDOP.

Definition at line 22 of file isobus_task_controller_client_objects.cpp.

Member Function Documentation

◆ get_binary_object()

virtual std::vector< std::uint8_t > isobus::task_controller_object::Object::get_binary_object ( ) const
pure virtual

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

Implemented in isobus::task_controller_object::DeviceObject, isobus::task_controller_object::DeviceElementObject, isobus::task_controller_object::DeviceProcessDataObject, isobus::task_controller_object::DevicePropertyObject, and isobus::task_controller_object::DeviceValuePresentationObject.

◆ get_designator()

std::string isobus::task_controller_object::Object::get_designator ( ) const

Returns the Descriptive text for this object, UTF-8 encoded, 32 characters max.

Returns
Descriptive text for this object, UTF-8 encoded, 32 characters max

Definition at line 28 of file isobus_task_controller_client_objects.cpp.

◆ get_object_id()

std::uint16_t isobus::task_controller_object::Object::get_object_id ( ) const

Returns the object ID of the object.

Returns
The object ID of the object

Definition at line 38 of file isobus_task_controller_client_objects.cpp.

Here is the caller graph for this function:

◆ get_object_type()

virtual ObjectTypes isobus::task_controller_object::Object::get_object_type ( ) const
pure virtual

◆ get_table_id()

virtual std::string isobus::task_controller_object::Object::get_table_id ( ) const
pure virtual

◆ set_designator()

void isobus::task_controller_object::Object::set_designator ( const std::string & newDesignator)

Updates the designator to a new value.

Parameters
[in]newDesignatorThe designator to set, UTF-8 encoded, 32 characters max

Definition at line 33 of file isobus_task_controller_client_objects.cpp.

◆ set_object_id()

void isobus::task_controller_object::Object::set_object_id ( std::uint16_t id)

Updates the object ID of the object to a new value.

Parameters
[in]idThe object ID to set. IDs must be unique in the DDOP and less than or equal to MAX_OBJECT_ID

Definition at line 43 of file isobus_task_controller_client_objects.cpp.

Member Data Documentation

◆ designator

std::string isobus::task_controller_object::Object::designator
protected

UTF-8 Descriptive text to identify this object. Max length of 32.

Definition at line 82 of file isobus_task_controller_client_objects.hpp.

◆ MAX_DESIGNATOR_LEGACY_LENGTH

constexpr std::size_t isobus::task_controller_object::Object::MAX_DESIGNATOR_LEGACY_LENGTH = 32
staticconstexpr

Defines the max length of a designator (in bytes) for TCs older than version 4.

Definition at line 79 of file isobus_task_controller_client_objects.hpp.

◆ MAX_DESIGNATOR_LENGTH

constexpr std::size_t isobus::task_controller_object::Object::MAX_DESIGNATOR_LENGTH = 128
staticconstexpr

Defines the max length of a designator (in bytes)

Definition at line 76 of file isobus_task_controller_client_objects.hpp.

◆ MAX_OBJECT_ID

constexpr std::uint16_t isobus::task_controller_object::Object::MAX_OBJECT_ID = 65534
staticconstexpr

The max allowable "valid" object ID.

Definition at line 73 of file isobus_task_controller_client_objects.hpp.

◆ objectID

std::uint16_t isobus::task_controller_object::Object::objectID
protected

Unique object ID in the DDOP.

Definition at line 83 of file isobus_task_controller_client_objects.hpp.


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