16#ifndef FLUX_NVS_MANAGER_H_
17#define FLUX_NVS_MANAGER_H_
22#include "core/hf-core-drivers/internal/hf-internal-interface-wrap/inc/base/BaseNvs.h"
66 [[nodiscard]] BaseNvs&
App() noexcept {
return app_; }
Singleton owning the Flux board's persistent-storage namespaces.
Definition NvsManager.h:35
NvsManager(NvsManager &&)=delete
std::atomic< flux::hal::ManagerError > manager_error_
Definition NvsManager.h:88
BaseNvs & config_
flux_cfg (binding slot 2)
Definition NvsManager.h:84
NvsManager & operator=(NvsManager &&)=delete
hf_nvs_err_t GetLastError() const noexcept
Last NVS error from the most recent failing operation (any region).
Definition NvsManager.h:55
bool IsInitialized() const noexcept
Definition NvsManager.h:47
flux::hal::ManagerError GetManagerError() const noexcept
Lifecycle / bind error of the last EnsureInitialized() (shared catalog).
Definition NvsManager.h:61
void SetLastError(hf_nvs_err_t e) noexcept
Definition NvsManager.h:80
BaseNvs & App() noexcept
General application storage (flux namespace).
Definition NvsManager.h:66
BaseNvs & Calibration() noexcept
Calibration and tuning blobs (flux_cal namespace).
Definition NvsManager.h:69
bool Deinitialize() noexcept
Close namespaces (call after other subsystems if they may persist on shutdown).
Definition NvsManager.cpp:72
static NvsManager & GetInstance() noexcept
Definition NvsManager.cpp:17
BaseNvs & Config() noexcept
Device configuration (flux_cfg namespace).
Definition NvsManager.h:72
bool EnsureInitialized() noexcept
Initialize NVS flash (once) and open all Flux namespaces.
Definition NvsManager.cpp:31
NvsManager(const NvsManager &)=delete
BaseNvs & app_
flux (binding slot 0)
Definition NvsManager.h:82
BaseNvs & calibration_
flux_cal (binding slot 1)
Definition NvsManager.h:83
void DumpStatistics() const noexcept
Definition NvsManager.cpp:88
std::atomic< bool > initialized_
Definition NvsManager.h:86
NvsManager & operator=(const NvsManager &)=delete
hf_nvs_err_t last_error_
Definition NvsManager.h:87
Shared HAL types for Flux V1: the manager error catalog and the facade result.
ManagerError
Lifecycle / bind failure catalog shared by every manager (GetManagerError()).
Definition flux_hal_types.hpp:37
@ NotInitialized
Manager not initialised (or shut down)