Represents some kind of system that contains multiple device chains. Part of the Facade pattern example. More...
Static Public Member Functions | |
static IDeviceNetworkLowLevel | CreateInstance () |
Class factory for the sub-system class. | |
Properties | |
int IDeviceNetworkHighLevel. | NumChains [get] |
The number of device chains available from the sub-system. | |
Properties inherited from IDeviceNetworkHighLevel | |
int | NumChains [get] |
The number of device chains available from the sub-system. | |
Private Member Functions | |
Facade_ComplicatedSubSystem () | |
(private) Constructor. Sets up the device chains. | |
int IDeviceNetworkLowLevel. | GetNumChains () |
Retrieve the number of device chains. | |
bool IDeviceNetworkLowLevel. | LockDeviceChain (int chainIndex) |
Lock the specified device chain to indicate exclusive access is desired. | |
bool IDeviceNetworkLowLevel. | UnlockDeviceChain (int chainIndex) |
Unlock the specified device chain to indicate exclusive access is no longer desired. | |
void IDeviceNetworkLowLevel. | ResetDeviceChain (int chainIndex) |
Reset the visibility of all devices on the given device chain so that all devices except the first are not visible. | |
void IDeviceNetworkLowLevel. | EnableDevicesInDeviceChain (int chainIndex, uint deviceselectMask) |
Select one or more devices in the given device chain so those devices are visible. | |
void IDeviceNetworkLowLevel. | DisableDevicesInDeviceChain (int chainIndex, uint deviceselectMask) |
Deselect one or more devices in the given device chain so those devices are no longer visible. | |
uint[] IDeviceNetworkLowLevel. | GetIdcodes (int chainIndex) |
Retrieve a list of idcodes for each device in the given device chain that is visible. | |
uint[] IDeviceNetworkHighLevel. | GetIdcodes (int chainIndex) |
Returns a list of all idcodes from all selected devices in the given device chain. | |
void IDeviceNetworkHighLevel. | EnableDevicesInDeviceChain (int chainIndex, uint selectMask) |
Make visible certain devices in the given device chain. The selectMask value has a bit set for each device device to make visible. | |
void IDeviceNetworkHighLevel. | DisableDevicesInDeviceChain (int chainIndex) |
Resets the given device chain so that all devices except the device controller is no longer visible. | |
Private Attributes | |
DeviceChain[] | _deviceChains = { new DeviceChain("CHAIN0"), new DeviceChain("CHAIN1") } |
The list of device chains. In this case, there are two. | |
Additional Inherited Members | |
int | GetNumChains () |
Retrieve the number of device chains available in the network. | |
bool | LockDeviceChain (int chainIndex) |
Lock the specified device chain for exclusive access. | |
bool | UnlockDeviceChain (int chainIndex) |
Unlock the specified device chain to release exclusive access. | |
void | ResetDeviceChain (int chainIndex) |
Reset the visibility of all devices on the specified device chain. | |
void | EnableDevicesInDeviceChain (int chainIndex, uint devicesSelectMask) |
Make visible the specified devices on the specified device chain. | |
void | DisableDevicesInDeviceChain (int chainIndex, uint devicesSelectMask) |
Make invisible the specified devices on the specified device chain. | |
uint[] | GetIdcodes (int chainIndex) |
Retrieve a list of idcodes of all visible devices in the given device chain. | |
uint[] | GetIdcodes (int chainIndex) |
Returns a list of all idcodes from all selected devices in the given device chain. | |
void | EnableDevicesInDeviceChain (int chainIndex, uint selectMask) |
Make visible certain devices in the given device chain. The selectMask value has a bit set for each TAP device to make visible. | |
void | DisableDevicesInDeviceChain (int chainIndex) |
Resets the given device chain so that all devices except the TAP controller is no longer visible. | |
Represents some kind of system that contains multiple device chains. Part of the Facade pattern example.
The following operations are available:
Definition at line 253 of file Facade_ComplicatedSubSystem.cs.
|
inlineprivate |
(private) Constructor. Sets up the device chains.
Definition at line 272 of file Facade_ComplicatedSubSystem.cs.
References Facade_ComplicatedSubSystem._deviceChains, and DeviceChain.AddNode().
Referenced by Facade_ComplicatedSubSystem.CreateInstance().
|
inlinestatic |
Class factory for the sub-system class.
Definition at line 264 of file Facade_ComplicatedSubSystem.cs.
References Facade_ComplicatedSubSystem.Facade_ComplicatedSubSystem().
Referenced by Facade_ComplicatedSubSystemFactory.CreateHighLevelInstance(), and Facade_ComplicatedSubSystemFactory.CreateLowLevelInstance().
|
inlineprivate |
Resets the given device chain so that all devices except the device controller is no longer visible.
chainIndex | Index of the device chain to access (0..NumChains-1). |
Implements IDeviceNetworkHighLevel.
Definition at line 468 of file Facade_ComplicatedSubSystem.cs.
References Facade_ComplicatedSubSystem.LockDeviceChain().
|
inlineprivate |
Deselect one or more devices in the given device chain so those devices are no longer visible.
chainIndex | The index of the device chain to access (0..n-1). |
deviceselectMask | A bit mask indicating which devices to make invisible, with bit 0 corresponding to the first device, bit 1 corresponding to the second device, etc. Bit 0 is ignored as the first device is always visible. |
Implements IDeviceNetworkLowLevel.
Definition at line 382 of file Facade_ComplicatedSubSystem.cs.
References Facade_ComplicatedSubSystem._deviceChains, and DeviceChain.DeselectNodes().
|
inlineprivate |
Select one or more devices in the given device chain so those devices are visible.
chainIndex | The index of the device chain to access (0..n-1). |
deviceselectMask | A bit mask indicating which devices to make visible, with bit 0 corresponding to the first device, bit 1 corresponding to the second device, etc. Bit 0 is ignored as the first device is always visible. |
Implements IDeviceNetworkLowLevel.
Definition at line 365 of file Facade_ComplicatedSubSystem.cs.
References Facade_ComplicatedSubSystem._deviceChains, and DeviceChain.SelectNodes().
|
inlineprivate |
Make visible certain devices in the given device chain. The selectMask value has a bit set for each device device to make visible.
chainIndex | Index of the device chain to access (0..NumChains-1). |
selectMask | A bit mask where each bit corresponds to a device, up to the number of devices in the given device chain. Bit 0 is ignored as the first device is always visible. |
Implements IDeviceNetworkLowLevel.
Definition at line 454 of file Facade_ComplicatedSubSystem.cs.
References Facade_ComplicatedSubSystem.LockDeviceChain().
|
inlineprivate |
Retrieve a list of idcodes for each device in the given device chain that is visible.
chainIndex | The index of the device chain to access (0..n-1). |
Implements IDeviceNetworkLowLevel.
Definition at line 398 of file Facade_ComplicatedSubSystem.cs.
References Facade_ComplicatedSubSystem._deviceChains, and DeviceChain.GetIdCodesForVisibleNodes().
|
inlineprivate |
Returns a list of all idcodes from all selected devices in the given device chain.
chainIndex | Index of the device chain to access (0..NumChains-1). |
Implements IDeviceNetworkLowLevel.
Definition at line 434 of file Facade_ComplicatedSubSystem.cs.
References Facade_ComplicatedSubSystem.LockDeviceChain().
|
inlineprivate |
Retrieve the number of device chains.
Implements IDeviceNetworkLowLevel.
Definition at line 292 of file Facade_ComplicatedSubSystem.cs.
References Facade_ComplicatedSubSystem._deviceChains.
|
inlineprivate |
Lock the specified device chain to indicate exclusive access is desired.
chainIndex | The index of the device chain to access (0..n-1). |
Implements IDeviceNetworkLowLevel.
Definition at line 304 of file Facade_ComplicatedSubSystem.cs.
References Facade_ComplicatedSubSystem._deviceChains, and DeviceChain.IsLocked.
Referenced by Facade_ComplicatedSubSystem.DisableDevicesInDeviceChain(), Facade_ComplicatedSubSystem.EnableDevicesInDeviceChain(), and Facade_ComplicatedSubSystem.GetIdcodes().
|
inlineprivate |
Reset the visibility of all devices on the given device chain so that all devices except the first are not visible.
chainIndex | The index of the device chain to access (0..n-1). |
Implements IDeviceNetworkLowLevel.
Definition at line 348 of file Facade_ComplicatedSubSystem.cs.
References Facade_ComplicatedSubSystem._deviceChains, and DeviceChain.ResetVisibility().
|
inlineprivate |
Unlock the specified device chain to indicate exclusive access is no longer desired.
chainIndex | The index of the device chain to access (0..n-1). |
Implements IDeviceNetworkLowLevel.
Definition at line 327 of file Facade_ComplicatedSubSystem.cs.
References Facade_ComplicatedSubSystem._deviceChains, and DeviceChain.IsLocked.
|
private |
The list of device chains. In this case, there are two.
Definition at line 258 of file Facade_ComplicatedSubSystem.cs.
Referenced by Facade_ComplicatedSubSystem.DisableDevicesInDeviceChain(), Facade_ComplicatedSubSystem.EnableDevicesInDeviceChain(), Facade_ComplicatedSubSystem.Facade_ComplicatedSubSystem(), Facade_ComplicatedSubSystem.GetIdcodes(), Facade_ComplicatedSubSystem.GetNumChains(), Facade_ComplicatedSubSystem.LockDeviceChain(), Facade_ComplicatedSubSystem.ResetDeviceChain(), and Facade_ComplicatedSubSystem.UnlockDeviceChain().
|
getprivate |
The number of device chains available from the sub-system.
Implements IDeviceNetworkHighLevel.
Definition at line 419 of file Facade_ComplicatedSubSystem.cs.