C/C++ API Reference
Loading...
Searching...
No Matches
pw::persistent_ram::Persistent< T > Class Template Reference

Overview

template<typename T>
class pw::persistent_ram::Persistent< T >

A simple container for holding a value T with CRC16 integrity checking.

A Persistent is simply a value T plus integrity checking for use in a persistent RAM section which is not initialized on boot.

Warning
Unlike a DoubleBufferedPersistent, a Persistent will be lost if a write/set operation is interrupted or otherwise not completed.

TODO: b/235277454 - Consider a different integrity check implementation which does not use a 512B lookup table.

Classes

class  Mutator
 

Public Member Functions

 Persistent (const Persistent &)=delete
 
 Persistent (Persistent &&)=delete
 
template<class... Args>
const T & emplace (Args &&... args)
 
template<typename U = T>
Persistentoperator= (U &&value)
 
void Invalidate ()
 
void reset ()
 
bool has_value () const
 
const T & value () const
 
Mutator mutator (GetterAction action=GetterAction::kAssertValid)
 

Friends

class Mutator
 

The documentation for this class was generated from the following file: