# Tuxera > Guides and references for Tuxera storage and networking software. - [Quick-Start Guide](/docs/.md): Step-by-step guide to compiling and running Reliance Edge and its accompanying tools on a Windows system. - [Release Notes](/docs/release-notes.md): A list of updates made to Reliance Edge over the course of recent releases and a list of known issues. ## 1. System Overview - [1.1. Introduction](/user-guides/system-overview/introduction.md): This guide is for those who want to implement Reliance Sense File System, optimized to use minimal ROM/RAM. - [1.2. Feature Check](/user-guides/system-overview/feature-check.md): The main features of the system are the following: - [1.3. Concepts](/user-guides/system-overview/concepts.md): Reliance Sense File System is designed to fulfill the very specific requirements of smart metering and data logging products. - [1.4. Packages and Documents](/user-guides/system-overview/packages-and-documents.md): Packages - [1.5. Change History](/user-guides/system-overview/change-history.md): This section describes past changes to this manual. The full list of versions is as follows: - [2. Source File List](/user-guides/source-file-list.md): This section describes all the source code files included in the system. These files follow the Tuxera standard source tree system, described in the Tuxera Source Tree Guide. All references to file pathnames refer to locations within this standard source tree, not within the package you initially receive. ## 3. Configuration Options - [3.1. config_smfs.h](/user-guides/configuration-options/config-smfs-h.md): Set the following configuration options in the file src/config/config_smfs.h. This section lists the available options and their default values. - [3.2. config_smfs_generic_nor_spi.h](/user-guides/configuration-options/config-smfs-generic-nor-spi-h.md): Set the following generic NOR flash driver configuration options in the file src/config/configsmfsgenericnorspi.h in the fssmfsdrvgenericnor_spi package. - [3.3. config_smfs_ram.h](/user-guides/configuration-options/config-smfs-ram-h.md): Set the single RAM configuration option in the file src/config/configsmfsram.h in the fssmfsram package. ## 4. Application Programming Interface ### 4.1. Module Management - [smfs_init](/user-guides/application-programming-interface/module-management/smfs-init.md): Use this function to initialize the file system. Call it once at start-up. - [generic_nor_spi_init](/user-guides/application-programming-interface/module-management/generic-nor-spi-init.md): Use this function to initialize the generic serial NOR flash driver for Reliance Sense. - [ram_init](/user-guides/application-programming-interface/module-management/ram-init.md): Use this function to initialize the RAM driver for Reliance Sense. - [smfs_format](/user-guides/application-programming-interface/module-management/smfs-format.md): Use this function to format the medium. - [smfs_start](/user-guides/application-programming-interface/module-management/smfs-start.md): Use this function to start the file system. - [smfs_stop](/user-guides/application-programming-interface/module-management/smfs-stop.md): Use this function to stop the file system. - [smfs_delete](/user-guides/application-programming-interface/module-management/smfs-delete.md): Use this function to release resources allocated during initialization of the file system. ### 4.2. RAM Image Functions - [ram_save_image_to_ram](/user-guides/application-programming-interface/ram-image-functions/ram-save-image-to-ram.md): Use this function to save the current image to RAM. - [ram_save_image_from_ram](/user-guides/application-programming-interface/ram-image-functions/ram-save-image-from-ram.md): Use this function to save an image stored in RAM to a file. - [ram_save_image](/user-guides/application-programming-interface/ram-image-functions/ram-save-image.md): Use this function to save the current image to a file. - [ram_load_image](/user-guides/application-programming-interface/ram-image-functions/ram-load-image.md): Use this function to load an image from a file. ### 4.3. Database Management - [smfs_create_db](/user-guides/application-programming-interface/database-management/smfs-create-db.md): Use this function to create a database. - [smfs_delete_db](/user-guides/application-programming-interface/database-management/smfs-delete-db.md): Use this function to delete a database. - [smfs_migrate_db](/user-guides/application-programming-interface/database-management/smfs-migrate-db.md): Use this function to migrate a database to a new database. - [smfs_lock_db](/user-guides/application-programming-interface/database-management/smfs-lock-db.md): Use this function to lock a database. This prevents further writing to the database. - [smfs_get_lock_status](/user-guides/application-programming-interface/database-management/smfs-get-lock-status.md): Use this function to get the lock status of a database. - [smfs_get_db_dsc](/user-guides/application-programming-interface/database-management/smfs-get-db-dsc.md): Use this function to get a database descriptor structure. - [smfs_get_db_struct_id](/user-guides/application-programming-interface/database-management/smfs-get-db-struct-id.md): Use this function to get a database structure ID stored on the medium. - [smfs_erase_blocks](/user-guides/application-programming-interface/database-management/smfs-erase-blocks.md): Use this function to clean up the databases. - [smfs_read_record](/user-guides/application-programming-interface/database-management/smfs-read-record.md): Use this function to read a record from a database. - [smfs_write_record](/user-guides/application-programming-interface/database-management/smfs-write-record.md): Use this function to write a record to a database. - [smfs_update_record](/user-guides/application-programming-interface/database-management/smfs-update-record.md): Use this function to update a record. - [smfs_clear_records](/user-guides/application-programming-interface/database-management/smfs-clear-records.md): Use this function to clear all records in a database. - [smfs_get_free_space](/user-guides/application-programming-interface/database-management/smfs-get-free-space.md): Use this function to get the amount of free space in a database (the number of records that can be written to it). - [smfs_get_rec_num](/user-guides/application-programming-interface/database-management/smfs-get-rec-num.md): Use this function to get the number of valid records in a database. - [smfs_get_rec_cnt](/user-guides/application-programming-interface/database-management/smfs-get-rec-cnt.md): Use this function to get the number of valid records in a database. - [smfs_get_max_rec_cnt](/user-guides/application-programming-interface/database-management/smfs-get-max-rec-cnt.md): Use this function to get the maximum number of records a database can hold. - [smfs_get_record_size](/user-guides/application-programming-interface/database-management/smfs-get-record-size.md): Use this function to get a database's record size. - [smfs_search_record](/user-guides/application-programming-interface/database-management/smfs-search-record.md): Use this function to search for a record, based on its timestamp. - [smfs_search_records](/user-guides/application-programming-interface/database-management/smfs-search-records.md): Use this function to search for all records in a database with timestamps in the requested range. - [smfs_search_read_record](/user-guides/application-programming-interface/database-management/smfs-search-read-record.md): Use this function to search for a record based on its timestamp, then read it. - [smfs_search_record_key](/user-guides/application-programming-interface/database-management/smfs-search-record-key.md): Use this function to search for a record, based on its key. - [smfs_search_records_key](/user-guides/application-programming-interface/database-management/smfs-search-records-key.md): Use this function to search for records within a specified key range/interval. - [smfs_search_read_record_key](/user-guides/application-programming-interface/database-management/smfs-search-read-record-key.md): Use this function to search for a record, based on its key, and read it. - [smfs_get_signature](/user-guides/application-programming-interface/database-management/smfs-get-signature.md): Use this function to get a record's signature. - [smfs_get_timestamp](/user-guides/application-programming-interface/database-management/smfs-get-timestamp.md): Use this function to get a record's timestamp. ### 4.4. Callback Functions - [t_smfs_error_hook_fn](/user-guides/application-programming-interface/callback-functions/t-smfs-error-hook-fn.md): This user-defined function is called by Reliance Sense whenever an error occurs in the operation of the system. The user-defined function is passed the error code for the application to process as required. - [t_smfs_get_key_fn](/user-guides/application-programming-interface/callback-functions/t-smfs-get-key-fn.md): This user-defined function is used to get the key from record data when searching for a record based on the key it contains. - [t_smfs_get_signature_fn](/user-guides/application-programming-interface/callback-functions/t-smfs-get-signature-fn.md): This user-defined function is used to add a signature (for example, a checksum) to a record. Each time a record is to be committed to its database, this function is called to allow the user to insert a signature into the record as required. - [t_smfs_migrate_fn](/user-guides/application-programming-interface/callback-functions/t-smfs-migrate-fn.md): This user-defined function is used to migrate the records when you migrate a database. When you migrate a database, a function of this type is called for every record. ### 4.5. Types and Definitions - [Database Types](/user-guides/application-programming-interface/types-and-definitions/database-types.md): Three types of database are supported, as follows. - [t_db_dsc](/user-guides/application-programming-interface/types-and-definitions/t-db-dsc.md): The tdbdsc structure takes this form: - [t_smfs_driver](/user-guides/application-programming-interface/types-and-definitions/t-smfs-driver.md): The tsmfsdriver structure takes this form: - [4.6. Error Codes](/user-guides/application-programming-interface/error-codes.md): Database API Error Codes ## 5. Integration - [5.1. OS Abstraction Layer (OAL)](/user-guides/integration/os-abstraction-layer-oal.md): The file system uses the OS Abstraction Layer (OAL) that allows it to run seamlessly with a wide variety of RTOSs, or without an OS. ### 5.2. PSP Porting - [psp_smfs_driver_poweron](/user-guides/integration/psp-porting/psp-smfs-driver-poweron.md): This function is provided by the PSP to turn on the card's power. - [psp_smfs_driver_poweroff](/user-guides/integration/psp-porting/psp-smfs-driver-poweroff.md): This function is provided by the PSP to turn off the card's power. - [psp_smfs_get_ms](/user-guides/integration/psp-porting/psp-smfs-get-ms.md): The PSP provides this function to get the actual system time in ms. ## 6. Simulation and Testing - [6.1. Simulator Windows](/user-guides/simulation-and-testing/simulator-windows.md): When you run the simulation tool, its two windows open automatically. These are: - [6.2. Starting the Simulator](/user-guides/simulation-and-testing/starting-the-simulator.md): This section shows how to proceed initially. It describes each of the options available at the initial command - [6.3. Command Summary](/user-guides/simulation-and-testing/command-summary.md): Type help to list the available commands. - [6.4. Writing to a Database](/user-guides/simulation-and-testing/writing-to-a-database.md): There are two ways to write records to a database: - [6.5. Running Tests for Table1 and Table2](/user-guides/simulation-and-testing/running-tests-for-table1-and-table2.md): This section shows how to run a test using the sample database tables Table1 and Table2. The test writes ### 6.6. Commands - [clean](/user-guides/simulation-and-testing/commands/clean.md): Use the clean command to erase obsolete flash blocks. - [clear](/user-guides/simulation-and-testing/commands/clear.md): Use the clear command to clear records in a database. This sets all data bytes to 0. - [del](/user-guides/simulation-and-testing/commands/del.md): Use the del command to delete a database. - [format](/user-guides/simulation-and-testing/commands/format.md): Use the format command to format a drive. - [freespace](/user-guides/simulation-and-testing/commands/freespace.md): Use the freespace command to report the number of free records in a database. - [getlock](/user-guides/simulation-and-testing/commands/getlock.md): Use the getlock command to check a database's lock status. - [help](/user-guides/simulation-and-testing/commands/help.md): Use the help command to display a description of the simulation commands. - [lock](/user-guides/simulation-and-testing/commands/lock.md): Use the lock command to lock a database. - [maxrec](/user-guides/simulation-and-testing/commands/maxrec.md): Use the maxrec command to get the maximum number of records a specified database can contain. - [pwrfail](/user-guides/simulation-and-testing/commands/pwrfail.md): Use the pwrfail command to run a power fail test. - [read](/user-guides/simulation-and-testing/commands/read.md): Use the read command to read a record in a database and print its contents. These comprise the record - [recnum](/user-guides/simulation-and-testing/commands/recnum.md): Use the recnum command to get the number of records in a database. - [recsize](/user-guides/simulation-and-testing/commands/recsize.md): Use the recsize command to get the size of the records in a database. - [save](/user-guides/simulation-and-testing/commands/save.md): Use the save command to save the file system image to a new file. - [srec](/user-guides/simulation-and-testing/commands/srec.md): Use the srec command to search for a record in a database by using its timestamp. - [srecs](/user-guides/simulation-and-testing/commands/srecs.md): Use the srecs command to search for multiple records in a database by using their timestamps. - [srrec](/user-guides/simulation-and-testing/commands/srrec.md): Use the srrec command to search for a record in a database by using its timestamp then print its contents - [sreckey](/user-guides/simulation-and-testing/commands/sreckey.md): Use the sreckey command to search for a record in a database by using its key. - [srecskey](/user-guides/simulation-and-testing/commands/srecskey.md): Use the srecskey command to search for records in a database by using their keys. - [srreckey](/user-guides/simulation-and-testing/commands/srreckey.md): Use the srreckey command to search for a record in a database by using its key, then read the record. - [test](/user-guides/simulation-and-testing/commands/test.md): Use the test command to run the test suite for a database table. The test writes each database at the - [update](/user-guides/simulation-and-testing/commands/update.md): Use the update command to update a record in a linear database. - [write](/user-guides/simulation-and-testing/commands/write.md): Use the write command to write one record to a database. Every data byte inside the record is given the - [writen](/user-guides/simulation-and-testing/commands/writen.md): Use the writen command to write multiple records to a database. - [7. Version](/user-guides/version.md): Version 2.40 ## Other Pages - / - /blog - /blog/archive - /blog/authors - /blog/authors/all-sebastien-lorber-articles - /blog/authors/yangshun - /blog/first-blog-post - /blog/long-blog-post - /blog/mdx-blog-post - /blog/tags - /blog/tags/docusaurus - /blog/tags/facebook - /blog/tags/hello - /blog/tags/hola - /blog/welcome - /markdown-page - /search