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
Charl Wentzel2022-07-21 12:08:22 +02:00
d9440f63c0
DateTime bug fix: - Correctly handle optional separator between date & time
Charl Wentzel2020-10-27 08:05:42 -05:00
d83bc5de93
Important Update: - DataTreeCore (bug fix): - Copy only specified number of chars for Name in constructor - Copy only specified number of chars for value in SetValue
Charl Wentzel
2020-04-29 17:50:03 +02:00
11e3d04f6c
Minor Update: - Fix uninitialised memory error in DateTimeCore
Charl Wentzel
2020-04-21 08:04:40 +02:00
429dae5f50
Minor update - DataTreeCore: - Use strdup() to copy strings
Charl Wentzel
2019-07-29 18:48:46 +02:00
55168dece2
Important update: - DateTimeCore: - Bug fix: BuildDateTimeStr() incorrect date - New methods: ReadDateTime() convert DateTimeStr -> time_t
Charl Wentzel
2019-07-22 10:59:24 +02:00
fb28f86ae9
Important Update: - JSONparse: - Allow base entry to be Array or Object - Do not enforce escaping of '/' -> '\/' - Bug fix: properly encode string values in arrays
Charl Wentzel
2019-07-16 16:43:55 +02:00
14982e8459
Important Update: - Channels (FunctionCore & SelectableBare): - Added state "Standby", allow auto-managed handle to be opened - SelectableCore: - Set default "Persistent" state for sockets based on type - Remove Process() method (no different from SelectableBare - DateTimeCore: - Added BuildDateTimeStr() methods to build date for values - JSONparseCore: - Added error message to file operations
Charl Wentzel
2019-07-15 17:40:40 +02:00
df371d4f10
Important Update: - DeviceCore: - Allow different event output types: None, Simple or JSON - Add date & time to JSON events
Charl Wentzel
2019-07-15 17:29:45 +02:00
91a7707fef
Minor Update: - DeviceCore: Issue event with DataPath, not param name
Charl Wentzel
2019-07-12 08:54:06 +02:00
7d69edffa2
Important Update: - DeviceCore: - Added Data Type "bool" - Create boolean var for params of type "bool"
Charl Wentzel
2019-07-10 19:37:01 +02:00
14af8390ec
Important Update: - FunctionCore: - Bug Fix: Change Channel OutState before triggering event - TimingCore: - Add method SecondsPassed() (provides seconds instead of milli-seconds)
Charl Wentzel
2019-06-23 20:51:51 +02:00
9f8f69de3f
Important Update: - FunctionCore: - Improve Channel Events: - Remove important actions from ChannelStateEvent() (now only used for custom actions) - Add new method UpdateChannelOutState() - Add Channel Events to Link and Unlink actions - Rename SetChannelState() -> SetChannelInState() - Use Channel->Ref (instead of name) on all channel events - DeviceCore/SelectableCore: - Rename SetChannelState() -> SetChannelInState()
Charl Wentzel
2019-06-23 18:03:37 +02:00
e9b50f1af9
Important Update: - FunctionCore/SelectableCore: - Replace Channel->State with InState - Add Channel-OutState (ready for output) updated by ChannelStateEvent() - TimingCore: - Add GetUpCounter() for calculating uptime string (in seconds)
Charl Wentzel
2019-06-23 10:38:27 +02:00
207caa696d
Important Update: - DateTimeCore: - Added new functions Get/SetDateTime() for combined date & time get/set - Added LocalTime param to ReadDate/Time() and BuildDate/TimeStr() - Allow input time to interpretted as ether UTC or local time - DeviceCore: - Added SourceRef to HandleCommand()
Charl Wentzel
2019-06-19 11:18:34 +02:00
794b7e5486
Important Update: - FunctionCore: - Implement UnlinkChannel() - Avoid memory errors on application shutdown (state events) - Unlink channels before destroying in Function destructor - Bug fix: Linked Channels not added correctly
Charl Wentzel
2019-06-17 12:43:12 +02:00
8791e25d22
Important update: - DateTimeCore: - Added ReadDateTime() method, combining ReadDate() & ReadTime() - Added Read(Time/Date/DateTime)Str() methods for decoding date string
Charl Wentzel
2019-06-16 13:56:26 +02:00
253eb91824
Important Update: - FunctionCore: - Add OldState to ChannelStateEvent() - Add new method ChannelOutState() - Update Logging levels - SelectableCore: - Restart LastAction timer of Name Resolve fail (cause delayed re-open) - Watchdog: - Move JSON PingInterval param to "Config" object
Charl Wentzel
2019-06-10 17:25:31 +02:00
7787da5119
Important Update: - Complete Async resolve: - Remove Resolving param from THandle - Rename state csResolving -> csPreparing - Added handle state csPrepared, to indicated resolve complete - Open handle if state = csPrepared - Remove Resolve delay (not required since async resolve) - remove from JSON config as well
Charl Wentzel
2019-06-10 10:44:51 +02:00
bde14a13da
Major Update: - FunctionCore - Replace Channel->Ready with Channel->State (off/waiting/ready) - Add Function reference to Handle - SelectableBare/Core: - Implement async address resolve with event handling - Create ResolveHandler() signal handler (friend) function - Change Create/Remove/DestroyHandle() methods to virtual methods - Move socket specific code to SelectableCore - Rename ChangeState() to virtual HandleState() - Move ClearHandle() from SelectableBare -> SelectableCore - Implement new/delete from THandle - Set max TCP SYN count on connect
Charl Wentzel
2019-06-09 22:05:27 +02:00
08fce64629
Important Update: - FunctionCore - So not set Function JSON "config" param to empty object by default - Change TChannelLink to reference Channel direct - Add Input/Output to TChannelLink - Replace LinkChannel() Bidirectional param with Input/Output param - Update JSON config as well - Implement Channel "Ready" state and events - Remove Input/OutputEnabled parameters and related methods - Remove from JSON config as well - Update AddChannel() method accordingly - Add Ref param to struct TChannel - SelectableCore: - Convert inline ChangeState() to non-inline method - Move ChangeState() to last step in open/close methods - Add Channels in Not Ready state - Change Channel state when Handle state changed - DeviceCore: - Add Channels in Ready state - FileCore: - Add Channel in Not Ready state
Charl Wentzel
2019-06-05 19:13:04 +02:00
fa6825b72a
Important Update: - FunctionCore/SelectableCore/FileCore/DeviceCore: - Remove InputChannels - Only OutputChannels -> LinkedChannels - Remove PullInput/Output() methods - Remove StoredOutput - Add References to channels and linked channels - Send SourceRef with output - Receive TargetRef with input - Filter output channels based on TargetRef
Charl Wentzel
2019-06-04 18:35:23 +02:00
7459763eb6
Important Update: - Remove unused: FunctionCore-ChannelBuffer - DataTreeCore: - Bug fix: Set Len=0 on element Clear() - SelectableBare/Core: - Move move BuildArgs() to SelectableBare - Make OutputHandle() to virtual method - UtilCore: - Bug fix: Handle NoCrLF correctly in BytesToSafeStr()
Charl Wentzel
2019-06-02 16:12:42 +02:00
ac649bf4fb
Minor Update: - DeviceCore: - Initialise params in header file - JSONparseCore: - Increase Read buffer to handle large queries - UtilCore: - Bug fix: handle NULL seperator in Hex conversions
Charl Wentzel
2019-05-28 09:22:28 +02:00
316b27b19f
Important Update: - DeviceCore: - Allow adjustable reply timeout with SetWaitForReply()
Charl Wentzel
2019-05-22 15:35:27 +02:00
c0a50bf2bd
Minor update: - FunctionCore: - Set Function Type in Init() - SelectableBare: - Remove unnecesary initialisation in constructor - SelectableCore: - Remove code duplicated in SelectableBare
Charl Wentzel
2019-05-20 18:07:25 +02:00
aedf3c6b46
Minor Update: - LogCore: Increase log buffer for larger data events
Charl Wentzel
2019-05-03 11:33:00 -05:00
1b4ec32065
Minor Update: - UtilCore: - Set optional parameters on HexStrToBytes function.
Charl Wentzel
2019-04-23 21:52:23 +02:00
01ec1071b1
Important Update: - Save reference to process config in Function Core - Moved from DeviceCore to here as common feature - "Config" : object Allow additional config to be stored in application definition - "Config" : string Name reference to config object in main JSON file - Remove from Device Core
Charl Wentzel
2019-04-22 10:29:52 +02:00
77db246541
Important Update: - UtilCore: - Coverted strings not zero terminated
Charl Wentzel
2019-04-21 12:53:28 +02:00
0db59f8ecd
Important Update: - SelectableBare: - Bug fix: Packet sent too early
Charl Wentzel
2019-04-19 11:16:07 +02:00
0046edc251
Important Update: - Implemented new Util library: - Convert Bytes to Hex/Bin/Safe string - Convert HexString to Bytes - Search String for substring function - Use Util library in LogCore for String conversions
Charl Wentzel
2019-04-15 17:26:52 +02:00
f20a9a676f
Important Update: - JSONparseCore: - Implement output to string - Added method WriteToString() - Create function pointers which is selected for correct output: JSONstrOutput or JSONfileOutput -> Print() - Replace all write() statements with Print() statements - Modify PrintStr not use dprintf, but sprintf to temp buffer
Charl Wentzel
2019-04-07 10:25:44 +02:00
7acdd8f704
Minor Update: - Increase buffer of JSONparse to ensure reading for long strings
Charl Wentzel
2019-04-06 13:45:45 +02:00
bc89021a0e
Important Update: - DateTimeCore: - Added new functions to process data information - JSONparse: - Bug fix: file permissions on create
Charl Wentzel
2019-04-03 17:03:50 +02:00
ebaf52a1a0
Important Update: - Split SelectableCore.cpp into two classes: SelectableBare & SelectableCore
Charl Wentzel
2019-03-29 15:44:13 +02:00
889df6c7de
Important Update: - DeviceCore: - Added PollCycle variable (not used here) - WatchdogCore: - Return "true" on in Process() - SelectableCore: - Minor update (code compacted) - Application/Function: - Added CApplication as friend of CFunction - Added param WaitToTerminate on Function - Application Run() only exists if all (WaitToTerminate) functions has terminated cleanly.
Charl Wentzel
2019-03-09 20:41:25 +02:00
3626909786
Important Update: - Added SendEnable (vir RTS pin) for TTL/RS485 converter - Bug fix: Check for Handle->InTimeout before force output
Charl Wentzel
2019-03-04 16:42:29 +02:00
f10750ca2d
Important Update: - Remove separate poll group specifications in JSON file - Implemented PollGroups per parameter or node in JSON file - Implemented copying of PollGroups from Template
Charl Wentzel
2019-01-09 15:19:06 +02:00
3472f506b6
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
Charl Wentzel
2019-01-09 10:56:38 +02:00
3e40f7a86d
Important Update: - Implement Handle Address renaming: - Restructure JSON config, with address list and rename list - SelectableCore: - Add method GetHandleAddress() - lookup renamed handle - Add init values to all struct and classes declarations - Replace malloc()/strcpy() sequences with strdup()
Charl Wentzel
2019-01-08 08:35:21 +02:00
c5da842ac1
Major Update: - FunctionCore: - Add OutputFormat param on Output() method - override output format - SelectableCore: - Update Log output formats (process/functionblock) - DeviceCore: - Updated device data format (different byte sequences) - Added ID & Address fields to TDevice struct - Add search methods for ID & Address - Update AddDevice() method to check for duplicate ID & address - Handle Invalid reply different from reply timeout - Add methods ValidReplyReceived() for standardise operation - Bug fix: DeviceTypes added as to Device List! - Bug fix: Check if Device/DeviceType created before adding params - Added correct handling of new Device Data types (LH & HL) - Updated log messages
Charl Wentzel
2018-12-16 00:42:43 +02:00
f1be4e9540
Important Update: - Switch from malloc/free -> new/delete for structures - Bug fix: Move Parameter groups to Device (not class) - Update Parameter groups: - Update Read/Write indicators as params are added
Charl Wentzel
2018-12-13 12:41:37 +02:00
dc76d99b58
Important Update; - ApplicationCore: - Minor log updates - FunctionCore: - Initialise structs & object params in declaration - DeviceCore: - Update logs with more consistent structure - Initialise structs & object params in declaration - Implemented DeviceType templates - Added Add/Get/Destroy methods - Load from config or separate template file - Build Devices/Params from template - Implemented ParamGroups - Added Add/Get/Destroy methods - Load with DeviceTypes - Added JSON parser to read separate template files - Bug fix: Getxxxx() methods
Charl Wentzel
2018-12-13 09:17:39 +02:00
90beb031af
Minor Update
Charl Wentzel
2018-12-11 21:36:24 +02:00
3f568364da
Important Update: - DataTreeCore: - Rename enum EDataType -> EJsonDataType - DeviceCore: - Rename enum EMBDataType -> EDeviceDataType - Add method GetNextTypeDevice() method - Bug fix: Add Type Name: 0 -> "none" - Added permanent Event Channel to TDevice - Add param Type to TDevice - Removed UpdateInterval/Timeout params & methods from TDevice - Separated DeviceInit() method from Init() - Add param DeviceInit to force/avoid DeviceInit() in Init() - Renamed and restructured SetUpdate() & SetParamScan() methods to: SetParamAccess() & SetParamEvent() - Converted DestroyDevice() and DestroyDeviceParam() to inline methods - Moved methods GetCmdParam() and HandleCommand() from CModbusInterface - Renamed TDeviceParam field: UpdateInterval/Timeout -> EventInterval/Timeout - Renamed TDeviceParam field: Scan -> Read - Added TDeviceParam field: Write
Charl Wentzel
2018-12-11 19:55:44 +02:00
07f746db2a
Important Update: - DeviceCore: - Add dtNone data type - Add Config param, reference to data tree - Add Init() methods, loading config from JSON - Add GetDataType() method, converts text to data type enum - Add Set/UpdateStringValue() methods with Len param - Clear compiler warnings, missing switch case values
Charl Wentzel
2018-12-10 21:21:13 +02:00
2ff8f556aa
Important Update: - Add "Custom" handle type to allow derived classes, e.g. BLEinterface
Charl Wentzel
2018-12-09 11:13:54 +02:00
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)
Charl Wentzel
2018-11-27 09:56:27 +02:00
277798a008
Important Update: - JSON config: - Move Name, Definition & AddressList under "application" object
Charl Wentzel
2018-11-26 09:53:00 +02:00
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
Charl Wentzel
2018-11-25 18:24:36 +02:00
bdff82f9c8
Bug fix: - DataTreeCore: - Error in GetChild() return when Child not created
Charl Wentzel
2018-11-25 12:07:51 +02:00
5dd0e88708
Minor Update: - WatchdogCore: - Renamed FunctionType TYPE_WATCHDOG -> TYPE_WATCHDOGPING - ApplicationCore: - Prevent overwriting existing Function Type
Charl Wentzel
2018-11-25 10:19:52 +02:00
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
Charl Wentzel
2018-11-24 13:35:23 +02:00
7434334280
Major Update: - FunctionCore, SelectCore, SelectableCore, DeviceCore, FileCore: - Update Logs to show [ProcessName]/[FunctionName] - SelectableCore: - Update ConnectTypeName array (more readable) - Return THandle on all OpenXxxx() methods - Do not remove select handle for UDPremoteClient (same handle as server) - Add correct Handle when adding RemoteClient to Selector
Charl Wentzel
2018-11-22 11:29:55 +02:00
e3e5aa5258
Important Update: - Bug fix: Handle not updated in SelectCore if SelectHandle re-used
Charl Wentzel
2018-11-21 14:53:16 +02:00
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
Charl Wentzel
2018-11-20 11:27:09 +02:00
278198171d
Important Update: - SelectableCore: - Finish UDP implementation - Change UDPsock to UDPserver/client/remote - Add OpenUDPserver/client/remote methods - Add ReadFrom/WriteToUDP() methods (cannot write to FD) - ReadFrom/WriteToFD(): - return negative bytes on error - small delay between consecutive reads/writes - Set address correctly on resolve (for UDP or TCP) - Improve ReadFrom/WriteToFD() methods (improved timing & error) - Improve error reporting on Input/OutputHandle() methods - CharBufferCore: - Standardise ReadFrom/WriteToFD() method - Bug fix: Peek/PeekCopy error if Data param not passed - FileCore - Standardise ReadFrom/WriteToFD() method
Charl Wentzel
2018-11-19 19:52:39 +02:00
1e74b9cd60
Important Update: - SelectableCore: - Bug fix: StateCallBack array to small - Implemented and tested UNIX sockets - Started implementation of UDP sockets - Add "TCP" to TCP socket related methods and types
Charl Wentzel
2018-11-18 18:29:20 +02:00
85a811c19f
Important Bug fix: - 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()
Charl Wentzel
2018-11-18 12:47:33 +02:00
2382ff4527
Important Update: - DataTreeCore: - Rename all Get/SetChild...() methods to Get/SetMem...() - Update all other objects with new methods
Charl Wentzel
2018-11-17 20:02:47 +02:00
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
Charl Wentzel
2018-11-17 19:10:59 +02:00