Bluenet  5.7.0
Bluenet, firmware for nRF52 smart home devices
Loading...
Searching...
No Matches
Setup Class Reference

Setup class. More...

#include <cs_Setup.h>

Inheritance diagram for Setup:
Collaboration diagram for Setup:

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 SetupgetInstance ()
 

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...
 
- Private Member Functions inherited from EventListener
 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
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ Setup()

Setup::Setup ( )
private

Member Function Documentation

◆ finalize()

void Setup::finalize ( )
private

Finalize the setup.

Check if operation mode on flash is normal. Notify the result.

◆ getInstance()

static Setup & Setup::getInstance ( )
inlinestatic

◆ getPersistedOperationMode()

OperationMode Setup::getPersistedOperationMode ( )
private

◆ handleCommand()

cs_ret_code_t Setup::handleCommand ( cs_data_t  data)

◆ handleEvent()

void Setup::handleEvent ( event_t event)
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.

◆ onStorageDone()

void Setup::onStorageDone ( const CS_TYPE type)
private

◆ resetDelayed()

void Setup::resetDelayed ( )
private

◆ resolveAsyncResult()

void Setup::resolveAsyncResult ( ErrorCodesGeneral  errCode)
private

◆ setNormalMode()

void Setup::setNormalMode ( )
private

◆ setWithCheck()

void Setup::setWithCheck ( const CS_TYPE type,
void *  value,
const size16_t  size 
)
private

Member Data Documentation

◆ _successfullyStoredBitmask

uint32_t Setup::_successfullyStoredBitmask = 0
private

The documentation for this class was generated from the following file: