KNX IoT
KNX IoT Point API stack implementation
oc_storage.h File Reference

platform abstraction for storage (e.g. More...

#include <stddef.h>
#include <stdint.h>

Go to the source code of this file.

Functions

int oc_storage_config (const char *store)
 open the storage NOTE: For embedded devices, this function doesn't do anything. More...
 
int oc_storage_erase (const char *store)
 erase a stored file More...
 
long oc_storage_read (const char *store, uint8_t *buf, size_t size)
 read from the storage More...
 
long oc_storage_write (const char *store, uint8_t *buf, size_t size)
 write to storage More...
 

Detailed Description

platform abstraction for storage (e.g.

file writing)

Definition in file oc_storage.h.

Function Documentation

◆ oc_storage_config()

int oc_storage_config ( const char *  store)

open the storage NOTE: For embedded devices, this function doesn't do anything.

However, it needs to be called for hosted/virtual devices.

Parameters
storethe storage (path)
Returns
int

◆ oc_storage_erase()

int oc_storage_erase ( const char *  store)

erase a stored file

Parameters
storethe store (file path)
Returns
int 0 on success

◆ oc_storage_read()

long oc_storage_read ( const char *  store,
uint8_t *  buf,
size_t  size 
)

read from the storage

Parameters
storethe path to be read
bufthe buffer to store the contents
sizeamount of bytes to read
Returns
long amount of bytes read

◆ oc_storage_write()

long oc_storage_write ( const char *  store,
uint8_t *  buf,
size_t  size 
)

write to storage

Parameters
storethe store (file path)
bufthe buffer to write
sizethe size of the buffer to write
Returns
long amount of bytes written