16#include <device_state_manager.h>
18#include <nrf_mesh_defines.h>
42 typedef function<void(
const nrf_mesh_adv_packet_rx_data_t* scanData)>
callback_scan_t;
Event listener.
Definition: cs_EventListener.h:17
Class that:
Definition: cs_MeshCore.h:28
void handleEvent(event_t &event)
Internal usage.
cs_ret_code_t eraseAllPages()
Erase all flash pages used by the mesh for storage.
function< void(dsm_handle_t appkeyHandle)> callback_model_configure_t
Callback function definition.
Definition: cs_MeshCore.h:39
cs_ret_code_t stop()
Stop using the radio.
void registerScanCallback(const callback_scan_t &closure)
Register a callback function that's called when a device was scanned.
bool _isProvisioned
Definition: cs_MeshCore.h:157
dsm_handle_t _appkeyHandle
Definition: cs_MeshCore.h:150
void modelsInitCallback()
Internal usage.
void provision()
Do the provisioning.
uint8_t _devkey[NRF_MESH_KEY_SIZE]
Definition: cs_MeshCore.h:151
function< void(const nrf_mesh_adv_packet_rx_data_t *scanData)> callback_scan_t
Callback function definition.
Definition: cs_MeshCore.h:42
uint8_t _appkey[NRF_MESH_KEY_SIZE]
Definition: cs_MeshCore.h:149
void registerModelConfigureCallback(const callback_model_configure_t &closure)
Register a callback function that's called when the models should be configured.
MeshCore & operator=(MeshCore const &)=delete
Assignment operator, singleton, thus made private.
void factoryReset()
Factory reset.
void provisionSelf(uint16_t id)
void scanCallback(const nrf_mesh_adv_packet_rx_data_t *scanData)
Internal usage.
callback_model_configure_t _modelConfigureCallback
Definition: cs_MeshCore.h:144
uint8_t _netkey[NRF_MESH_KEY_SIZE]
Definition: cs_MeshCore.h:147
void factoryResetDone()
Internal usage.
callback_scan_t _scanCallback
Definition: cs_MeshCore.h:142
cs_ret_code_t init(const boards_config_t &board)
Init the mesh.
void start()
Start using the radio.
cs_ret_code_t setTxPower(int8_t txPower)
Set the TX power of mesh messages.
dsm_handle_t _netkeyHandle
Definition: cs_MeshCore.h:148
void registerModelInitCallback(const callback_model_init_t &closure)
Register a callback function that's called when the models should be initialized.
MeshCore(MeshCore const &)=delete
Copy constructor, singleton, thus made private.
uint16_t _ownAddress
Address of this node.
Definition: cs_MeshCore.h:155
bool _performingFactoryReset
Definition: cs_MeshCore.h:159
void getFlashPages(void *&startAddress, void *&endAddress)
static MeshCore & getInstance()
Get a reference to the MeshCore object.
bool isFlashValid()
Whether flash pages have valid data.
uint16_t getUnicastAddress()
Get the unicast address of this crownstone.
callback_model_init_t _modelInitCallback
Definition: cs_MeshCore.h:143
MeshCore()
Constructor, singleton, thus made private.
function< void()> callback_model_init_t
Callback function definition.
Definition: cs_MeshCore.h:36
dsm_handle_t _devkeyHandle
Definition: cs_MeshCore.h:152
Author: Crownstone Team Copyright: Crownstone (https://crownstone.rocks) Date: Oct 9,...
Definition: cs_Event.h:26
uint16_t cs_ret_code_t
Definition: cs_Typedefs.h:21
Board configuration.
Definition: cs_Boards.h:169