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:
Charl Wentzel
2019-06-05 19:13:04 +02:00
parent fa6825b72a
commit 08fce64629
7 changed files with 202 additions and 154 deletions

View File

@@ -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 );