AgIsoStack++
A control-function-focused implementation of the major ISOBUS and J1939 protocols
|
A storage class to hold data about callbacks for a specific PGN. More...
#include <can_callbacks.hpp>
Public Member Functions | |
ParameterGroupNumberCallbackData (std::uint32_t parameterGroupNumber, CANLibCallback callback, void *parentPointer, std::shared_ptr< InternalControlFunction > internalControlFunction) | |
A constructor for holding callback data. | |
bool | operator== (const ParameterGroupNumberCallbackData &obj) const |
Equality operator for this class. | |
std::uint32_t | get_parameter_group_number () const |
Returns the PGN associated with this callback data. | |
CANLibCallback | get_callback () const |
Returns the callback pointer for this data object. | |
void * | get_parent () const |
Returns the parent pointer for this data object. | |
std::shared_ptr< InternalControlFunction > | get_internal_control_function () const |
Returns the ICF being used as a filter for this callback. | |
Private Attributes | |
CANLibCallback | callback |
The callback that will get called when a matching PGN is received. | |
std::uint32_t | parameterGroupNumber |
The PGN assocuiated with this callback. | |
void * | parent |
A generic variable that can provide context to which object the callback was meant for. | |
std::shared_ptr< InternalControlFunction > | internalControlFunctionFilter |
An optional way to filter callbacks based on the destination of messages from the partner. | |
A storage class to hold data about callbacks for a specific PGN.
Definition at line 77 of file can_callbacks.hpp.
isobus::ParameterGroupNumberCallbackData::ParameterGroupNumberCallbackData | ( | std::uint32_t | parameterGroupNumber, |
CANLibCallback | callback, | ||
void * | parentPointer, | ||
std::shared_ptr< InternalControlFunction > | internalControlFunction ) |
A constructor for holding callback data.
[in] | parameterGroupNumber | The PGN you want to register a callback for |
[in] | callback | The function you want the stack to call when it gets receives a message with a matching PGN |
[in] | parentPointer | A generic variable that can provide context to which object the callback was meant for |
[in] | internalControlFunction | An internal control function to use as an additional filter for the callback |
Definition at line 13 of file can_callbacks.cpp.
CANLibCallback isobus::ParameterGroupNumberCallbackData::get_callback | ( | ) | const |
Returns the callback pointer for this data object.
Definition at line 34 of file can_callbacks.cpp.
std::shared_ptr< InternalControlFunction > isobus::ParameterGroupNumberCallbackData::get_internal_control_function | ( | ) | const |
Returns the ICF being used as a filter for this callback.
Definition at line 44 of file can_callbacks.cpp.
std::uint32_t isobus::ParameterGroupNumberCallbackData::get_parameter_group_number | ( | ) | const |
Returns the PGN associated with this callback data.
Definition at line 29 of file can_callbacks.cpp.
void * isobus::ParameterGroupNumberCallbackData::get_parent | ( | ) | const |
Returns the parent pointer for this data object.
Definition at line 39 of file can_callbacks.cpp.
bool isobus::ParameterGroupNumberCallbackData::operator== | ( | const ParameterGroupNumberCallbackData & | obj | ) | const |
Equality operator for this class.
[in] | obj | The object to check equality against |
Definition at line 21 of file can_callbacks.cpp.
|
private |
The callback that will get called when a matching PGN is received.
Definition at line 109 of file can_callbacks.hpp.
|
private |
An optional way to filter callbacks based on the destination of messages from the partner.
Definition at line 112 of file can_callbacks.hpp.
|
private |
The PGN assocuiated with this callback.
Definition at line 110 of file can_callbacks.hpp.
|
private |
A generic variable that can provide context to which object the callback was meant for.
Definition at line 111 of file can_callbacks.hpp.