Bluenet  5.7.0
Bluenet, firmware for nRF52 smart home devices
Loading...
Searching...
No Matches
cs_State.h File Reference
#include <cfg/cs_Boards.h>
#include <common/cs_BaseClass.h>
#include <common/cs_Types.h>
#include <drivers/cs_Storage.h>
#include <drivers/cs_Timer.h>
#include <events/cs_EventListener.h>
#include <protocol/cs_ErrorCodes.h>
#include <vector>
Include dependency graph for cs_State.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  cs_state_store_queue_t
 Struct for queuing operations. More...
 
struct  cs_id_list_t
 
class  State
 Stores state values in RAM and/or FLASH. More...
 

Macros

#define FACTORY_RESET_STATE_NORMAL   0
 
#define FACTORY_RESET_STATE_LOWTX   1
 
#define FACTORY_RESET_STATE_RESET   2
 

Enumerations

enum class  StateQueueMode { DELAY , THROTTLE }
 
enum  StateQueueOp { CS_STATE_QUEUE_OP_WRITE , CS_STATE_QUEUE_OP_REM_ONE_ID_OF_TYPE , CS_STATE_QUEUE_OP_FACTORY_RESET , CS_STATE_QUEUE_OP_GC }
 

Functions

constexpr const char * operationModeName (OperationMode const &mode)
 These strings end up in the firmware, even with binary logging. More...
 
constexpr int ValidMode (OperationMode const &mode)
 
constexpr OperationMode getOperationMode (uint8_t mode)
 

Variables

const uint32_t CS_STATE_QUEUE_DELAY_SECONDS_MAX = 0xFFFFFFFF / 1000
 

Macro Definition Documentation

◆ FACTORY_RESET_STATE_LOWTX

#define FACTORY_RESET_STATE_LOWTX   1

◆ FACTORY_RESET_STATE_NORMAL

#define FACTORY_RESET_STATE_NORMAL   0

◆ FACTORY_RESET_STATE_RESET

#define FACTORY_RESET_STATE_RESET   2

Enumeration Type Documentation

◆ StateQueueMode

enum class StateQueueMode
strong
Enumerator
DELAY 
THROTTLE 

◆ StateQueueOp

Enumerator
CS_STATE_QUEUE_OP_WRITE 
CS_STATE_QUEUE_OP_REM_ONE_ID_OF_TYPE 
CS_STATE_QUEUE_OP_FACTORY_RESET 
CS_STATE_QUEUE_OP_GC 

Function Documentation

◆ getOperationMode()

constexpr OperationMode getOperationMode ( uint8_t  mode)
constexpr

◆ operationModeName()

constexpr const char * operationModeName ( OperationMode const &  mode)
constexpr

These strings end up in the firmware, even with binary logging.

So keep them short.

◆ ValidMode()

constexpr int ValidMode ( OperationMode const &  mode)
constexpr

Variable Documentation

◆ CS_STATE_QUEUE_DELAY_SECONDS_MAX

const uint32_t CS_STATE_QUEUE_DELAY_SECONDS_MAX = 0xFFFFFFFF / 1000