# esp32_BNO08x: include/callback/BNO08xCbParamRptID.hpp Source File

Loading...
Searching...
No Matches
BNO08xCbParamRptID.hpp
Go to the documentation of this file.
#pragma once
#include "BNO08xCbGeneric.hpp"
class BNO08xCbParamRptID : public BNO08xCbGeneric
{
public:
BNO08xCbParamRptID(std::function<void(uint8_t)> cb_fxn, uint8_t rpt_ID)
: BNO08xCbGeneric(rpt_ID)
, cb_fxn(cb_fxn)
{
}
void invoke(uint8_t rpt_ID) override
{
cb_fxn(rpt_ID);
}
private:
std::function<void(uint8_t)> cb_fxn;
};
BNO08xCbGeneric.hpp
BNO08xCbGeneric
Parent class to represent callback functions as generic type such that all flavors can be invoked by ...
Definition BNO08xCbGeneric.hpp:19
BNO08xCbGeneric::rpt_ID
uint8_t rpt_ID
Definition BNO08xCbGeneric.hpp:23
BNO08xCbParamRptID
Class to hold callback functions which are passed report ID as input parameter.
Definition BNO08xCbParamRptID.hpp:16
BNO08xCbParamRptID::BNO08xCbParamRptID
BNO08xCbParamRptID(std::function< void(uint8_t)> cb_fxn, uint8_t rpt_ID)
Definition BNO08xCbParamRptID.hpp:18
BNO08xCbParamRptID::cb_fxn
std::function< void(uint8_t)> cb_fxn
Wrapped callback function passed at register_cb().
Definition BNO08xCbParamRptID.hpp:38
BNO08xCbParamRptID::invoke
void invoke(uint8_t rpt_ID) override
Invokes contained callback function.
Definition BNO08xCbParamRptID.hpp:32