Commit Graph

10 Commits

Author SHA1 Message Date
fd3738567a Resolve fix:
- CancelResolv(): Standard function to cancel name resolve requests
  - Allow Resolv request to complete if not cancelled
  - Clear memory if resolve request cancelled
- getaddrinfo_a(): still leaks if thread not closed
Other:
- Code clean up
2022-07-21 12:14:57 +02:00
9830f687ad CharBuffer search fixed & Log/Util buffer changed:
- Char/ShiftBuffer: Fixed multi-char string search
- UtilCore: Always pass output buffer & remove own buffer for conversions
- UtilCore: Remove optional parameters to force passing of buffer
- LogCore: Add TempBuffer for output conversion (using UtilCore)
- ApplicationCore: Allow setting size of TempBuffer via config
- Optimize use of {}
2021-10-14 09:19:55 -05:00
Charl Wentzel
c2c08c527c Minor Update:
- Add GetAddress() to CApplciation
- Call GetAddress() from GetHandleAddress() is SelectableCore
- Correct "Name" overload in SelectableCore->Init()
2019-09-08 10:01:38 +02:00
Charl Wentzel
83c192c1a6 Important Update:
- DataTreeCore:
  - Re-arrange method declaration order
  - Renamed methods Delete() to DeleteCh()
  - Added GetChName(), GetChType(), GetChLen() & ClearCh(Path) methods
- ApplicationCore:
  - Add WriteToScreen() method (Hide access to JSONparser)
2018-11-27 09:56:27 +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
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