Main Page | Modules | Class Hierarchy | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

File Configuration Parser - Configuration or setup by formatted text file


Files

file  otConfigParser.h
 Config Parser - This library implements a command parser for a file with formatted text.

Modules

 Version History

Data Structures

struct  varData
class  otConfigParser

Typedefs

typedef varData varData
 Variable structure.

Detailed Description

This library allows you to use a formatted text file to be used as a setting to different variables of interest.
The syntax used in the file is very simple:
1) Lines starting with the character # are ignored and used as a comment.
2) At the beginning of the line there is a label and following the set value.
Any spaces and tabs before the label and within the fields are ignored.
All labels are converted to UPPER CASE.
Maximum allowed characters per line is 1024.
A variable is then associated with each label.
A simple example:
    # Example with integer variables (32 bit)
   	SET.A.INT 1
   	SET.B.INT 2
   	SET.C.INT 3
   	SET.D.INT 4
   
   	# Example with floating point (64 bit)
   
   	SET.A.FLOAT 1.1
   	SET.B.FLOAT 2.2
   	SET.C.FLOAT 3.3
   	SET.D.FLOAT 4.4
   
   	# String example
   
   	SET.TITLE Hello world!
    
Dependency:
Malloc - Memory management
String library
FILE - Class for file management

Typedef Documentation

typedef struct varData varData
 

footer

otStudio - Library Reference - (C) 2020-25 Officina Turini, All Rights Reserved
Document built with Doxygen 1.4.0