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
This commit is contained in:
@@ -68,11 +68,19 @@ bool CDeviceCore::Init( CDataMember * FunctionConfig )
|
||||
|
||||
// Add Channels
|
||||
if (!(CmdChannel = GetChannel( "Command" )))
|
||||
CmdChannel = AddChannel( "Command", true, true );
|
||||
CmdChannel = AddChannel( "Command", true );
|
||||
else
|
||||
SetChannelState( CmdChannel, true );
|
||||
|
||||
if (!(DeviceChannel = GetChannel( "Device" )))
|
||||
DeviceChannel = AddChannel( "Device", true, true );
|
||||
DeviceChannel = AddChannel( "Device", true );
|
||||
else
|
||||
SetChannelState( DeviceChannel, true );
|
||||
|
||||
if (!(EventChannel = GetChannel( "Event" )))
|
||||
EventChannel = AddChannel( "Event", true, true );
|
||||
EventChannel = AddChannel( "Event", true );
|
||||
else
|
||||
SetChannelState( EventChannel, true );
|
||||
|
||||
// Load Polling configuration
|
||||
PollConfig = Config->GetChild( "Polling", true );
|
||||
|
||||
Reference in New Issue
Block a user