simple FS  v0.1.0
Modules
SIMPLE_FS

Simple file system for application of sensoric data. Support fast append to file operation. More...

Collaboration diagram for SIMPLE_FS:

Modules

 Format_specification
 Definition of internal structures with format definitions.
 
 SFS_API
 API function of simpleFileSystem The API functions are divided in:
 
 Memory_interface
 low level interface to specific types of used memories
 
 Sensor_specification
 Definition of sensoric/data modules in simple FS.
 

Detailed Description

Simple file system for application of sensoric data. Support fast append to file operation.

Type of FS: RA (Read-Append). Optimized for FLASH-like types of memories, where write/erase operation is much time consuming that reading.

Parts in simple FS:

Memory map

Area Start address Size
PREAMBLE 0x0 32B (0x20B)
HEADER FILE_HEADER_ADDRESS - 32 (0x20) 32B - 704 B
META FILE_META_ADDRESS 48 - 11088 B
DATA FILE_DATA_ADDRESS up to memory capacity

Used data structures

PREAMBLE

Structure: FS_Header_t

typedef struct {
uint8_t version;
uint8_t manufacturer;
uint8_t memory_type;
uint8_t memory_capacity;
uint8_t memory_id[8];

Mapping

0 1 2 3 4 5 6 7 8 - 15 16 17 18 19 - 32
's' 'F' 'S' '1' M T C 0 sFS_ID CC MF MS NOT_USED

HEADER

Mapping (FileDescriptor_t)

FILE_ID META_ADDRESS DATA_ADDRESS FILE_NAME NUM_PARTS RECORD_LENGTH not used
1B 4B 4B 16B 1B 2B 4B

Capacity of HEADER area:

Used data structure combine HEADER data and META data of file:

typedef struct {
uint8_t ID;
uint32_t meta_address;
uint32_t data_address;
uint8_t name[FILENAME_LENGTH];
uint8_t num_parts;
RecordDescriptor_t format[MAXIMUM_FS_SENSORS_PER_FILE];
uint16_t record_length;
uint16_t recordAddressMap[MAXIMUM_FS_SENSORS_PER_FILE];

META

Mapping (RecordDescriptor_t)

SENSOR_ID SENSOR_TYPE VALUE_FORMAT
8B 1B 3B

Used data structure combine HEADER data and META data of file:

typedef struct {
uint8_t sensor_id[8];

VALUE_FORMAT is data structure with definition:

typedef struct {
ValueFormatMetaFmt_t meta_format;

Mapping (RecordDescriptor_t)

META_FORMAT | META_LENGTH Q
1B, details in: RecordTypeValue_t 2B (RecordTypeQ_t)

DATA

Datastructure:

typedef struct {
uint8_t *value;
uint8_t data_length;
ValueFormatMetaFmt_t
enum meta_fmt ValueFormatMetaFmt_t
Enumeration of supported data formats.
FileDescriptor_t
Describe base structure for 1 file.
Definition: file_format.h:242
RecordTypeQ_t
Definition of Q format number parameters: m,n.
Definition: file_format.h:180
value_format
value_format
Definition data value lengths.
Definition: file_format.h:118
RecordDescriptor_t
Describes internal structure of file.
Definition: file_format.h:228
FILENAME_LENGTH
#define FILENAME_LENGTH
Length of file name.
Definition: file_format.h:46
SensorValue_t
Sensor value is stored as array of bytes.
Definition: sensor.h:42
sensor_type
sensor_type
Definition of base types os supported sensors.
Definition: file_format.h:83
ValueFormatMetaLength_t
enum value_format ValueFormatMetaLength_t
Definition data value lengths.
RecordTypeValue_t
Base structure for description of sored value.
Definition: file_format.h:211
SensorType_t
enum sensor_type SensorType_t
Definition of base types os supported sensors.
FS_Header_t
Basic information from FS start area.
Definition: file_format.h:279