|
Bluenet
5.7.0
Bluenet, firmware for nRF52 smart home devices
|
Class to operate on bluenet to bluenet IPC ram. More...
#include <cs_IpcRamBluenet.h>
Public Member Functions | |
| void | init () |
| Reads the IPC ram. More... | |
| bool | isValidOnBoot () |
| Whether the IPC ram data was valid before init. More... | |
| const bluenet_ipc_bluenet_data_t & | getData () |
| Get the current data. More... | |
| void | updateEnergyUsed (const int64_t &energyUsed) |
| Update the energy field. More... | |
| void | updateMicroappData (uint8_t appIndex, const microapp_reboot_data_t &data) |
| Update a microapp field. More... | |
Static Public Member Functions | |
| static IpcRamBluenet & | getInstance () |
| Get the singleton instance. More... | |
Private Member Functions | |
| IpcRamBluenet () | |
| Constructor, singleton, thus made private. More... | |
| IpcRamBluenet (IpcRamBluenet const &)=delete | |
| Copy constructor, singleton, thus made private. More... | |
| IpcRamBluenet & | operator= (IpcRamBluenet const &)=delete |
| Assignment operator, singleton, thus made private. More... | |
| void | clearData () |
| Clear the cached data. More... | |
| void | updateData () |
| Copy cache to IPC ram. More... | |
| void | printData () |
Private Attributes | |
| bluenet_ipc_data_payload_t | _ipcData |
| Cache the data in IPC. More... | |
| bool | _isValidOnBoot = false |
Class to operate on bluenet to bluenet IPC ram.
An alternative to this class would be to add a method to the IpcRamData class to update a single field.
|
private |
Constructor, singleton, thus made private.
|
privatedelete |
Copy constructor, singleton, thus made private.
|
private |
Clear the cached data.
| const bluenet_ipc_bluenet_data_t & IpcRamBluenet::getData | ( | ) |
Get the current data.
Don't forget to first check whether the data is valid on boot.
|
static |
Get the singleton instance.
| void IpcRamBluenet::init | ( | ) |
Reads the IPC ram.
If it's not valid, the data will be cleared. After init, the data is valid.
| bool IpcRamBluenet::isValidOnBoot | ( | ) |
Whether the IPC ram data was valid before init.
|
privatedelete |
Assignment operator, singleton, thus made private.
|
private |
|
private |
Copy cache to IPC ram.
| void IpcRamBluenet::updateEnergyUsed | ( | const int64_t & | energyUsed | ) |
Update the energy field.
Will write the data to IPC ram.
| void IpcRamBluenet::updateMicroappData | ( | uint8_t | appIndex, |
| const microapp_reboot_data_t & | data | ||
| ) |
Update a microapp field.
Will write the data to IPC ram.
|
private |
Cache the data in IPC.
|
private |