mirror of
https://github.com/h2zero/esp-nimble-cpp.git
synced 2026-01-29 17:42:18 +01:00
46 lines
1007 B
C++
46 lines
1007 B
C++
/*
|
|
* NimBLEMeshElement.h
|
|
*
|
|
* Created: on Aug 23 2020
|
|
* Author H2zero
|
|
*
|
|
*/
|
|
|
|
#ifndef MAIN_NIMBLE_MESH_ELEMENT_H_
|
|
#define MAIN_NIMBLE_MESH_ELEMENT_H_
|
|
|
|
#include "sdkconfig.h"
|
|
#if defined(CONFIG_BT_ENABLED)
|
|
#include "nimconfig.h"
|
|
|
|
#include "NimBLEMeshNode.h"
|
|
#include "NimBLEMeshModel.h"
|
|
|
|
#include <vector>
|
|
|
|
class NimBLEMeshModelCallbacks;
|
|
class NimBLEMeshModel;
|
|
class NimBLEHealthSrvModel;
|
|
|
|
class NimBLEMeshElement {
|
|
public:
|
|
NimBLEMeshModel* createModel(uint16_t type, NimBLEMeshModelCallbacks* pCallbacks=nullptr);
|
|
NimBLEMeshModel* getModel(uint16_t type);
|
|
NimBLEMeshModel* getModelByIdx(uint8_t eidx, uint8_t midx, uint16_t type);
|
|
|
|
private:
|
|
friend class NimBLEMeshNode;
|
|
|
|
NimBLEMeshElement();
|
|
~NimBLEMeshElement();
|
|
void addModel(bt_mesh_model* model);
|
|
bt_mesh_elem* start();
|
|
|
|
bt_mesh_elem *m_pElem_t;
|
|
NimBLEHealthSrvModel* m_pHealthModel;
|
|
std::vector<bt_mesh_model> m_modelsVec;
|
|
};
|
|
|
|
|
|
#endif // CONFIG_BT_ENABLED
|
|
#endif // MAIN_NIMBLE_MESH_ELEMENT_H_
|