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
This commit is contained in:
Charl Wentzel
2018-12-16 00:42:43 +02:00
parent f1be4e9540
commit c5da842ac1
5 changed files with 231 additions and 131 deletions

View File

@@ -2340,19 +2340,19 @@ int CSelectableCore::Input( const char * ChannelName, const char * Data, int Len
// Get Channel
if (!(Channel = GetChannel( ChannelName ))) {
// Channel not found
if (Log) Log->Message( LogLevel, dlHigh, "%s: Channel '%s' - Input rejected, Channel not found",
if (Log) Log->Message( LogLevel, dlHigh, "%s/%s: Channel '%s' - Input rejected, Channel not found",
ProcessName, Name, ChannelName );
return 0;
}
else if (!Channel->InputEnabled) {
// Channel disabled
if (Log) Log->Message( LogLevel, dlHigh, "%s: Channel '%s' - Input rejected, Channel input disabled",
if (Log) Log->Message( LogLevel, dlHigh, "%s/%s: Channel '%s' - Input rejected, Channel input disabled",
ProcessName, Name, ChannelName );
return 0;
}
// Log event
if (Log) Log->Output( LogLevel, dlHigh, LogOutput, Data, Len, "%s: Channel '%s' - IN:",
if (Log) Log->Output( LogLevel, dlHigh, LogOutput, Data, Len, "%s/%s: Channel '%s' - IN:",
ProcessName, Name, ChannelName );
// Find Linked handle
@@ -2371,7 +2371,7 @@ int CSelectableCore::Input( const char * ChannelName, const char * Data, int Len
if (!HandleCount) {
// Handle not found
if (Log) Log->Message( LogLevel, dlHigh, "%s: Channel '%s' - Input rejected, No Handles not found",
if (Log) Log->Message( LogLevel, dlHigh, "%s/%s: Channel '%s' - Input rejected, No Handles not found",
ProcessName, Name, ChannelName );
return 0;
}