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

Stores the raw byte data associated with a functionality based on what the user has enabled and what options the user has set for that functionality. More...

Public Member Functions

 FunctionalityData (Functionalities functionalityToStore)
 Constructor for a FunctionalityData object.
 
void configure_default_data ()
 Sets up default data associated to the functionality the object is representing.
 
void set_bit_in_option (std::uint8_t byteIndex, std::uint8_t bit, bool value)
 A helper function to set a particular option bit to some value within an option byte.
 
bool get_bit_in_option (std::uint8_t byteIndex, std::uint8_t bit)
 A helper function to get a particular bit's value in the specified option byte.
 

Public Attributes

Functionalities functionality = Functionalities::MinimumControlFunction
 The functionality associated with this data.
 
std::vector< std::uint8_t > serializedValue
 The raw message data value for this functionality.
 
std::uint8_t generation = 1
 The generation of the functionality supported.
 

Detailed Description

Stores the raw byte data associated with a functionality based on what the user has enabled and what options the user has set for that functionality.

Definition at line 385 of file isobus_functionalities.hpp.

Constructor & Destructor Documentation

◆ FunctionalityData()

isobus::ControlFunctionFunctionalities::FunctionalityData::FunctionalityData ( Functionalities functionalityToStore)
explicit

Constructor for a FunctionalityData object.

Parameters
[in]functionalityToStoreThe ISO functionality that the object will represent

Definition at line 560 of file isobus_functionalities.cpp.

Member Function Documentation

◆ configure_default_data()

void isobus::ControlFunctionFunctionalities::FunctionalityData::configure_default_data ( )

Sets up default data associated to the functionality the object is representing.

This sets up the serializedValue to be a valid "no options" default set of bytes.

Definition at line 565 of file isobus_functionalities.cpp.

Here is the caller graph for this function:

◆ get_bit_in_option()

bool isobus::ControlFunctionFunctionalities::FunctionalityData::get_bit_in_option ( std::uint8_t byteIndex,
std::uint8_t bit )

A helper function to get a particular bit's value in the specified option byte.

Note
If the parameters are out of range, this will return zero.
Parameters
[in]byteIndexThe options byte index inside which the bit should be retrieved
[in]bitThe bit offset index of the bit you want to get, between 0 and 7
Returns
The state of the requested bit

Definition at line 638 of file isobus_functionalities.cpp.

◆ set_bit_in_option()

void isobus::ControlFunctionFunctionalities::FunctionalityData::set_bit_in_option ( std::uint8_t byteIndex,
std::uint8_t bit,
bool value )

A helper function to set a particular option bit to some value within an option byte.

Note
If the parameters are out of range, the data will not be modified
Parameters
[in]byteIndexThe options byte index inside which the bit should be set
[in]bitThe bit offset index of the bit you want to set, between 0 and 7
[in]valueThe new value for the desired bit

Definition at line 623 of file isobus_functionalities.cpp.

Member Data Documentation

◆ functionality

Functionalities isobus::ControlFunctionFunctionalities::FunctionalityData::functionality = Functionalities::MinimumControlFunction

The functionality associated with this data.

Definition at line 410 of file isobus_functionalities.hpp.

◆ generation

std::uint8_t isobus::ControlFunctionFunctionalities::FunctionalityData::generation = 1

The generation of the functionality supported.

Definition at line 412 of file isobus_functionalities.hpp.

◆ serializedValue

std::vector<std::uint8_t> isobus::ControlFunctionFunctionalities::FunctionalityData::serializedValue

The raw message data value for this functionality.

Definition at line 411 of file isobus_functionalities.hpp.


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