EnOcean Link  1.14.0.0
Middleware to Connect EnOcean easily to other Projects
eoRollingCodeStorage Class Reference

Manages the rolling codes. More...

#include <eoRollingCodeStorage.h>

Public Member Functions

 eoRollingCodeStorage ()
 
void SetRLC (uint32_t id, uint32_t rlc)
 
eoReturn GetRLC (uint32_t id, uint32_t &rlc)
 
eoReturn RemoveID (uint32_t id)
 
eoReturn Save (const char *file)
 
eoReturn Load (const char *file)
 

Detailed Description

Manages the rolling codes.

The RollingCodeStorage helps you to manage rolling codes. Using it functions you can get the rolling code to the IDs.

Constructor & Destructor Documentation

◆ eoRollingCodeStorage()

eoRollingCodeStorage::eoRollingCodeStorage ( )

Constructor

Member Function Documentation

◆ GetRLC()

eoReturn eoRollingCodeStorage::GetRLC ( uint32_t  id,
uint32_t &  rlc 
)

Searches for the ID between the IDs and returns the value of rolling code.

Parameters
idThe device ID
rlcValue of the rolling code

◆ Load()

eoReturn eoRollingCodeStorage::Load ( const char *  file)

Loads the files data into map data. It deletes every values in the map before loading values into the file. Note: you have to add the extension (e.g. test.txt)

Parameters
fileName of the file
Returns
EO_OK or error code if could not read the file

◆ RemoveID()

eoReturn eoRollingCodeStorage::RemoveID ( uint32_t  id)

Searches for the ID between the IDs and delete the ID and the corresponding rolling code.

Parameters
idThe device ID

◆ Save()

eoReturn eoRollingCodeStorage::Save ( const char *  file)

Saves the map data into file Note: you have to add the extension (e.g. test.txt)

Parameters
fileName of the file
Returns
EO_OK or error code if could not create the file

◆ SetRLC()

void eoRollingCodeStorage::SetRLC ( uint32_t  id,
uint32_t  rlc 
)

A new ID is added with the rolling code, if the ID already exists, it overwrites the previous rolling code.

Parameters
idThe device ID
rlcValue of the rolling code