- 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
- 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
- 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
- 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
- FunctionCore:
- Set Function Type in Init()
- SelectableBare:
- Remove unnecesary initialisation in constructor
- SelectableCore:
- Remove code duplicated in SelectableBare
- 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.
- 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
- 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
- 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
- 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
- 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
- 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
- SelectableCore:
- Bug fix: correct ConnectTypeNames
- Pass handle reference to Select when adding file discriptor.
- Rename Select vars Handle -> SelectHandle
- Show type and name of handle on Select logs
- Add Resolve Delay, allow time delay before resolving address
Allow completion of other actions before blocking all to getaddr()
- Remove Handle->KeepAlive, assume always true
- SelectableCore:
- Move Serial port config params to Port/SerialConfig
- Only configure serial port if config setting provided in JSON file
- Add SerialConfig param to THandle struct, set when serial config given
- Rename method: ConfigureSerialPort() -> SetSerialPortConfig()
- New method: GetSerialPortConfig() read serial port config into Handle
- Split method SetPortHandle():
- SetPortHandle() - only set port type and address
- SetPortHandleSerial() - only set serial port parameters
- JSONparseCore:
- Bug fix: Incorrectly terminated PrintString on null
- SelectableCore:
- Add BaudRate, DataBits, Parity, StopBits, FlowCtrl, DataWait to THandle
- Include Serial Port setup in SetPortHandle()
- Read Serial Port config in LoadConfigData()
- Rename SetSerialConfig() -> ConfigureSerialPort()
- Configure Serial Port immediately after opening port
- SelectableCore:
- Split SetBuffers() into SetInBuffer() and SetOutBuffer()
- Rename SerialConfig() -> SetSerialConfig()
- Add serial port configuration (eg. baudrate) to ConfigData
- Read only no of bytes reported by FIONREAD
- DataTree:
- Bug fix: Create Int/Float/Bool params if requested
- SelectableCore:
- Split handling of Handle from Input() to InputHandle() method
- Allow multiple handles to be connected to single Channel
- Update logs to report Handle, not Channel name
- TimingCore:
- Convert all functions to inline functions in header (remove .cpp file)
- Add new function TimeLeft()
- WatchdogCore:
- Bug fix: No watchdog channel, use InputHandle() method not Input()
- Bug fix: ping ignored, use To:"watchdog" in ping command
- FunctionCore:
- Output() returns largest no of bytes written to linked input
- SelectableCore:
- Auto-manage:
- Add AutoManage param -> Persistent
- Will automatic open port if written to when Auto-Manage enabled
- Will keep port open (re-open if closed) if Persistent = true
- DNS resolve:
- Set AddressFailed if port could not open/bind
- Only use next resolved address if current address failed
- Remote Client connect not working properly
- Set Client Port no on connect
- Correctly handle create failure
- Show error on fail
- Input() fail to transfer data if Handle & Channel not same name
- Search for linked handles
- 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)
- DataTreeCore:
- Allow types float, int & bool to be read as strings with GetStr()
- LogCore:
- Add comments to Logging parameters
- WatchDogCore:
- Call CSelectableCore::Process() in Process() to manage connect
- SelectableCore:
- Allow SetSocketHandle() to be called if Handle already set as socket
- added strlcase() method to convert string to lower case
- Update Handle structure:
- renamed Address -> HostName
- renamed PortNo -> PortName
- added AddressList for all resolved addresses
- added AddressInfo for active address
- Add ResolveAddress() method
- Domain name and protocol port resolving with GetAddrInfo()
- JSON updated:
- domain name can be provided instead of IP address
- protocol can be specified instead of Port No, e.g. "HTTP" / "SSH"
- Resolve address before connect, or use next resolved address
- FunctionCore:
- Do not auto create empty channel list
- SelectCore:
- Rename method: SetDebugLevel() -> LogLevel()
- SelectableCore:
- Do not auto create empty handles list
- 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
- FunctionCore:
- Fix Memory Leaks:
- Recreate Name in LoadConfig()
- Setting FirstChannel to NULL in LoadConfig()
- Fix fault on empty Log/Output in LoadConfig()
- Check if Log/Level exists in LoadConfig()
- Do not auto-create all config parameters
- SelectableCore:
- Fix Memory Leaks:
- Setting FirstHandle to NULL in LoadConfig()
- Do not auto-create all config parameters
- Update logs to specifically refer to "TCP" server/client
- CLiteProtocol:
- Set input string on methods to const char *
- Simplify checking for verification
- Ensure Length parameter can be left out on all methods
- Add quick functions for structured commands: To, From, Command
- CLogCore:
- Use only "\n", not "\r\n"
- SignalCore:
- Use std::endl instead of "\r\n"
- SelectableCore:
- Made GetType() & GetState() public methods
- Update logs in Input()
- FunctionCore:
- Add Input/OutputEnabled parameters with Get/Set methods.
- Update logging in Input() and Output()
- Check if input/output enabled in Input() and Output()
- 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