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
This commit is contained in:
@@ -1575,7 +1575,7 @@ int CDeviceCore::HandleCommand( const char *ChannelName, const char * Data, cons
|
||||
}
|
||||
else {
|
||||
strcat( OutputStr, "\n" );
|
||||
Output( ChannelName, OutputStr, strlen(OutputStr) );
|
||||
Output( ChannelName, NULL, true, OutputStr, strlen(OutputStr) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1584,7 +1584,7 @@ int CDeviceCore::HandleCommand( const char *ChannelName, const char * Data, cons
|
||||
Log->Message( LogLevel, dlMedium, "%s/%s: Channel '%s' Get",
|
||||
ProcessName, Name, ChannelName, OutputStr );
|
||||
strcat( OutputStr, "\n" );
|
||||
Output( ChannelName, OutputStr, strlen(OutputStr) );
|
||||
Output( ChannelName, NULL, true, OutputStr, strlen(OutputStr) );
|
||||
}
|
||||
}
|
||||
else if (!strcasecmp( "set", Value ))
|
||||
@@ -1621,7 +1621,7 @@ int CDeviceCore::HandleCommand( const char *ChannelName, const char * Data, cons
|
||||
}
|
||||
else {
|
||||
sprintf( OutputStr, "> set %s,%s = %s\n", Device->Name, Param->Name, Value );
|
||||
Output( ChannelName, OutputStr );
|
||||
Output( ChannelName, NULL, true, OutputStr );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1630,7 +1630,7 @@ int CDeviceCore::HandleCommand( const char *ChannelName, const char * Data, cons
|
||||
Log->Message( LogLevel, dlMedium, "%s/%s: Channel '%s' Set",
|
||||
ProcessName, Name, ChannelName, OutputStr );
|
||||
strcat( OutputStr, "\n" );
|
||||
Output( ChannelName, OutputStr, strlen(OutputStr) );
|
||||
Output( ChannelName, NULL, true, OutputStr, strlen(OutputStr) );
|
||||
}
|
||||
}
|
||||
else if (!strcasecmp( "status", Value ))
|
||||
@@ -1650,7 +1650,7 @@ int CDeviceCore::HandleCommand( const char *ChannelName, const char * Data, cons
|
||||
}
|
||||
else {
|
||||
sprintf( OutputStr, "> %s - %s\n", Device->Name, ((Device->Online)? "online" : "offline") );
|
||||
Output( ChannelName, OutputStr );
|
||||
Output( ChannelName, NULL, true, OutputStr );
|
||||
}
|
||||
|
||||
// Report error
|
||||
@@ -1658,7 +1658,7 @@ int CDeviceCore::HandleCommand( const char *ChannelName, const char * Data, cons
|
||||
Log->Message( LogLevel, dlMedium, "%s/%s: Channel '%s' Status",
|
||||
ProcessName, Name, ChannelName, OutputStr );
|
||||
strcat( OutputStr, "\n" );
|
||||
Output( ChannelName, OutputStr, strlen(OutputStr) );
|
||||
Output( ChannelName, NULL, true, OutputStr, strlen(OutputStr) );
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -1668,7 +1668,7 @@ int CDeviceCore::HandleCommand( const char *ChannelName, const char * Data, cons
|
||||
Log->Message( LogLevel, dlMedium, "%s/%s: Channel '%s', %s%s",
|
||||
ProcessName, Name, ChannelName, Value, OutputStr );
|
||||
strcat( OutputStr, " (comma separated values)\n" );
|
||||
Output( ChannelName, OutputStr, strlen(OutputStr) );
|
||||
Output( ChannelName, NULL, true, OutputStr, strlen(OutputStr) );
|
||||
}
|
||||
return MaxLen;
|
||||
}
|
||||
@@ -1719,7 +1719,7 @@ bool CDeviceCore::EventOutput( TDeviceParam * Param, bool Force )
|
||||
default :
|
||||
break;
|
||||
}
|
||||
Output( Param->EventChannel, Message, strlen(Message) );
|
||||
Output( Param->EventChannel, NULL, true, Message, strlen(Message) );
|
||||
|
||||
// Reset timer
|
||||
if (Param->EventInterval) {
|
||||
|
||||
Reference in New Issue
Block a user