Represents a device chain, which is a collection of DeviceNode objects. Part of the Facade pattern example. More...
Public Member Functions | |
DeviceChain (string name) | |
Constructor. | |
void | ResetVisibility () |
Resets the device chain so that all devices that are not CLdevices are no longer visible in the device chain. | |
void | SelectNodes (uint nodeSelectMask) |
Make visible one or more devices in the device chain. | |
void | DeselectNodes (uint nodeSelectMask) |
Make invisible one or more devices in the device chain. | |
uint[] | GetIdCodesForVisibleNodes () |
Retrieve a list of idcodes for all devices that are visible in the device chain. | |
Public Attributes | |
string | Name |
The Name of this device chain. | |
bool | IsLocked |
Whether this device chain is locked for access. | |
Package Functions | |
void | AddNode (DeviceNode node) |
Helper method to add a DeviceNode to the device chain. DeviceNode objects that are of DeviceTypes.DEVICECONTROLLER are always inserted as the first device in the device chain, with the assumption there is only one DEVICECONTROLLER in a given device chain (this is not actually enforced, though). | |
Private Member Functions | |
void | _ShowHideNodes (uint nodeSelectMask, bool makeVisible) |
Helper method to show or hide devices on the device chain. | |
Private Attributes | |
List< DeviceNode > | _nodes = new List<DeviceNode>() |
The list of TAPNodes on this device chain. | |
Represents a device chain, which is a collection of DeviceNode objects. Part of the Facade pattern example.
Definition at line 96 of file Facade_ComplicatedSubSystem.cs.
|
inline |
Constructor.
name | Name of this device chain. |
Definition at line 117 of file Facade_ComplicatedSubSystem.cs.
References DeviceChain.Name.
|
inlineprivate |
Helper method to show or hide devices on the device chain.
nodeSelectMask | A bit mask where the position of each bit corresponds to a device in the device chain, with bit 0 being the first device, bit 1 being the second device, and so on. |
makeVisible | true if the device is to be made visible on the device chain; otherwise false, the device cannot be seen on the device chain. |
Definition at line 130 of file Facade_ComplicatedSubSystem.cs.
References DeviceChain._nodes.
Referenced by DeviceChain.DeselectNodes(), and DeviceChain.SelectNodes().
|
inlinepackage |
Helper method to add a DeviceNode to the device chain. DeviceNode objects that are of DeviceTypes.DEVICECONTROLLER are always inserted as the first device in the device chain, with the assumption there is only one DEVICECONTROLLER in a given device chain (this is not actually enforced, though).
node | A DeviceNode object to add to the device chain. |
Definition at line 159 of file Facade_ComplicatedSubSystem.cs.
References DeviceChain._nodes, and DeviceNode.DeviceType.
Referenced by Facade_ComplicatedSubSystem.Facade_ComplicatedSubSystem().
|
inline |
Make invisible one or more devices in the device chain.
nodeSelectMask | a bit mask specifying which device or devices to hide, where bit 0 is the first device, bit 1 is the second, etc. Bit 0 is ignored as the first device is always visible. |
Definition at line 205 of file Facade_ComplicatedSubSystem.cs.
References DeviceChain._ShowHideNodes().
Referenced by Facade_ComplicatedSubSystem.DisableDevicesInDeviceChain().
|
inline |
Retrieve a list of idcodes for all devices that are visible in the device chain.
Definition at line 218 of file Facade_ComplicatedSubSystem.cs.
References DeviceChain._nodes, DeviceNode.Idcode, and DeviceNode.Visible.
Referenced by Facade_ComplicatedSubSystem.GetIdcodes().
|
inline |
Resets the device chain so that all devices that are not CLdevices are no longer visible in the device chain.
Definition at line 177 of file Facade_ComplicatedSubSystem.cs.
References DeviceChain._nodes, and DeviceNode.DeviceType.
Referenced by Facade_ComplicatedSubSystem.ResetDeviceChain().
|
inline |
Make visible one or more devices in the device chain.
nodeSelectMask | a bit mask specifying which device or devices to make visible, where bit 0 is the first device, bit 1 is the second, etc. Bit 0 is ignored as the first device is always visible. |
Definition at line 194 of file Facade_ComplicatedSubSystem.cs.
References DeviceChain._ShowHideNodes().
Referenced by Facade_ComplicatedSubSystem.EnableDevicesInDeviceChain().
|
private |
The list of TAPNodes on this device chain.
Definition at line 101 of file Facade_ComplicatedSubSystem.cs.
Referenced by DeviceChain._ShowHideNodes(), DeviceChain.AddNode(), DeviceChain.GetIdCodesForVisibleNodes(), and DeviceChain.ResetVisibility().
bool IsLocked |
Whether this device chain is locked for access.
Definition at line 111 of file Facade_ComplicatedSubSystem.cs.
Referenced by Facade_ComplicatedSubSystem.LockDeviceChain(), and Facade_ComplicatedSubSystem.UnlockDeviceChain().
string Name |
The Name of this device chain.
Definition at line 106 of file Facade_ComplicatedSubSystem.cs.
Referenced by DeviceChain.DeviceChain(), Visitor_Shop.PickupOrder(), Visitor_Shop.PlaceOrder(), and EntryInformation.ToString().