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::DeviceValuePresentationObject Class Reference

This object contains the presentation information to display the value of a DeviceProcessData or DeviceProperty object.The device can update these objects when the language and/or units of measure are changed by the operator. More...

#include <isobus_task_controller_client_objects.hpp>

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

Public Member Functions

 DeviceValuePresentationObject (std::string unitDesignator, std::int32_t offsetValue, float scaleFactor, std::uint8_t numberDecimals, std::uint16_t uniqueID)
 The constructor for a DeviceValuePresentationObject.
 
 ~DeviceValuePresentationObject () override=default
 Destructor for a DeviceValuePresentationObject.
 
std::string get_table_id () const override
 Returns the XML element namespace for DeviceValuePresentation.
 
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_offset () const
 Returns the offset that is applied to the value for presentation.
 
void set_offset (std::int32_t newOffset)
 Sets the offset that is applied to the value for presentation.
 
float get_scale () const
 Returns the scale that is applied to the value for presentation.
 
void set_scale (float newScale)
 Sets the scale which will be applied to the value for presentation.
 
std::uint8_t get_number_of_decimals () const
 Returns the number of decimals shown after the decimal point.
 
void set_number_of_decimals (std::uint8_t decimals)
 Sets the number of decimals to show when presenting objects associated with this presentation.
 
- 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 offset
 Offset to be applied to the value for presentation.
 
float scale
 Scale to be applied to the value for presentation.
 
std::uint8_t numberOfDecimals
 Specify number of decimals to display after the decimal point.
 

Static Private Attributes

static const std::string tableID = "DVP"
 XML element namespace for DeviceValuePresentation.
 

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

This object contains the presentation information to display the value of a DeviceProcessData or DeviceProperty object.The device can update these objects when the language and/or units of measure are changed by the operator.

Referable child objects: none.

Definition at line 455 of file isobus_task_controller_client_objects.hpp.

Constructor & Destructor Documentation

◆ DeviceValuePresentationObject()

isobus::task_controller_object::DeviceValuePresentationObject::DeviceValuePresentationObject ( std::string unitDesignator,
std::int32_t offsetValue,
float scaleFactor,
std::uint8_t numberDecimals,
std::uint16_t uniqueID )

The constructor for a DeviceValuePresentationObject.

Parameters
[in]unitDesignatorUnit designator for this value presentation
[in]offsetValueOffset to be applied to the value for presentation.
[in]scaleFactorScale to be applied to the value for presentation.
[in]numberDecimalsSpecifies the number of decimals to display after the decimal point.
[in]uniqueIDThe object ID of the object. Must be unique in the DDOP.

Definition at line 511 of file isobus_task_controller_client_objects.cpp.

Member Function Documentation

◆ get_binary_object()

std::vector< std::uint8_t > isobus::task_controller_object::DeviceValuePresentationObject::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 533 of file isobus_task_controller_client_objects.cpp.

Here is the call graph for this function:

◆ get_number_of_decimals()

std::uint8_t isobus::task_controller_object::DeviceValuePresentationObject::get_number_of_decimals ( ) const

Returns the number of decimals shown after the decimal point.

Returns
The number of decimals shown after the decimal point

Definition at line 590 of file isobus_task_controller_client_objects.cpp.

◆ get_object_type()

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

Returns the object type.

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

Implements isobus::task_controller_object::Object.

Definition at line 528 of file isobus_task_controller_client_objects.cpp.

◆ get_offset()

std::int32_t isobus::task_controller_object::DeviceValuePresentationObject::get_offset ( ) const

Returns the offset that is applied to the value for presentation.

Returns
The offset that is applied to the value for presentation

Definition at line 570 of file isobus_task_controller_client_objects.cpp.

◆ get_scale()

float isobus::task_controller_object::DeviceValuePresentationObject::get_scale ( ) const

Returns the scale that is applied to the value for presentation.

Returns
The scale that is applied to the value for presentation

Definition at line 580 of file isobus_task_controller_client_objects.cpp.

◆ get_table_id()

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

Returns the XML element namespace for DeviceValuePresentation.

Returns
The string "DPD", the XML element namespace for DeviceProcessData.

Implements isobus::task_controller_object::Object.

Definition at line 523 of file isobus_task_controller_client_objects.cpp.

◆ set_number_of_decimals()

void isobus::task_controller_object::DeviceValuePresentationObject::set_number_of_decimals ( std::uint8_t decimals)

Sets the number of decimals to show when presenting objects associated with this presentation.

Parameters
[in]decimalsThe number of decimals to show after the decimal point

Definition at line 595 of file isobus_task_controller_client_objects.cpp.

◆ set_offset()

void isobus::task_controller_object::DeviceValuePresentationObject::set_offset ( std::int32_t newOffset)

Sets the offset that is applied to the value for presentation.

Parameters
[in]newOffsetThe offset to set for this object's value

Definition at line 575 of file isobus_task_controller_client_objects.cpp.

◆ set_scale()

void isobus::task_controller_object::DeviceValuePresentationObject::set_scale ( float newScale)

Sets the scale which will be applied to the value for presentation.

Parameters
[in]newScaleThe scale to set for this object's value

Definition at line 585 of file isobus_task_controller_client_objects.cpp.

Member Data Documentation

◆ numberOfDecimals

std::uint8_t isobus::task_controller_object::DeviceValuePresentationObject::numberOfDecimals
private

Specify number of decimals to display after the decimal point.

Definition at line 513 of file isobus_task_controller_client_objects.hpp.

◆ offset

std::int32_t isobus::task_controller_object::DeviceValuePresentationObject::offset
private

Offset to be applied to the value for presentation.

Definition at line 511 of file isobus_task_controller_client_objects.hpp.

◆ scale

float isobus::task_controller_object::DeviceValuePresentationObject::scale
private

Scale to be applied to the value for presentation.

Definition at line 512 of file isobus_task_controller_client_objects.hpp.

◆ tableID

const std::string isobus::task_controller_object::DeviceValuePresentationObject::tableID = "DVP"
staticprivate

XML element namespace for DeviceValuePresentation.

Definition at line 510 of file isobus_task_controller_client_objects.hpp.


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