config namespace
Namespaces
- namespace detail
- namespace test_support
Classes
- struct ConfigSectionState
- Internal mutable state for one configuration section.
- struct ConfigSectionUpdate
- One pending config mutation applied against a single section snapshot.
- class ConfigSectionView
- Mutable, section-scoped configuration view.
- class ConfigStore
- Runtime configuration orchestrator.
- class ConfigValue
- class IConfigBackend
- Abstract storage backend used by
ConfigStore. -
template<typename Key, typename = void>struct is_key_descriptor
-
template<typename Key>struct is_key_descriptor<Key, std::void_t<typename Key::value_type, decltype(Key::name()), decltype(Key::default_value())>>
- struct LittleFsMountRecoveryDecision
- Result of evaluating one failed mount attempt against PacketRF policy.
- class PicoLittleFsConfigBackend
- PicoSDK flash backend that stores config section files in LittleFS.
- struct SectionKeySpec
- class SectionSchema
- class SpinMutex
-
template<typename Definition>class TypedConfigSection
- Typed facade over
ConfigSectionView. - class UnixFileConfigBackend
Enums
- enum class ConfigReadStatus: uint8_t { Ok = 0, NotFound = 1, Error = 2 }
- Result of a backend read operation.
- enum class ConfigSchemaType: uint8_t { Default = 0, Ip4 = 1 }
- Semantic schema type exposed through control introspection.
- enum class ConfigValueType: uint8_t { Bool = 0, Int64 = 1, UInt64 = 2, Double = 3, String = 4, Bytes = 5 }
- enum class LittleFsMountFailureClass: uint8_t { RecoverableNoFormat = 0u, UnrecoverableFormatEligible }
- Classification of a failed LittleFS mount attempt.
- enum class LittleFsMountRecoveryAction: uint8_t { None = 0u, FailWithoutFormat, FormatAndRetryMount }
- Action selected by PacketRF LittleFS mount recovery policy.
Typedefs
- using ConfigValueValidator = bool(*)(ConfigValue*value)
Functions
- auto decide_littlefs_mount_recovery(const int mount_rc, const bool format_if_mount_fails) -> LittleFsMountRecoveryDecision
- Returns PacketRF mount-recovery decision for one
lfs_mount()error. -
template<typename Key>auto key_validator() -> ConfigValueValidator
-
template<typename Key>auto make_key_spec() -> SectionKeySpec
-
template<typename... Keys>auto make_key_specs() -> std::vector<SectionKeySpec>
-
template<typename Tuple>auto make_key_specs_from_tuple() -> std::vector<SectionKeySpec>
-
template<typename Tuple, std::size_t... I>auto make_key_specs_from_tuple_impl(std::index_sequence<I...>) -> std::vector<SectionKeySpec>
- void mark_schema_key_type(std::vector<SectionKeySpec>*const keys, const std::string_view key_name, const ConfigSchemaType schema_type)
- auto to_string(const LittleFsMountFailureClass value) -> const char*
- Returns short diagnostic name for failure classification.
- auto to_string(const LittleFsMountRecoveryAction value) -> const char*
- Returns short diagnostic name for selected recovery action.
- auto validator_noop(ConfigValue*const value) -> bool
- Accepts any value type without modification.
-
template<size_t MaxLen>auto validator_string_max_len(ConfigValue*const value) -> bool
- Validates string maximum length.
-
template<uint64_t Min, uint64_t Max>auto validator_u64_clamp(ConfigValue*const value) -> bool
- Clamps unsigned integer to inclusive range.
-
template<uint64_t Mask>auto validator_u64_mask(ConfigValue*const value) -> bool
- Normalizes unsigned integer value by bit mask.
-
template<uint64_t Min, uint64_t Max>auto validator_u64_range(ConfigValue*const value) -> bool
- Validates unsigned integer inclusive range.
- auto write_section_snapshot_locked(const std::shared_ptr<IConfigBackend>& backend, SpinMutex*const backend_mutex, ConfigSectionState*const section, const std::unordered_map<std::string, ConfigValue>& values) -> bool
Variables
-
template<typename Key>bool is_key_descriptor_v constexpr
Enum documentation
enum class prf:: config:: ConfigReadStatus: uint8_t
#include <config/backend.hpp>
Result of a backend read operation.
Distinguishes "missing file" from hard I/O errors so callers can apply defaults.
enum class prf:: config:: ConfigSchemaType: uint8_t
#include <config/section_schema.hpp>
Semantic schema type exposed through control introspection.
The underlying stored ConfigValue type remains authoritative for config persistence. This enum refines how selected keys are presented and encoded over management interfaces.
enum class prf:: config:: ConfigValueType: uint8_t
#include <config/config_value.hpp>
enum class prf:: config:: LittleFsMountFailureClass: uint8_t
Classification of a failed LittleFS mount attempt.
PacketRF keeps the policy intentionally conservative. Only corruption reported directly by LittleFS is currently treated as an explicit "filesystem contents are not trustworthy" signal. Other failures are not auto-formatted because they may indicate transport, flash, partition, or integration issues where destructive recovery would hide the real problem.
enum class prf:: config:: LittleFsMountRecoveryAction: uint8_t
Action selected by PacketRF LittleFS mount recovery policy.
Typedef documentation
using prf:: config:: ConfigValueValidator = bool(*)(ConfigValue*value)
#include <config/section_schema.hpp>
Function documentation
LittleFsMountRecoveryDecision prf:: config:: decide_littlefs_mount_recovery(const int mount_rc,
const bool format_if_mount_fails)
Returns PacketRF mount-recovery decision for one lfs_mount() error.
#include <config/key_descriptor.hpp>
template<typename Key>
ConfigValueValidator prf:: config:: key_validator()
#include <config/key_descriptor.hpp>
template<typename Key>
SectionKeySpec prf:: config:: make_key_spec()
#include <config/key_descriptor.hpp>
template<typename... Keys>
std::vector<SectionKeySpec> prf:: config:: make_key_specs()
#include <config/key_descriptor.hpp>
template<typename Tuple>
std::vector<SectionKeySpec> prf:: config:: make_key_specs_from_tuple()
#include <config/key_descriptor.hpp>
template<typename Tuple, std::size_t... I>
std::vector<SectionKeySpec> prf:: config:: make_key_specs_from_tuple_impl(std::index_sequence<I...>)
void prf:: config:: mark_schema_key_type(std::vector<SectionKeySpec>*const keys,
const std::string_view key_name,
const ConfigSchemaType schema_type)
#include <config/section_schema.hpp>
const char* prf:: config:: to_string(const LittleFsMountFailureClass value)
Returns short diagnostic name for failure classification.
const char* prf:: config:: to_string(const LittleFsMountRecoveryAction value)
Returns short diagnostic name for selected recovery action.
bool prf:: config:: validator_noop(ConfigValue*const value)
#include <config/validators.hpp>
Accepts any value type without modification.
#include <config/validators.hpp>
template<size_t MaxLen>
bool prf:: config:: validator_string_max_len(ConfigValue*const value)
Validates string maximum length.
#include <config/validators.hpp>
template<uint64_t Min, uint64_t Max>
bool prf:: config:: validator_u64_clamp(ConfigValue*const value)
Clamps unsigned integer to inclusive range.
#include <config/validators.hpp>
template<uint64_t Mask>
bool prf:: config:: validator_u64_mask(ConfigValue*const value)
Normalizes unsigned integer value by bit mask.
#include <config/validators.hpp>
template<uint64_t Min, uint64_t Max>
bool prf:: config:: validator_u64_range(ConfigValue*const value)
Validates unsigned integer inclusive range.
bool prf:: config:: write_section_snapshot_locked(const std::shared_ptr<IConfigBackend>& backend,
SpinMutex*const backend_mutex,
ConfigSectionState*const section,
const std::unordered_map<std::string, ConfigValue>& values)
#include <config/config_store.cpp>
Variable documentation
#include <config/key_descriptor.hpp>
template<typename Key>
bool prf:: config:: is_key_descriptor_v constexpr