Commit Graph

11 Commits

Author SHA1 Message Date
Charl Wentzel
277798a008 Important Update:
- JSON config:
  - Move Name, Definition & AddressList under "application" object
2018-11-26 09:53:00 +02:00
Charl Wentzel
d770d9f6cb Important Update:
- LogCore:
  - Implement ReadLogLevel() & ReadLogOutput() methods
    Standardised handling of logging parameters
  - Split Log/Output in config to: Log/Output & Log/Options
  - LogOutput (Show) param: first nibble = format, second nibble = options
  - Replace Format constants (OUT_XXX) with enum ELogOutput
  - Add loRaw format - raw untouched output
  - Replace OUT_CRLF with OUT_NOCRLF - Replace \r\n with "."
  - Improved Binary output method
  - Simplified Log->Output() method
- FunctionCore, ApplicationCore:
  - Replace reading of LogConfig with new methods in LogCore
2018-11-25 18:24:36 +02:00
Charl Wentzel
5dd0e88708 Minor Update:
- WatchdogCore:
  - Renamed FunctionType TYPE_WATCHDOG -> TYPE_WATCHDOGPING
- ApplicationCore:
  - Prevent overwriting existing Function Type
2018-11-25 10:19:52 +02:00
Charl Wentzel
a972fb9101 Major Update:
- Implement consistent Function addition to application
  - Use TYPE_XXX constants to declare function type
  - Use NewXXXX() methods to call constructor correctly
  - Add FunctionType list (with constructor) to Application
  - Create Function by comparison to FunctionType list
- Simplify LoadConfig() and Init() methods for functions
  - Combine methods into Init() method
  - Pass relevant data member to Init() method
  - Remove all CDataMember references on functions
- ApplicationCore:
  - Split ReadParam() method from LoadConfig() method
  - Split main configuration into separate files:
    - config/ - main config file, general application settings
    - definition/ - application definition, e.g. function blocks
  - Definition and Address List files specified in config file
  - Load address file in address/ branch
  - Made DataTree & JSONparser private
  - Made Config, Definition & Address branches public
  - Removed unnecessary branch references
  - Improved event logging
- DataTreeCore:
  - Allow GetChFirstChild & GetChElement to create parent branches
    with correct type, ie. Object/Array
  - Remove unnecessary Create param from GetXxx functions
  - Bug fix: Print empty objects/arrays correct, ie. empty brackets
  - Bug fix: Adding element at specific index
  - Bug fix: Error when get/create string value with "null"
- FunctionCore:
  - Type param now set as constant via constructor
  - Create empty Handles & Channels objects if none in Config
- SelectableCore:
  - Add Queue length parameter to handles for UNIX and TCP sockets
- DeviceCore:
  - Bug fix: missing Process() method
2018-11-24 13:35:23 +02:00
Charl Wentzel
6263c0f508 Important update:
- 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
2018-11-20 11:27:09 +02:00
Charl Wentzel
2382ff4527 Important Update:
- DataTreeCore:
  - Rename all Get/SetChild...() methods to Get/SetMem...()
- Update all other objects with new methods
2018-11-17 20:02:47 +02:00
Charl Wentzel
f2a1ca950a Major Update:
- 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
2018-11-17 19:10:59 +02:00
Charl Wentzel
e71157b9ec Important Update:
- ApplicationCore:
  - Rename ConfigParser -> JSONparser
  - Make JSONparser a public parameter
- DataTreeCore:
  - Bug fix: Insufficient memory allocation on SetValue if Len = -1
2017-07-29 12:45:45 +02:00
Charl Wentzel
2f81d1fbbe Important Update:
- 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)
2017-07-22 17:46:05 +02:00
Charl Wentzel
9b86bf3573 Important Update:
- CApplicationCore:
  - Run() returns false if error on any Process() call
  - Add TerminateOnError param to Run() method,
    - if set, exit immediately if Process() on any process fails
    - if not set, exit after Process() on all processes
  - Remove "Terminating..." log
2017-07-17 07:18:52 +02:00
Charl Wentzel
434377f122 Major Update:
- Implement new ApplicationCore:
  - Manage Tools: Log, DataTree, JSONparser & Selector
  - Load configuration, Manage FunctionBlocks
- FunctionCore & dirived classes, SignalCore:
  - affects: SelectableCore, DeviceCore, FileCore, WatchdogCore
  - Do not pass Log()
  - Define and pass Type
  - Update/reduce included headers
  - Use ProcessName and Application global vars
  - Get Log, DataTree from Application
  - Use virtual Init() function to set must have Channels/Handles
- DataTreeCore:
  - Bug fix: Check if child members exist and destroy in SetValuePtr()
  - Add method GetFirstChild with BaseMember & Path
  - Bug fix: do not use RootMember if no Parent in GetChildxxx() methods
- SignalCore, SelectCore:
  - Use Application->Log()
- FunctionCore:
  - Add itself to Application (function list)
  - Add parameter: LinkConfigMember, Type
  - Use virtual LoadConfigData() to configure from DataTree
  - Rename methods: LoadConfig() -> InitConfig(),
      InitLogging() -> SetLogParam(), SetDebugLevel() -> SetLogLevel()
  - Add method: GetType(), LoadChannelLinkData(), InitChannelLinks()
  - Modify LinkIn/OutputChannel() to use name for InFunction, not pointer
- SelectableCore & Dirived classes:
  - Affects DeviceCore & WatchdogClient
  - Rename parameter: Select -> Selector, BaseMember -> ConfigMember
  - Get Selector from Application->Selector
  - Change Handles JSON structure from Array to Key:Value pairs
  - Bug fix: check if Selector exist during Input()
  - Bug fix: do not set PortNo if not exist
2017-07-16 20:29:01 +02:00