FOSSASAT-1B
persistent_storage.h File Reference

This module controls access to the EEPROM. More...

#include "FossaSat1B.h"
#include <EEPROM.h>
Include dependency graph for persistent_storage.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

template<typename T >
Persistent_Storage_Read (uint16_t addr)
 This function reads a value of type T from EEPROM. More...
 
template<typename T >
void Persistent_Storage_Write (uint16_t addr, T val)
 This function writes a value of type T to the eerom. More...
 
void Persistent_Storage_Wipe ()
 This functions clears the EEPROM by writing EEPROM_RESET_VALUE to each memory addres. More...
 
void Persistent_Storage_Increment_Counter (uint16_t addr)
 This functions increments 2-byte counter in EEPROM. More...
 
void Persistent_Storage_Increment_Frame_Counter (bool valid)
 This functions increments one of frame counters of the currently active modem in EEPROM. More...
 
template<typename T >
void Persistent_Storage_Update_Stats (uint16_t addr, T val)
 Updates minimum, average and maximum stats in EEPROM. More...
 

Detailed Description

This module controls access to the EEPROM.

Definition in file persistent_storage.h.

Function Documentation

◆ Persistent_Storage_Increment_Counter()

void Persistent_Storage_Increment_Counter ( uint16_t  addr)

This functions increments 2-byte counter in EEPROM.

Parameters
addrThe address of counter to increment

Definition at line 55 of file persistent_storage.cpp.

Here is the caller graph for this function:

◆ Persistent_Storage_Increment_Frame_Counter()

void Persistent_Storage_Increment_Frame_Counter ( bool  valid)

This functions increments one of frame counters of the currently active modem in EEPROM.

Parameters
validWhether to increment valid or invalid counter

Definition at line 59 of file persistent_storage.cpp.

Here is the caller graph for this function:

◆ Persistent_Storage_Read()

template<typename T >
T Persistent_Storage_Read ( uint16_t  addr)

This function reads a value of type T from EEPROM.

Template Parameters
T
Parameters
addrMemory address.
Returns
T

Definition at line 22 of file persistent_storage.h.

◆ Persistent_Storage_Update_Stats()

template<typename T >
void Persistent_Storage_Update_Stats ( uint16_t  addr,
val 
)

Updates minimum, average and maximum stats in EEPROM.

Template Parameters
T
Parameters
addrMemory address.
val

Definition at line 73 of file persistent_storage.h.

◆ Persistent_Storage_Wipe()

void Persistent_Storage_Wipe ( )

This functions clears the EEPROM by writing EEPROM_RESET_VALUE to each memory addres.

Test:
(ID PERSIS_STOR_H_T0) (SEV 1) Does the EEPROM enter a valid state after this function is ran?

Definition at line 3 of file persistent_storage.cpp.

Here is the caller graph for this function:

◆ Persistent_Storage_Write()

template<typename T >
void Persistent_Storage_Write ( uint16_t  addr,
val 
)

This function writes a value of type T to the eerom.

Template Parameters
T
Parameters
addrMemory address.
val

Definition at line 36 of file persistent_storage.h.

Here is the call graph for this function: