DCCpp
This is the library version of a program for Arduino to control railroading DCC devices.
EEStore Struct Reference

#include "EEStore.h"

Static Public Member Functions

static void init ()
 
static void reset ()
 
static int pointer ()
 
static void advance (int inIncrement)
 
static bool needsRefreshing ()
 
static void store ()
 
static void clear ()
 

Static Public Attributes

static EEStoreData data
 
static int eeAddress =0
 

Detailed Description

This structure/class stores accessories data in EEPROM.

The data is saved from byte 0 of EEPROM. The content is :

0--------------------------------------+----------+---------+---------+
| EEStoreData(see EEstoreData content) | Turnouts | Sensors | Outputs |
+--------------------------------------+----------+---------+---------+

Definition at line 43 of file EEStore.h.

Member Function Documentation

void EEStore::advance ( int  inIncrement)
static

Move the EEPROM address of the given value.

Parameters
inIncrementnumber of bytes to shift.

Definition at line 130 of file EEStore.cpp.

void EEStore::clear ( )
static

Clears the content of the EEStoreData structure. This function does not change the EEPROM.

Definition at line 70 of file EEStore.cpp.

void EEStore::init ( )
static

Clear all the EEPROM memory.

Definition at line 26 of file EEStore.cpp.

bool EEStore::needsRefreshing ( )
static

Checks if numbers of accessories have changed which needs to store new states.

Returns
True if the total number of accessories have changed.

Definition at line 112 of file EEStore.cpp.

int EEStore::pointer ( )
static

Gets the current EEPROM address.

Returns
current position in EEPROM memory.

Definition at line 141 of file EEStore.cpp.

void EEStore::reset ( )
static

Restart the eeAddress pointer at the end of the EEStoreData.

Definition at line 136 of file EEStore.cpp.

void EEStore::store ( )
static

Stores the current state of all accessories.

Definition at line 92 of file EEStore.cpp.

Member Data Documentation

EEStoreData EEStore::data
static

Data associated with this class.

Definition at line 45 of file EEStore.h.

int EEStore::eeAddress =0
static

Current EEPROM address. Used during storage.

Definition at line 46 of file EEStore.h.


The documentation for this struct was generated from the following files: