10#ifndef ISOBUS_DEVICE_DESCRIPTOR_OBJECT_POOL_HPP
11#define ISOBUS_DEVICE_DESCRIPTOR_OBJECT_POOL_HPP
49 std::string deviceSoftwareVersion,
50 std::string deviceSerialNumber,
51 std::string deviceStructureLabel,
52 std::array<std::uint8_t, task_controller_object::DeviceObject::MAX_STRUCTURE_AND_LOCALIZATION_LABEL_LENGTH> deviceLocalizationLabel,
53 std::vector<std::uint8_t> deviceExtendedStructureLabel,
54 std::uint64_t clientIsoNAME);
64 std::uint16_t deviceElementNumber,
65 std::uint16_t parentObjectID,
67 std::uint16_t uniqueID);
78 std::uint16_t processDataDDI,
79 std::uint16_t deviceValuePresentationObjectID,
80 std::uint8_t processDataProperties,
81 std::uint8_t processDataTriggerMethods,
82 std::uint16_t uniqueID);
92 std::int32_t propertyValue,
93 std::uint16_t propertyDDI,
94 std::uint16_t valuePresentationObject,
95 std::uint16_t uniqueID);
105 std::int32_t offsetValue,
107 std::uint8_t numberDecimals,
108 std::uint16_t uniqueID);
146 std::shared_ptr<task_controller_object::Object>
get_object_by_id(std::uint16_t objectID);
180 std::uint16_t
size()
const;
194 std::vector<std::shared_ptr<task_controller_object::Object>>
objectList;
A class that represents a control function's NAME.
Defines a device descriptor object pool.
std::uint8_t taskControllerCompatibilityLevel
Stores the max TC version.
void clear()
Clears the DDOP back to an empty state.
std::shared_ptr< task_controller_object::Object > get_object_by_index(std::uint16_t index)
Gets an object from the DDOP by index based on object creation.
bool generate_task_data_iso_xml(std::string &resultantString)
bool add_device_element(std::string deviceElementDesignator, std::uint16_t deviceElementNumber, std::uint16_t parentObjectID, task_controller_object::DeviceElementObject::Type deviceElementType, std::uint16_t uniqueID)
Adds a device element object to the DDOP.
static constexpr std::uint8_t MAX_TC_VERSION_SUPPORTED
The max TC version a DDOP object can support as of today.
std::shared_ptr< task_controller_object::Object > get_object_by_id(std::uint16_t objectID)
Gets an object from the DDOP that corresponds to a certain object ID.
bool generate_binary_object_pool(std::vector< std::uint8_t > &resultantPool)
std::uint8_t get_task_controller_compatibility_level() const
Returns the current TC version used when generating a binary DDOP.
static std::uint8_t get_max_supported_task_controller_version()
Returns The maximum TC version supported by the CAN stack's DDOP generator.
bool remove_object_by_id(std::uint16_t objectID)
Removes an object from the DDOP using its object ID.
bool add_device(std::string deviceDesignator, std::string deviceSoftwareVersion, std::string deviceSerialNumber, std::string deviceStructureLabel, std::array< std::uint8_t, task_controller_object::DeviceObject::MAX_STRUCTURE_AND_LOCALIZATION_LABEL_LENGTH > deviceLocalizationLabel, std::vector< std::uint8_t > deviceExtendedStructureLabel, std::uint64_t clientIsoNAME)
Adds a device object to the DDOP.
std::vector< std::shared_ptr< task_controller_object::Object > > objectList
Maintains a list of all added objects.
DeviceDescriptorObjectPool()=default
Default constructor for a DDOP. Sets TC compatibility to version 4.
bool add_device_process_data(std::string processDataDesignator, std::uint16_t processDataDDI, std::uint16_t deviceValuePresentationObjectID, std::uint8_t processDataProperties, std::uint8_t processDataTriggerMethods, std::uint16_t uniqueID)
Adds a device process data object to the DDOP.
std::uint16_t size() const
Returns the number of objects in the DDOP.
void set_task_controller_compatibility_level(std::uint8_t tcVersion)
Sets the TC version to use when generating a binary DDOP.
bool resolve_parent_ids_to_objects()
Checks to see that all parent object IDs correspond to an object in this DDOP.
bool deserialize_binary_object_pool(std::vector< std::uint8_t > &binaryPool, NAME clientNAME=NAME(0))
Attempts to take a binary object pool and convert it back into C++ objects. Useful for a task control...
bool add_device_property(std::string propertyDesignator, std::int32_t propertyValue, std::uint16_t propertyDDI, std::uint16_t valuePresentationObject, std::uint16_t uniqueID)
Adds a device property object to the DDOP.
bool check_object_id_unique(std::uint16_t uniqueID) const
Checks the DDOP to see if an object ID has already been used.
bool add_device_value_presentation(std::string unitDesignator, std::int32_t offsetValue, float scaleFactor, std::uint8_t numberDecimals, std::uint16_t uniqueID)
Adds a device value presentation object to the DDOP.
A class that represents an ISO11783 control function NAME from an address claim.
Type
Enumerates the types of device element object.
Defines a set of C++ objects that represent a DDOP.
This namespace encompasses all of the ISO11783 stack's functionality to reduce global namespace pollu...