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

A storage class to hold data about callbacks for a specific PGN. More...

#include <can_callbacks.hpp>

Collaboration diagram for isobus::ParameterGroupNumberCallbackData:
[legend]

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< InternalControlFunctionget_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< InternalControlFunctioninternalControlFunctionFilter
 An optional way to filter callbacks based on the destination of messages from the partner.
 

Detailed Description

A storage class to hold data about callbacks for a specific PGN.

Definition at line 77 of file can_callbacks.hpp.

Constructor & Destructor Documentation

◆ ParameterGroupNumberCallbackData()

isobus::ParameterGroupNumberCallbackData::ParameterGroupNumberCallbackData ( std::uint32_t parameterGroupNumber,
CANLibCallback callback,
void * parentPointer,
std::shared_ptr< InternalControlFunction > internalControlFunction )

A constructor for holding callback data.

Parameters
[in]parameterGroupNumberThe PGN you want to register a callback for
[in]callbackThe function you want the stack to call when it gets receives a message with a matching PGN
[in]parentPointerA generic variable that can provide context to which object the callback was meant for
[in]internalControlFunctionAn internal control function to use as an additional filter for the callback

Definition at line 13 of file can_callbacks.cpp.

Member Function Documentation

◆ get_callback()

CANLibCallback isobus::ParameterGroupNumberCallbackData::get_callback ( ) const

Returns the callback pointer for this data object.

Returns
The callback pointer for this data object

Definition at line 34 of file can_callbacks.cpp.

Here is the caller graph for this function:

◆ get_internal_control_function()

std::shared_ptr< InternalControlFunction > isobus::ParameterGroupNumberCallbackData::get_internal_control_function ( ) const

Returns the ICF being used as a filter for this callback.

Returns
A pointer to the ICF being used as a filter, or nullptr

Definition at line 44 of file can_callbacks.cpp.

◆ get_parameter_group_number()

std::uint32_t isobus::ParameterGroupNumberCallbackData::get_parameter_group_number ( ) const

Returns the PGN associated with this callback data.

Returns
The PGN associated with this callback data

Definition at line 29 of file can_callbacks.cpp.

◆ get_parent()

void * isobus::ParameterGroupNumberCallbackData::get_parent ( ) const

Returns the parent pointer for this data object.

Returns
The parent pointer for this data object

Definition at line 39 of file can_callbacks.cpp.

Here is the caller graph for this function:

◆ operator==()

bool isobus::ParameterGroupNumberCallbackData::operator== ( const ParameterGroupNumberCallbackData & obj) const

Equality operator for this class.

Parameters
[in]objThe object to check equality against
Returns
true if the objects have equivalent data

Definition at line 21 of file can_callbacks.cpp.

Member Data Documentation

◆ callback

CANLibCallback isobus::ParameterGroupNumberCallbackData::callback
private

The callback that will get called when a matching PGN is received.

Definition at line 109 of file can_callbacks.hpp.

◆ internalControlFunctionFilter

std::shared_ptr<InternalControlFunction> isobus::ParameterGroupNumberCallbackData::internalControlFunctionFilter
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.

◆ parameterGroupNumber

std::uint32_t isobus::ParameterGroupNumberCallbackData::parameterGroupNumber
private

The PGN assocuiated with this callback.

Definition at line 110 of file can_callbacks.hpp.

◆ parent

void* isobus::ParameterGroupNumberCallbackData::parent
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.


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