esp32_BNO08x 1.4 C++ BNO08x IMU driver component for esp-idf.

BNO08xCbParamRptID.hpp
Go to the documentation of this file.
1
6#pragma once
7
8#include "BNO08xCbGeneric.hpp"
9
15 class BNO08xCbParamRptID : public BNO08xCbGeneric
16{
17 public:
18 BNO08xCbParamRptID(std::function<void(uint8_t)> cb_fxn, uint8_t rpt_ID)
19 : BNO08xCbGeneric(rpt_ID)
20 , cb_fxn(cb_fxn)
21
22 {
23 }
24
32 void invoke(uint8_t rpt_ID) override
33 {
34 cb_fxn(rpt_ID);
35 }
36
37 private:
38 std::function<void(uint8_t)> cb_fxn;
39};
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::invoke
void invoke(uint8_t rpt_ID) override
Invokes contained callback function.
Definition: BNO08xCbParamRptID.hpp:32