Generalized-Core-Counter 3.20
Particle-based generalized core counter firmware
Loading...
Searching...
No Matches
MyPersistentData.h File Reference

Persistent Data Storage Structures - EEPROM/Retained Memory Management. More...

#include "Particle.h"
#include "StorageHelperRK.h"

Go to the source code of this file.

Classes

class  currentStatusData::CurrentData
class  currentStatusData
class  sensorConfigData
class  sensorConfigData::SensorData
class  sysStatusData::SysData
class  sysStatusData
 This class is a singleton; you do not create one as a global, on the stack, or with new. More...

Macros

#define current   currentStatusData::instance()
#define sensorConfig   sensorConfigData::instance()
#define sysStatus   sysStatusData::instance()

Enumerations

enum  CountingMode { COUNTING = 0 , OCCUPANCY = 1 , SCHEDULED = 2 }
 Counting mode defines how the device processes sensor events. More...
enum  OperatingMode { CONNECTED = 0 , LOW_POWER = 1 , DISCONNECTED = 2 }
 Operating mode defines power and connectivity behavior. More...

Detailed Description

Persistent Data Storage Structures - EEPROM/Retained Memory Management.

Defines data structures for device configuration, sensor settings, and runtime state that persist across power cycles and reboots. Uses StorageHelperRK for efficient EEPROM/retained memory operations with automatic validation and versioning.

Author
Chip McClelland
Date
December 12, 2025

@license MIT License

Copyright (c) 2025 Chip McClelland

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Definition in file MyPersistentData.h.

Macro Definition Documentation

◆ current

◆ sensorConfig

◆ sysStatus

Enumeration Type Documentation

◆ CountingMode

Counting mode defines how the device processes sensor events.

COUNTING: Interrupt-driven event counting. OCCUPANCY: Interrupt-driven occupied/unoccupied tracking. SCHEDULED: Non-interrupt, time-based sampling.

Enumerator
COUNTING 
OCCUPANCY 
SCHEDULED 

Definition at line 53 of file MyPersistentData.h.

◆ OperatingMode

Operating mode defines power and connectivity behavior.

CONNECTED: Device stays connected to cloud, reports frequently. LOW_POWER: Device disconnects between reports to save battery. DISCONNECTED: Device never auto-connects (test / bench mode).

Enumerator
CONNECTED 
LOW_POWER 
DISCONNECTED 

Definition at line 66 of file MyPersistentData.h.