|
AgIsoStack++
A control-function-focused implementation of the major ISOBUS and J1939 protocols
|
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>
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. | |
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.
| 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.
| [in] | unitDesignator | Unit designator for this value presentation |
| [in] | offsetValue | Offset to be applied to the value for presentation. |
| [in] | scaleFactor | Scale to be applied to the value for presentation. |
| [in] | numberDecimals | Specifies the number of decimals to display after the decimal point. |
| [in] | uniqueID | The object ID of the object. Must be unique in the DDOP. |
Definition at line 511 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 533 of file isobus_task_controller_client_objects.cpp.
| std::uint8_t isobus::task_controller_object::DeviceValuePresentationObject::get_number_of_decimals | ( | ) | const |
Returns the number of decimals shown after the decimal point.
Definition at line 590 of file isobus_task_controller_client_objects.cpp.
|
overridevirtual |
Returns the object type.
Implements isobus::task_controller_object::Object.
Definition at line 528 of file isobus_task_controller_client_objects.cpp.
| std::int32_t isobus::task_controller_object::DeviceValuePresentationObject::get_offset | ( | ) | const |
Returns the offset that is applied to the value for presentation.
Definition at line 570 of file isobus_task_controller_client_objects.cpp.
| float isobus::task_controller_object::DeviceValuePresentationObject::get_scale | ( | ) | const |
Returns the scale that is applied to the value for presentation.
Definition at line 580 of file isobus_task_controller_client_objects.cpp.
|
overridevirtual |
Returns the XML element namespace for DeviceValuePresentation.
Implements isobus::task_controller_object::Object.
Definition at line 523 of file isobus_task_controller_client_objects.cpp.
| 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.
| [in] | decimals | The number of decimals to show after the decimal point |
Definition at line 595 of file isobus_task_controller_client_objects.cpp.
| void isobus::task_controller_object::DeviceValuePresentationObject::set_offset | ( | std::int32_t | newOffset | ) |
Sets the offset that is applied to the value for presentation.
| [in] | newOffset | The offset to set for this object's value |
Definition at line 575 of file isobus_task_controller_client_objects.cpp.
| void isobus::task_controller_object::DeviceValuePresentationObject::set_scale | ( | float | newScale | ) |
Sets the scale which will be applied to the value for presentation.
| [in] | newScale | The scale to set for this object's value |
Definition at line 585 of file isobus_task_controller_client_objects.cpp.
|
private |
Specify number of decimals to display after the decimal point.
Definition at line 513 of file isobus_task_controller_client_objects.hpp.
|
private |
Offset to be applied to the value for presentation.
Definition at line 511 of file isobus_task_controller_client_objects.hpp.
|
private |
Scale to be applied to the value for presentation.
Definition at line 512 of file isobus_task_controller_client_objects.hpp.
|
staticprivate |
XML element namespace for DeviceValuePresentation.
Definition at line 510 of file isobus_task_controller_client_objects.hpp.