nRF5 IoT SDK  v0.9.0
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
iot_file_struct_t Struct Reference

Generic IoT File instance structure. More...

#include <iot_file_port.h>

Data Fields

const char * p_filename
 
iot_file_type_t type
 
uint32_t file_size
 
uint32_t cursor
 
uint32_t buffer_size
 
void * p_buffer
 
void * p_callback
 
void * p_arg
 
iot_fopen_t open
 
iot_fwrite_t write
 
iot_fread_t read
 
iot_ftell_t tell
 
iot_fseek_t seek
 
iot_frewind_t rewind
 
iot_fclose_t close
 

Detailed Description

Generic IoT File instance structure.

Field Documentation

uint32_t iot_file_struct_t::buffer_size

Internal. Size of data buffer.

iot_fclose_t iot_file_struct_t::close

Internal. Callback for fclose operation assigned by particular port.

uint32_t iot_file_struct_t::cursor

Internal. Cursor describing which byte will be read/written.

uint32_t iot_file_struct_t::file_size

Public. Number of valid bytes inside file.

iot_fopen_t iot_file_struct_t::open

Internal. Callback for fopen operation assigned by particular port.

void* iot_file_struct_t::p_arg

Internal. User defined argument, used inside the port.

void* iot_file_struct_t::p_buffer

Internal. Pointer to a data buffer set by calling fopen.

void* iot_file_struct_t::p_callback

Internal. User callback used in order to notify about finished file operations.

const char* iot_file_struct_t::p_filename

Public. String constant describing file name.

iot_fread_t iot_file_struct_t::read

Internal. Callback for fread operation assigned by particular port.

iot_frewind_t iot_file_struct_t::rewind

Internal. Callback for frewind operation assigned by particular port.

iot_fseek_t iot_file_struct_t::seek

Internal. Callback for fseek operation assigned by particular port.

iot_ftell_t iot_file_struct_t::tell

Internal. Callback for ftell operation assigned by particular port.

iot_file_type_t iot_file_struct_t::type

Public. Type of file. Each type should be added into iot_file_type_t enum.

iot_fwrite_t iot_file_struct_t::write

Internal. Callback for fwrite operation assigned by particular port.