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

Helper object for parsing DDOPs. More...

#include <isobus_device_descriptor_object_pool_helpers.hpp>

Classes

class  Boom
 A helper class that describes a boom This is used to describe a boom, or more generally, an ISO11783-10 function element. More...
 
class  Implement
 A helper class that describes an implement based on its DDOP. More...
 
class  ObjectPoolValue
 A wrapper for a DDOP value which tells you if the value was actually supplied by the DDOP. More...
 
class  ProductControlInformation
 A helper class that groups product rate infomation together. A TC server could use this to know quickly what rates are available and how to interact with them. Use the associated element number and DDI to perform value commands and requests with a client. More...
 
class  RateMetadata
 A helper class that groups a DDI with an object id. More...
 
class  Section
 A helper class that describes an individual section of a boom. This is used to describe the sections of a boom. Units are defined in mm as specified in the ISO 11783-10 standard. X offsets are fore/aft. Y offsets are left/right again as defined in the ISO 11783-10 standard. More...
 
class  SubBoom
 A helper class that describes a sub boom (not all devices support this) More...
 

Static Public Member Functions

static Implement get_implement_geometry (DeviceDescriptorObjectPool &ddop)
 Get the implement description from the DDOP.
 

Static Private Member Functions

static void parse_element (DeviceDescriptorObjectPool &ddop, std::shared_ptr< task_controller_object::DeviceElementObject > elementObject, Implement &implementToPopulate)
 Parse an element of the DDOP.
 
static Section parse_section (DeviceDescriptorObjectPool &ddop, std::shared_ptr< task_controller_object::DeviceElementObject > elementObject)
 Parse a section element of the DDOP.
 
static SubBoom parse_sub_boom (DeviceDescriptorObjectPool &ddop, std::shared_ptr< task_controller_object::DeviceElementObject > elementObject)
 Parse a sub boom element of the DDOP.
 
static ProductControlInformation parse_bin (DeviceDescriptorObjectPool &ddop, std::shared_ptr< task_controller_object::DeviceElementObject > elementObject)
 Parses a bin element of the DDOP.
 
static void set_value_from_property (ObjectPoolValue &objectPoolValue, const std::shared_ptr< task_controller_object::DevicePropertyObject > &property, DataDescriptionIndex ddi)
 Sets the value and presence based on a DDI match.
 
static void set_editable_from_process_data (ObjectPoolValue &objectPoolValue, const std::shared_ptr< task_controller_object::DeviceProcessDataObject > &processData, DataDescriptionIndex ddi)
 Sets the settable flag based on a DDI match for process data.
 
static void set_product_control_information_max_rate (ProductControlInformation &productControlInformation, const std::shared_ptr< task_controller_object::Object > &object, std::uint16_t ddi)
 Sets the max rate field of the product control information based on the supplied object if the DDI is known to be a max rate DDI.
 
static void set_product_control_information_min_rate (ProductControlInformation &productControlInformation, const std::shared_ptr< task_controller_object::Object > &object, std::uint16_t ddi)
 Sets the minimum rate field of the product control information based on the supplied object if the DDI is known to be a minimum rate DDI.
 
static void set_product_control_information_default_rate (ProductControlInformation &productControlInformation, const std::shared_ptr< task_controller_object::Object > &object, std::uint16_t ddi)
 Sets the default rate field of the product control information based on the supplied object if the DDI is known to be a default rate DDI.
 
static void set_product_control_information_setpoint_rate (ProductControlInformation &productControlInformation, const std::shared_ptr< task_controller_object::Object > &object, std::uint16_t ddi)
 Sets the setpoint rate field of the product control information based on the supplied object if the DDI is known to be a setpoint rate DDI.
 
static void set_product_control_information_actual_rate (ProductControlInformation &productControlInformation, const std::shared_ptr< task_controller_object::Object > &object, std::uint16_t ddi)
 Sets the actual rate field of the product control information based on the supplied object if the DDI is known to be a actual rate DDI.
 

Detailed Description

Helper object for parsing DDOPs.

Attention
Getting this data from the DDOP requires traversing the entire DDOP several times, so you should treat these as O(n^2) and try not to call them too many times.

Definition at line 25 of file isobus_device_descriptor_object_pool_helpers.hpp.

Member Function Documentation

◆ get_implement_geometry()

DeviceDescriptorObjectPoolHelper::Implement isobus::DeviceDescriptorObjectPoolHelper::get_implement_geometry ( DeviceDescriptorObjectPool & ddop)
static

Get the implement description from the DDOP.

Parameters
[in]ddopThe DDOP to get the implement geometry and info from
Returns
The implement geometry and info

Definition at line 44 of file isobus_device_descriptor_object_pool_helpers.cpp.

Here is the call graph for this function:

◆ parse_bin()

DeviceDescriptorObjectPoolHelper::ProductControlInformation isobus::DeviceDescriptorObjectPoolHelper::parse_bin ( DeviceDescriptorObjectPool & ddop,
std::shared_ptr< task_controller_object::DeviceElementObject > elementObject )
staticprivate

Parses a bin element of the DDOP.

Parameters
[in]ddopThe DDOP to get the implement product control info from
[in]elementObjectThe element to parse
Returns
The parsed product control information, or a default product control information if the elementObject is invalid or has no relevant data

Definition at line 323 of file isobus_device_descriptor_object_pool_helpers.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ parse_element()

void isobus::DeviceDescriptorObjectPoolHelper::parse_element ( DeviceDescriptorObjectPool & ddop,
std::shared_ptr< task_controller_object::DeviceElementObject > elementObject,
Implement & implementToPopulate )
staticprivate

Parse an element of the DDOP.

Parameters
[in]ddopThe DDOP to get the implement geometry and info from
[in]elementObjectThe object to parse
[out]implementToPopulateThe implement to populate with the parsed data

Definition at line 128 of file isobus_device_descriptor_object_pool_helpers.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ parse_section()

DeviceDescriptorObjectPoolHelper::Section isobus::DeviceDescriptorObjectPoolHelper::parse_section ( DeviceDescriptorObjectPool & ddop,
std::shared_ptr< task_controller_object::DeviceElementObject > elementObject )
staticprivate

Parse a section element of the DDOP.

Parameters
[in]ddopThe DDOP to get the implement geometry and info from
[in]elementObjectThe element to parse
Returns
The parsed section, or a default section if the elementObject is invalid

Definition at line 221 of file isobus_device_descriptor_object_pool_helpers.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ parse_sub_boom()

DeviceDescriptorObjectPoolHelper::SubBoom isobus::DeviceDescriptorObjectPoolHelper::parse_sub_boom ( DeviceDescriptorObjectPool & ddop,
std::shared_ptr< task_controller_object::DeviceElementObject > elementObject )
staticprivate

Parse a sub boom element of the DDOP.

Parameters
[in]ddopThe DDOP to get the implement geometry and info from
[in]elementObjectThe element to parse
Returns
The parsed sub boom, or a default sub boom if the elementObject is invalid

Definition at line 264 of file isobus_device_descriptor_object_pool_helpers.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_editable_from_process_data()

void isobus::DeviceDescriptorObjectPoolHelper::set_editable_from_process_data ( ObjectPoolValue & objectPoolValue,
const std::shared_ptr< task_controller_object::DeviceProcessDataObject > & processData,
DataDescriptionIndex ddi )
staticprivate

Sets the settable flag based on a DDI match for process data.

Parameters
[in,out]objectPoolValueThe object pool value to update.
[in]processDataThe device process data object.
[in]ddiThe DDI to check against.

Definition at line 374 of file isobus_device_descriptor_object_pool_helpers.cpp.

Here is the caller graph for this function:

◆ set_product_control_information_actual_rate()

void isobus::DeviceDescriptorObjectPoolHelper::set_product_control_information_actual_rate ( ProductControlInformation & productControlInformation,
const std::shared_ptr< task_controller_object::Object > & object,
std::uint16_t ddi )
staticprivate

Sets the actual rate field of the product control information based on the supplied object if the DDI is known to be a actual rate DDI.

Parameters
[in,out]productControlInformationThe product control information to update.
[in]objectThe object to use to update the product control information.
[in]ddiThe DDI to check against.

Definition at line 595 of file isobus_device_descriptor_object_pool_helpers.cpp.

Here is the caller graph for this function:

◆ set_product_control_information_default_rate()

void isobus::DeviceDescriptorObjectPoolHelper::set_product_control_information_default_rate ( ProductControlInformation & productControlInformation,
const std::shared_ptr< task_controller_object::Object > & object,
std::uint16_t ddi )
staticprivate

Sets the default rate field of the product control information based on the supplied object if the DDI is known to be a default rate DDI.

Parameters
[in,out]productControlInformationThe product control information to update.
[in]objectThe object to use to update the product control information.
[in]ddiThe DDI to check against.

Definition at line 492 of file isobus_device_descriptor_object_pool_helpers.cpp.

Here is the caller graph for this function:

◆ set_product_control_information_max_rate()

void isobus::DeviceDescriptorObjectPoolHelper::set_product_control_information_max_rate ( ProductControlInformation & productControlInformation,
const std::shared_ptr< task_controller_object::Object > & object,
std::uint16_t ddi )
staticprivate

Sets the max rate field of the product control information based on the supplied object if the DDI is known to be a max rate DDI.

Parameters
[in,out]productControlInformationThe product control information to update.
[in]objectThe object to use to update the product control information.
[in]ddiThe DDI to check against.

Definition at line 384 of file isobus_device_descriptor_object_pool_helpers.cpp.

Here is the caller graph for this function:

◆ set_product_control_information_min_rate()

void isobus::DeviceDescriptorObjectPoolHelper::set_product_control_information_min_rate ( ProductControlInformation & productControlInformation,
const std::shared_ptr< task_controller_object::Object > & object,
std::uint16_t ddi )
staticprivate

Sets the minimum rate field of the product control information based on the supplied object if the DDI is known to be a minimum rate DDI.

Parameters
[in,out]productControlInformationThe product control information to update.
[in]objectThe object to use to update the product control information.
[in]ddiThe DDI to check against.

Definition at line 438 of file isobus_device_descriptor_object_pool_helpers.cpp.

Here is the caller graph for this function:

◆ set_product_control_information_setpoint_rate()

void isobus::DeviceDescriptorObjectPoolHelper::set_product_control_information_setpoint_rate ( ProductControlInformation & productControlInformation,
const std::shared_ptr< task_controller_object::Object > & object,
std::uint16_t ddi )
staticprivate

Sets the setpoint rate field of the product control information based on the supplied object if the DDI is known to be a setpoint rate DDI.

Parameters
[in,out]productControlInformationThe product control information to update.
[in]objectThe object to use to update the product control information.
[in]ddiThe DDI to check against.

Definition at line 541 of file isobus_device_descriptor_object_pool_helpers.cpp.

Here is the caller graph for this function:

◆ set_value_from_property()

void isobus::DeviceDescriptorObjectPoolHelper::set_value_from_property ( ObjectPoolValue & objectPoolValue,
const std::shared_ptr< task_controller_object::DevicePropertyObject > & property,
DataDescriptionIndex ddi )
staticprivate

Sets the value and presence based on a DDI match.

Parameters
[in,out]objectPoolValueThe object pool value to set.
[in]propertyThe device property object.
[in]ddiThe DDI to check against.

Definition at line 363 of file isobus_device_descriptor_object_pool_helpers.cpp.

Here is the caller graph for this function:

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