- 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
- Fixed bugs on CRollingBuffer and CShiftBuffer
- Remove "virtual" from methods declarations
- Correct validation checks on methods
- Use memmove to shift data in ShiftBuffer
- Initialise buffer in RollingBuffer
- FindStr() -> Return start position of match
- Fix incorrect params passed to Peek()/PeekCopy() in Pop()/PopCopy()
- Fix endless lopp in RollingBuffer::Push()
- Replace CBuffer with CRollingBuffer and CShiftBuffer
ShiftBuffer is faster and simpler and always zero terminates
- Updated SelectableCore to use RollingBuffer
- Add Overwrite parameter to Push() and ReadFromFD() methods
- Add PeakDirect() method for fast direct access to buffer
- Implemented full support for multi-layer objects
- Implemented RootObject for all other elements
- Added method CreateParam()
- Converted GetParam methods from inline to normal methods
- Added GetParent method
- Use Object->Len to count no of child objects
- Added new Class: ConfigCore (Working but incomplete)
- Provides basic parameter listing (bool, int, float, string)
- Read/writes parameters from/to file
- Support JSON format for key-value pair primitive and strings values
- Support for objects and arrays to follow
- Bug fix: make DateTimeCore functions linkable by using it in CLogCore
- CLogCore:
- Rename FileOutput -> OutputFile
- Add DateTimeStr to Output if FileNo > 3
- CSelectableCore:
- Allow ForkPipeHandle to change ExecPath
- Remove parent/child process test comments
- Move FD operations methods from private -> public
- Added new CDeviceCore Class
- Methods and structures moved from CModbusInterface
- Keep track of Devices and DeviceParameters
- Provides methods & parameters related to polling process
- Provides parameter events
- Logging
- Created LogCore Class
- Updated LogCore to use file descriptors instead of stdout
- Add Log object reference to constructors for:
FunctionCore, SelectCore
- Use extern Log() object in SignalCore
- SelectableCore
- Added new connection type: ForkedPipe
Create pipe, fork process, connect pipe out to child stdin, exec
- Minor fix: Set correct names in comments at top of file
- New FileCore Class:
- Writing data to output file
- BufferCore:
- Check for "EAGAIN" on write and retry write
- FunctionCore:
- Add new Output method that references LocalIO directly
- SelectableCore:
- New method SetAutomanage to specify auto re-open parameters
- Re-open timer implemented to slow re-open events
- Only call ProcessBuffer() if data received on socket
- Force processing input data when no input marker set
- Use new Output method to simplify code
- Bug fix: Read correctly from buffer on multiple reads/writes on FD
- Check for "EAGAIN" on write to FD and retry write
- BufferCore:
- Added PeekCopy and PopCopy methods
- SelectableCore:
- Add status checking of Handle on Read and Write
- Reject input if Handle not open
- TimingCore:
- Added method ClearStartTime
- Updated all Logged messages, standardised DebugLevel:
- dlNone - Show startup and stop
- dlLow - Show creation/destruction of Function Blocks and Local IO
- dlMedium - Show connection events, eg. open/close
- dlHigh - Show data flow events
-LogCore:
- LogMessage and ShowOutput uses va_list
only run printf if DebugLevel correct
- Remove global LogStr[] variable
- SelectableCore:
- Implemented Auto-management of handles
auto open on startup/fail/close
- Changed simple Open/Close/Read/Write methods to inline
- Do not set Select Write trigger for server socket
- Memory leak, setting address twice on RemoteClient
- Bug fix, only send handle out data if DebugLevel = dlHigh
- Bug fix, do not Read/ProcessBuffer if no InputBuffer
- Implemented global var DebugLevel
- Update LogCore to check DebugLevel
- Added many log messages and standadised all log messages
- Further improved validation checks on all methods
- Updated SelectCore, only remove SelectHandle from list during Test()
- Close Handles in SelectableCore destructor
Bug fixes:
- Non-blocking Client Socket Connection now working correctly
- Remove FD from Select lists at the correct time
- General bug fixes
- Implement search for multi-character marker search in BufferCore
Replaced FindChar() method with FindStr() method
- Implemented LocalIO and LinkedIO in FunctionCore
- Connect LocalIO with FD in SelectableCore
- Implement Write buffer with Write Select in SelectableCore
- Improve validation checks in SelectableCore
- Use Handle ptr instead of Handle Names for Config methods
- Converted Select functions into new class CSelectCore
- Move Read/Write code from main() to SelectableCore Read()/Write()
- Pass CSelectCore object to CSelectableCore on create
- Updated SelectCore Read/Write lists directly from SelectableCore
- SelectCore->Test() checks all FDs directly and call Read/Write functions
- Improved checking/validating for methods in SelectableCore
- Merged SelectCore and PortCore into new SelectableCore
Single well integrated Class
- Rename SelectCore.h to SelectableCore.h
- Create new TFileHandle structure for Ports/Sockets
- Moved buffer and Input Timeout from FunctionCore to TFileHandle
- Moved Read, Write and ProcessBuffer from FunctionCore to TFileHandle
Bug Fixes:
- malloc correct size for names
- Calculate MaxFD correctly when closing FDs
- Converted CSocketCore to Class/Object
- Implemented CFunctionCore as base class for CPortCore and CSocketCore
- Moved common functions to CFunctionCore and renamed
eg. Maintain() -> Process()
- Pass Objects directly to each other as OutputFunction
- New Input() method allows data transfer between objects
- Still testing
- Separate Rolling Buffer from PortCore to BufferCore
- Implement BufferCore in PortCore
- Add additional Rolling Buffer functions for future
- Added SignalCore for handling system signals
- Implemented LogMessages (only output to stdout, later to logfile)
- Updated #defines for all header files
- Convert PortCore functions into Class
Bug fixes:
- Correctly handle socket close event (return false on read)
- Only write to port/socket if valid file handle