Bluenet
5.7.0
Bluenet, firmware for nRF52 smart home devices
|
#include <cs_Setup.h>
Public Member Functions | |
cs_ret_code_t | handleCommand (cs_data_t data) |
void | handleEvent (event_t &event) |
Handle events. More... | |
Static Public Member Functions | |
static Setup & | getInstance () |
Private Member Functions | |
Setup () | |
void | setWithCheck (const CS_TYPE &type, void *value, const size16_t size) |
void | onStorageDone (const CS_TYPE &type) |
void | setNormalMode () |
void | resolveAsyncResult (ErrorCodesGeneral errCode) |
void | resetDelayed () |
OperationMode | getPersistedOperationMode () |
void | finalize () |
Finalize the setup. More... | |
![]() | |
EventListener () | |
virtual | ~EventListener () |
unregisters the listener. More... | |
virtual void | handleEvent (event_t &event)=0 |
Handle events. More... | |
void | listen () |
Registers this with the EventDispatcher. More... | |
Private Attributes | |
uint32_t | _successfullyStoredBitmask = 0 |
Setup class.
Handles the setup command:
Sets all state variables. Waits for all state variables to be written to flash. Then sets the operation mode. Waits for operation mode to be written to flash. CMD_RESOLVE_ASYNC_CONTROL_COMMAND is sent. Then, the device will reboot after some time.
|
private |
|
private |
Finalize the setup.
Check if operation mode on flash is normal. Notify the result.
|
inlinestatic |
|
private |
cs_ret_code_t Setup::handleCommand | ( | cs_data_t | data | ) |
|
virtual |
Handle events.
This method is overloaded by all classes that derive from EventListener. They can receive an event_t struct and act upon it. These events are dispatched by the EventDispatcher.
Implements EventListener.
|
private |
|
private |
|
private |
|
private |
|
private |