Void Sentry
An AI-driven, real-time Sentry Turret platform leveraging asynchronous I/O and computer vision to deliver high-precision autonomous motion tracking on resource-constrained embedded hardware.
Loading...
Searching...
No Matches
nvs_blob.h File Reference

One read sequence for fixed-size blobs in NVS, shared by the calibration and WiFi stores (device only). More...

#include <Preferences.h>
#include <cstddef>
#include <cstdint>
#include <span>

Go to the source code of this file.

Enumerations

enum class  nvs_blob::ReadStatus { Absent , Mismatch , Ok }
 Outcome of read(). More...
 

Functions

ReadStatus nvs_blob::read (Preferences &prefs, const char *key, std::span< uint8_t > out)
 Reads the blob under key into out, requiring the stored length to equal out.size().
 

Detailed Description

One read sequence for fixed-size blobs in NVS, shared by the calibration and WiFi stores (device only).

Enumeration Type Documentation

◆ ReadStatus

enum class nvs_blob::ReadStatus
strong

Outcome of read().

Enumerator
Absent 

the key does not exist (stored length 0)

Mismatch 

stored with a different length than expected, or the read came back short

Ok 

out holds exactly the stored bytes

Function Documentation

◆ read()

ReadStatus nvs_blob::read ( Preferences & prefs,
const char * key,
std::span< uint8_t > out )
inline

Reads the blob under key into out, requiring the stored length to equal out.size().

Same sequence the stores used inline: length query, size check, then the read with a size check.