- DataTreeCore:
- Renamed Get/SetMemXxx() methods to Get/SetChXxx()
- Renamed GetMember() to GetChild()
- Updated: JSONparse, ApplicationCore, FunctionCore, SelectableCore,
and WatchdogCore
- Remove unused PrevChild & Last vars in GetChild (GetMember)
- JSONparseCore:
- Use return values from write() and PrintXxx() methods to report fail
- SelectableCore:
- Fix possible uninitialised FlowCtrl & Parity value
- DateTimeCore:
- Fix possible memory overrun in temp buffer
- EventBufferCore:
- Fix possible uninitialised value error in AddEvent
- Fixed memory errors and leaks in DataTreeCore:
- Initial values not set correctly for Name, Next/PrevPeer
- Correctly set Last/FirstChild & Prev/NextPeer references on delete
- Added methods SetValuePtr()
- Fixed memory errors and leaks in JSONparseCore:
- Set set string/int/float values by passing pointers, ie. SetValuePtr()
- DataTreeCore:
- Merge TDataMember and CDataTree into => CDataMember
- Each node, incl root is now CDataMember object
- Modified function to not require BaseMember (Object is basemember)
- Split/duplicat most functions to require, or not require child path
- Added isNull/Object/Array/Sting() etc methods
- Many other methods removed or restructured
- Updated DataTree usage in: JSONparseCore,
ApplicationCore, FunctionCore, SelectableCore, WatchdogCore
- JSONparseCore:
- Bug fix: Incorrectly terminated PrintString on null
- SelectableCore:
- Add BaudRate, DataBits, Parity, StopBits, FlowCtrl, DataWait to THandle
- Include Serial Port setup in SetPortHandle()
- Read Serial Port config in LoadConfigData()
- Rename SetSerialConfig() -> ConfigureSerialPort()
- Configure Serial Port immediately after opening port
- Library Clean up:
- Removed all unused C/C++ libraries from source
- First C/C++ libraries then redA libraries
- Library changes:
- renamed BufferCore -> CharBufferCore
- added ItemBufferCore
- CharBufferCore:
- Derive RollingBuffer & ShiftBuffer from common class CharBuffer
- CharBuffer is mostly a virtual class (interface)
- DataTree->GetStr return Member->Value or NULL if not found
- Rename DeviceCore EDataType to EMBDataType, avoid conflict with JSONpaser
- Add DataTree to FunctionCore with LoadConfig() method
- Change ProcessName to char * (from char[])
- JSONparse:
- Rename RootPath to BasePath on all methods to reduce confusion
- Allow FilePath to be NULL, add '/' if not present
- Fixed Parsing sequence in ParseObject & ParseArray
- Improve "printing" for JSON with single & multi line objects
- Fix bugs in getting, setting & creating array elements
- "array[]" allowed to create/add element at end of an array
- No longer duplicate get() path (reduce memory allocation)
- added NameLen to TMember to eliminate zero-terminate requirement
- Fix ReadfromXXX() return values
- Update printing: Do not use '\n' if indent = 0
- Implement refilling of buffer (from fd) while parsing
- No longer use LineMark, but keep track of char position with CharNo
- Use Mark to reference point for shifting buffer on refill
- SkipWhiteSpace no longer inline method
- Refill buffer if required, change Mark & CharNo on line break
- CreateBuffer(), RefillBuffer() & FreeBuffer() now public methods
- Make Loading and Saving more flexible:
- Refactor from LoadFromFile():
ReadFromFile(), ReadFromHandle(), ReadFromBuffer()
- Refactor from SaveToFile() & PrintToScreen:
WriteToFile(), WriteToScreen, WriteToHandle()
- Buffer:
- fix undefined value: zero terminate buffer when loading from FD
- DataTree:
- fix memory leak: destroy temporary search path
- improve delete(): delete all children for member if no path given
- bug fix: initiate object with 0 length (not -1)
- JSONparse:
- Remove level parameter
- Add path to load/save/print methods (print only portion of tree)
- fix memory leak: destroy temporary object name
- Pass printf Mask for Int/Float values on Get/Set methods
- On GetValue use mask for default value
- Add SetArray() method
- Bug fix: Incorrect malloc size in SetValue()
- Bug fix: Len not calculated if -1 passed to SetValue()
- Set default value for Len = -1 on SetValue() methods
- Don't pass Len to SetValue() unless required
- Bug fix: BufferCore - set correct auto buffer size
- Change Get/Set methods to use BaseReference and full path instead of
ParentPath and MemberName
- Add Create param to all Get methods (create if not found)
- Implement arrays & parsing of arrays
- Set CJSONparse as friend class to DataTree (access protected methods)
- Print JSON to screen
- Split CConfigCore into two classes:
- DataTreeCore.h - Tree data structure and access
- JSONparseCore.h - JSON parsing functionality
- Renamed TConfigParam struct to TDataMember
- Renamed most of CDataTreeCore methods