Official reference client implementation for Cumulocity SmartREST on u-blox C027.

Dependencies:   C027_Support C12832 LM75B MMA7660 MbedSmartRest mbed-rtos mbed

Fork of MbedSmartRestMain by Vincent Wochnik

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers ConfigParser.h Source File

ConfigParser.h

00001 #ifndef CONFIGPARSER_H
00002 #define CONFIGPARSER_H
00003 #include "lex.h"
00004 #include "dict.h"
00005 
00006 class ConfigParser
00007 {
00008 public:
00009         Dict dict;
00010 public:
00011         ConfigParser() : dict(), parseOK(true) {}
00012         virtual ~ConfigParser() {}
00013         bool parse(const char*);
00014 protected:
00015         typedef void (ConfigParser::*PtrParseFunc) (Token&);
00016         void parseKey(Token&);
00017         void parseAssignOp(Token&);
00018         void parseValue(Token&);
00019         void parseSemiColon(Token&);
00020         void parseError(Token&);
00021         void parseRecover(Token&);
00022 private:
00023         bool parseOK;
00024         PtrParseFunc ptrPF;
00025         char key[MAX_KEY_LEN];
00026         char value[MAX_VALUE_LEN];
00027 };
00028 
00029 #endif /* CONFIGPARSER_H */