Time-of-Flight-SDK
Public Member Functions | List of all members
aditof::StorageInterface Class Referenceabstract

Interface for storage of data. For example: EEPROM, Flash, file on disk, etc. More...

#include <storage_interface.h>

Public Member Functions

virtual ~StorageInterface ()=default
 Destructor.
 
virtual aditof::Status open (void *handle)=0
 Open the communication channel with the storage. More...
 
virtual aditof::Status read (const uint32_t address, uint8_t *data, const size_t bytesCount)=0
 Read data from storage. More...
 
virtual aditof::Status write (const uint32_t address, const uint8_t *data, const size_t bytesCount)=0
 Write data to storage. More...
 
virtual aditof::Status close ()=0
 Close the communication channel with the storage. More...
 
virtual aditof::Status getName (std::string &name) const =0
 Retrieves the name of the storage. More...
 

Detailed Description

Interface for storage of data. For example: EEPROM, Flash, file on disk, etc.

Definition at line 47 of file storage_interface.h.

Member Function Documentation

◆ close()

virtual aditof::Status aditof::StorageInterface::close ( )
pure virtual

Close the communication channel with the storage.

Returns
Status

◆ getName()

virtual aditof::Status aditof::StorageInterface::getName ( std::string &  name) const
pure virtual

Retrieves the name of the storage.

Parameters
[out]name- This gets set with the name of the storage
Returns
Status

◆ open()

virtual aditof::Status aditof::StorageInterface::open ( void *  handle)
pure virtual

Open the communication channel with the storage.

Parameters
handle- A handle to the object through which communication is done
Returns
Status

◆ read()

virtual aditof::Status aditof::StorageInterface::read ( const uint32_t  address,
uint8_t *  data,
const size_t  bytesCount 
)
pure virtual

Read data from storage.

Parameters
address- The address from where the data should be read
[out]data- The location where the read data should be stored
bytesCount- The number of bytes to read
Returns
Status

◆ write()

virtual aditof::Status aditof::StorageInterface::write ( const uint32_t  address,
const uint8_t *  data,
const size_t  bytesCount 
)
pure virtual

Write data to storage.

Parameters
address- The starting address where the data should be written
data- The location of the data to be written
bytesCount- The number of bytes to write
Returns
Status

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