Commit Graph

13 Commits

Author SHA1 Message Date
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
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
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
aaf3c59727 Important Updates:
- 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
2017-07-22 09:40:17 +02:00
Charl Wentzel
ae95602f64 Important update:
- Bug fix: make DateTimeCore functions linkable by using it in CLogCore
- CLogCore:
  - Rename FileOutput -> OutputFile
  - Add DateTimeStr to Output if FileNo > 3
2017-03-04 21:44:39 +02:00
Charl Wentzel
5ea05d119e Major update:
- Logging
  - Created LogCore Class
  - Updated LogCore to use file descriptors instead of stdout
  - Add Log object reference to constructors for:
    FunctionCore, SelectCore
  - Use extern Log() object in SignalCore
- SelectableCore
  - Added new connection type: ForkedPipe
    Create pipe, fork process, connect pipe out to child stdin, exec
2016-08-22 12:14:53 +02:00
Charl Wentzel
eaace97ec9 Minor Update:
- BufferCore:
  - Method WriteToFD should ignore EAGAIN
- LogCore:
  - Add OUT_COUNT output bit (show total output bytes)
- SelectableCore:
  - Add Force param on WriteToFD, ignore EAGAIN if !Force
2016-07-27 13:42:50 +02:00
Charl Wentzel
b418fa73e0 Important Update:
- LogCore:
  - Removed global DebugLevel var, now passed as parameter
  - Implemented binary output values
- FunctionCore, SelectCore and SelectableCore:
  - internal DebugLevel param implemented
  - new internal DisplayOutput param (Normal/Hex/Bin)
- BufferCore:
  - Bug fix: allow for empty search string/marker
2016-06-09 06:53:09 +02:00
Charl Wentzel
b4073a166a Major Update:
- Updated all Logged messages, standardised DebugLevel:
  - dlNone   - Show startup and stop
  - dlLow    - Show creation/destruction of Function Blocks and Local IO
  - dlMedium - Show connection events, eg. open/close
  - dlHigh   - Show data flow events
-LogCore:
  - LogMessage and ShowOutput uses va_list
    only run printf if DebugLevel correct
  - Remove global LogStr[] variable
- SelectableCore:
  - Implemented Auto-management of handles
    auto open on startup/fail/close
  - Changed simple Open/Close/Read/Write methods to inline
  - Do not set Select Write trigger for server socket
  - Memory leak, setting address twice on RemoteClient
  - Bug fix, only send handle out data if DebugLevel = dlHigh
  - Bug fix, do not Read/ProcessBuffer if no InputBuffer
2016-05-27 13:32:54 +02:00
Charl Wentzel
c01c8f5e9b Major Update:
- Implemented global var DebugLevel
- Update LogCore to check DebugLevel
- Added many log messages and standadised all log messages
- Further improved validation checks on all methods
- Updated SelectCore, only remove SelectHandle from list during Test()
- Close Handles in SelectableCore destructor
Bug fixes:
- Non-blocking Client Socket Connection now working correctly
- Remove FD from Select lists at the correct time
2016-05-26 15:03:13 +02:00
Charl Wentzel
f987ea2224 Important Update:
- Added SignalCore for handling system signals
- Implemented LogMessages (only output to stdout, later to logfile)
- Updated #defines for all header files
2016-05-17 12:24:51 +02:00
Charl Wentzel
eb0ab67499 Minor Update:
- Complete LogCore functions
- Implement ShowOutput() in Port and Socket functions
2016-05-17 11:23:57 +02:00
Charl Wentzel
264169e525 Initial Commit:
- Create single library for all Core RedA functions/classes
- Working version
2016-05-17 07:38:33 +02:00