Commit Graph

208 Commits

Author SHA1 Message Date
474289beab Merge branch 'master' into HitNotBLE 2021-10-12 10:16:04 -05:00
e5f8a8347a CharBufferCore:
- Bug fix - FindStr() for input marker not matching correctly
SeletableBare/Core:
- Reformat code - eliminate & compact {} where needed
2021-10-12 10:14:35 -05:00
668d81c9d5 Merge branch 'master' of /home/development/source/core/redAcore into InterAfrica 2021-09-14 16:51:59 +02:00
04152b0762 redAcore: Buffer sizes updated 2021-09-14 16:40:53 +02:00
c4fc72ca23 Merge branch 'HitNotDB' 2021-09-05 09:25:56 +02:00
1de6cc498c Code compacting of JSON & DataTree:
- Remove excessive {}
DataTree:
- Use "p" prefix in funtion parameters to avoid object parameter overlap
2021-09-05 09:25:00 +02:00
43518eff80 DataTree: Simplify object init 2021-07-05 12:31:13 +02:00
0e6cbf6664 Timing update:
- Added TimeDiff function
2021-04-27 11:41:25 +02:00
6fbfbd1f68 Increasing buffer size for UtilCore 2021-03-01 15:20:36 +02:00
c37e16a874 Clear warning on SelectCore:
- use new instead of malloc/memset to init struct
2021-02-22 17:01:25 +02:00
df9be9afc2 Merge branch 'HitNotBLE' 2020-10-27 08:07:13 -05:00
d9440f63c0 DateTime bug fix:
- Correctly handle optional separator between date & time
2020-10-27 08:05:42 -05:00
Charl Wentzel
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
2020-04-29 17:50:03 +02:00
Charl Wentzel
11e3d04f6c Minor Update:
- Fix uninitialised memory error in DateTimeCore
2020-04-21 08:04:40 +02:00
Charl Wentzel
75582b3bf7 Merge branch 'master' into InterAfrica 2019-12-06 04:05:29 +02:00
Charl Wentzel
1b20ee4c1a Important Update:
- JSONparseCore:
  - Bug Fix: Always report "First entry must be Object" error
2019-11-04 13:29:53 +02:00
Charl Wentzel
d8f8d6851c Important Update:
- JSONparseCore:
  - Bug fix: Always shows "No content after root" error
2019-11-04 13:15:04 +02:00
Charl Wentzel
b5912123cc Minor update:
- Add separator between date/time for GetDateTimeStr()
2019-10-13 23:18:50 +02:00
Charl Wentzel
7c77d564a7 Minor Updates:
- DateTimeCore:
  - Specify separator between date & time fof BiuildDateTimeStr();
- UtilCore:
  - Add UrlEncode() and UrlDecode() functions
2019-10-06 19:38:11 +02: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
aa86837e93 Minor update:
- Move strlcase() from SelectableCore to UtilCore
2019-09-08 08:13:03 +02:00
Charl Wentzel
cff2d2712a Minor update:
- Added IntToBinStr() method to convert int to binary output
2019-09-01 12:46:17 +02:00
Charl Wentzel
7f800a43f5 Merge branch 'master' into InterAfrica 2019-08-18 14:15:27 +02:00
Charl Wentzel
429dae5f50 Minor update
- DataTreeCore:
  - Use strdup() to copy strings
2019-07-29 18:48:46 +02:00
Charl Wentzel
55168dece2 Important update:
- DateTimeCore:
  - Bug fix: BuildDateTimeStr() incorrect date
  - New methods: ReadDateTime() convert DateTimeStr -> time_t
2019-07-22 10:59:24 +02:00
Charl Wentzel
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
2019-07-16 16:43:55 +02:00
Charl Wentzel
c682fd6504 Merge branch 'MessageServer' 2019-07-15 17:41:04 +02:00
Charl Wentzel
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
2019-07-15 17:40:40 +02:00
Charl Wentzel
df371d4f10 Important Update:
- DeviceCore:
  - Allow different event output types: None, Simple or JSON
  - Add date & time to JSON events
2019-07-15 17:29:45 +02:00
Charl Wentzel
91a7707fef Minor Update:
- DeviceCore:
  Issue event with DataPath, not param name
2019-07-12 08:54:06 +02:00
Charl Wentzel
5f0c963da7 Merge branch 'master' into ModbusCore 2019-07-10 19:50:26 +02:00
Charl Wentzel
7d69edffa2 Important Update:
- DeviceCore:
  - Added Data Type "bool"
  - Create boolean var for params of type "bool"
2019-07-10 19:39:44 +02:00
Charl Wentzel
14af8390ec Important Update:
- FunctionCore:
  - Bug Fix: Change Channel OutState before triggering event
- TimingCore:
  - Add method SecondsPassed() (provides seconds instead of milli-seconds)
2019-06-23 20:51:51 +02:00
Charl Wentzel
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()
2019-06-23 18:03:37 +02:00
Charl Wentzel
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)
2019-06-23 10:38:27 +02:00
Charl Wentzel
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()
2019-06-19 11:18:34 +02:00
Charl Wentzel
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
2019-06-17 12:43:12 +02:00
Charl Wentzel
abf51d39a2 Merge branch 'GISReaderPort' 2019-06-16 21:04:28 +02:00
Charl Wentzel
8791e25d22 Important update:
- DateTimeCore:
  - Added ReadDateTime() method, combining ReadDate() & ReadTime()
  - Added Read(Time/Date/DateTime)Str() methods for decoding date string
2019-06-16 13:56:26 +02:00
Charl Wentzel
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
2019-06-10 17:25:31 +02:00
Charl Wentzel
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
2019-06-10 10:44:51 +02:00
Charl Wentzel
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
2019-06-09 22:05:27 +02:00
Charl Wentzel
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
2019-06-05 19:13:04 +02:00
Charl Wentzel
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
2019-06-04 18:35:23 +02:00
Charl Wentzel
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()
2019-06-02 16:12:42 +02:00
Charl Wentzel
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
2019-05-28 09:22:28 +02:00
Charl Wentzel
316b27b19f Important Update:
- DeviceCore:
  - Allow adjustable reply timeout with SetWaitForReply()
2019-05-22 15:35:27 +02:00
Charl Wentzel
97eb749903 Merge branch 'BeagleBoneIO' 2019-05-20 18:08:10 +02:00
Charl Wentzel
c0a50bf2bd Minor update:
- FunctionCore:
  - Set Function Type in Init()
- SelectableBare:
  - Remove unnecesary initialisation in constructor
- SelectableCore:
  - Remove code duplicated in SelectableBare
2019-05-20 18:07:25 +02:00
Charl Wentzel
c723846fc9 Bug fix:
- JSONparse:
  - Error deleting unused array element
2019-05-20 17:33:35 +02:00