simple FS  v0.1.0
Public Attributes | List of all members
FileDescriptor_t Struct Reference

Describe base structure for 1 file. More...

#include <file_format.h>

Collaboration diagram for FileDescriptor_t:
Collaboration graph
[legend]

Public Attributes

uint8_t ID
 Identifier of file. More...
 
uint32_t meta_address
 Address of meta-information for file. More...
 
uint32_t data_address
 Address of begin of data file. More...
 
uint8_t name [FILENAME_LENGTH]
 Name of file. More...
 
uint8_t num_parts
 Each file can have variable count of items (or columns) in row record. More...
 
RecordDescriptor_t format [MAXIMUM_FS_SENSORS_PER_FILE]
 Format specification for each column in file. More...
 
uint16_t record_length
 Length of one record in file in bytes. More...
 
uint16_t recordAddressMap [MAXIMUM_FS_SENSORS_PER_FILE]
 Map of addresses for one record. More...
 

Detailed Description

Describe base structure for 1 file.

These information are stored to META part of sFS. Length of 1 record in META part is defined by FILE_META_RECORD_LENGTH

Member Data Documentation

◆ data_address

uint32_t FileDescriptor_t::data_address

Address of begin of data file.

File contains list of rows/records. This value is stored as 32bit integer.

◆ format

RecordDescriptor_t FileDescriptor_t::format[MAXIMUM_FS_SENSORS_PER_FILE]

Format specification for each column in file.

Each column can have specific format/length/type.

◆ ID

uint8_t FileDescriptor_t::ID

Identifier of file.

The first file has identifier 1. Identifier is automatically incremented by 1.

◆ meta_address

uint32_t FileDescriptor_t::meta_address

Address of meta-information for file.

Meta information contains of list of values (columns) stored in file. This value is stored as 32bit integer.

◆ name

uint8_t FileDescriptor_t::name[FILENAME_LENGTH]

Name of file.

In sFS, the filename is automatically generated depending of HW ID of memory. Length of file name is 16B

◆ num_parts

uint8_t FileDescriptor_t::num_parts

Each file can have variable count of items (or columns) in row record.

num_part describe number of parts (or columns) in one row.

◆ record_length

uint16_t FileDescriptor_t::record_length

Length of one record in file in bytes.

The length is the sum of lengths of all data sensor parts.

◆ recordAddressMap

uint16_t FileDescriptor_t::recordAddressMap[MAXIMUM_FS_SENSORS_PER_FILE]

Map of addresses for one record.

The first value will be always 0, the next is offset for next value relative to beginning of the record. Maximal value in this array depend of sensor values data length. This is only internal part, not store to FLASH.


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