Major Update:

- JSONparseCore:
  - Add initialisations values for class params
  - Add method AddBase() to dynamically change DataTree
  - Added Error messages
- DeviceCore:
  - Implement ValueTree (JSON tree)
    - Node are added as devices & params are created/added
    - Nodes (and path) are referenced on devices & params
    - Node values are updated as device params are updated
  - Added Persistence File (not yet complete)
  - Updated InitDevices() & InitDeviceParams()
    - Split into smaller methods: CopyTemplateParam() & InitDeviceParam()
    - Load Device definition or Parameter maps from files
    - Allow loading of nested parameter map files
    - Load Parameter as JSON tree, generate names/path dynamically
This commit is contained in:
Charl Wentzel
2019-01-09 10:56:38 +02:00
parent 3e40f7a86d
commit 3472f506b6
4 changed files with 321 additions and 126 deletions

View File

@@ -21,28 +21,28 @@
class CJSONparse
{
private:
CDataMember * DataTree;
CDataMember * DataTree = NULL;
// File operation
int InputHandle;
int OutputHandle;
int InputHandle = -1;
int OutputHandle = -1;
CShiftBuffer * Buffer;
CShiftBuffer * Buffer = NULL;
// Parsing operation
char * BufPos;
char * Mark;
int LineNo;
int CharNo;
bool RefillBuffer;
char * BufPos = NULL;
char * Mark = NULL;
int LineNo = 0;
int CharNo = 0;
bool RefillBuffer = false;
// Printing Operation
char Spacer[100];
int SpacerLen;
char Spacer[100] = "";
int SpacerLen = 0;
// Error
bool Error;
char ErrorText[100];
bool Error = false;
char ErrorText[100] = "";
// Parsing functions
void SkipWhiteSpace();
@@ -57,9 +57,13 @@ private:
bool PrintArray( CDataMember * Object, const int Indent );
public:
CJSONparse();
CJSONparse( CDataMember * pDataTree );
~CJSONparse();
// Tree
bool SetBase( CDataMember * Object );
// Buffer operation
bool CreateBuffer( int pBufLen );
bool FillBuffer();