modm API documentation

Callback type, which has to be passed to communication during actioncall in order to be able to receive a response. More...

#include <modm/communication/xpcc/response_callback.hpp>

Public Typedefs

typedef void (Communicatable::* Function) (const Header &header, const uint8_t *type)
 

Public Member Functions

template<typename C , typename P >
 ResponseCallback (C *componentObject, void (C::*memberFunction)(const Header &header, const P *packet))
 
template<typename C >
 ResponseCallback (C *componentObject, void (C::*memberFunction)(const Header &header))
 
bool isCallable () const
 
void call (const Header &header, const modm::SmartPointer &payload) const
 

Protected Attributes

Communicatable *const component
 
Function const function
 

Detailed Description

Callback type, which has to be passed to communication during actioncall in order to be able to receive a response.

Is a Functor.

Constructor & Destructor Documentation

template<typename C , typename P >
xpcc::ResponseCallback::ResponseCallback ( C *  componentObject,
void (C::*)(const Header &header, const P *packet)  memberFunction 
)
inline

Set the method that will be called when a response is received.

Parameters
componentObjectPointer to a component object
memberFunctionPointer to a function of the component object
template<typename C >
xpcc::ResponseCallback::ResponseCallback ( C *  componentObject,
void (C::*)(const Header &header)  memberFunction 
)
inline

Set the method that will be called when a response is received.

This specialization is to be used in case of no payload. The second parameter of the method has to be a void*.

Parameters
componentObjectPointer to a component object
memberFunctionPointer to a function of the component object

Member Function Documentation

void xpcc::ResponseCallback::call ( const Header header,
const modm::SmartPointer payload 
) const
inline

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