Represents some kind of system that contains multiple device chains. Part of the Facade Pattern example. More...
Public Member Functions | |
Facade_ComplicatedSubSystem () | |
(private) Constructor. Sets up the device chains. | |
Public Member Functions inherited from IDeviceNetworkLowLevel | |
virtual | ~IDeviceNetworkLowLevel () |
virtual int | GetNumChains ()=0 |
Retrieve the number of device chains available in the network. | |
virtual bool | LockDeviceChain (int chainIndex)=0 |
Lock the specified device chain for exclusive access. | |
virtual bool | UnlockDeviceChain (int chainIndex)=0 |
Unlock the specified device chain to release exclusive access. | |
virtual void | ResetDeviceChain (int chainIndex)=0 |
Reset the visibility of all devices on the specified device chain. | |
virtual void | EnableDevicesInDeviceChain (int chainIndex, uint32_t devicesSelectMask)=0 |
Make visible the specified devices on the specified device chain. | |
virtual void | DisableDevicesInDeviceChain (int chainIndex, uint32_t devicesSelectMask)=0 |
Make invisible the specified devices on the specified device chain. | |
virtual std::vector< uint32_t > | GetIdcodes (int chainIndex)=0 |
Retrieve a list of idcodes of all visible devices in the given device chain. | |
Public Attributes | |
std::vector< DeviceChain > | _deviceChains { DeviceChain("CHAIN0"), DeviceChain("CHAIN1") } |
The list of device chains. In this case, there are two. | |
Private Member Functions | |
int | GetNumChains () |
Retrieve the number of device chains. | |
bool | LockDeviceChain (int chainIndex) override |
Lock the specified device chain to indicate exclusive access is desired. | |
bool | UnlockDeviceChain (int chainIndex) override |
Unlock the specified device chain to indicate exclusive access is no longer desired. | |
void | ResetDeviceChain (int chainIndex) override |
Reset the visibility of all devices on the given device chain so that all devices except the first are not visible. | |
void | EnableDevicesInDeviceChain (int chainIndex, uint32_t deviceselectMask) override |
Select one or more devices in the given device chain so those devices are visible. | |
void | DisableDevicesInDeviceChain (int chainIndex, uint32_t deviceselectMask) override |
Deselect one or more devices in the given device chain so those devices are no longer visible. | |
std::vector< uint32_t > | GetIdcodes (int chainIndex) override |
Retrieve a list of idcodes for each device in the given device chain that is 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 233 of file Facade_ComplicatedSubSystem.cpp.
|
inline |
(private) Constructor. Sets up the device chains.
Definition at line 244 of file Facade_ComplicatedSubSystem.cpp.
References Facade_ComplicatedSubSystem::_deviceChains, DesignPatternExamples_cpp::CORE, DesignPatternExamples_cpp::DEVICECONTROLLER, DesignPatternExamples_cpp::GTE, DesignPatternExamples_cpp::PCH, and DesignPatternExamples_cpp::PMC.
|
inlineoverrideprivatevirtual |
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 353 of file Facade_ComplicatedSubSystem.cpp.
References Facade_ComplicatedSubSystem::_deviceChains.
|
inlineoverrideprivatevirtual |
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 336 of file Facade_ComplicatedSubSystem.cpp.
References Facade_ComplicatedSubSystem::_deviceChains.
|
inlineoverrideprivatevirtual |
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 368 of file Facade_ComplicatedSubSystem.cpp.
References Facade_ComplicatedSubSystem::_deviceChains.
|
inlineprivatevirtual |
Retrieve the number of device chains.
Implements IDeviceNetworkLowLevel.
Definition at line 263 of file Facade_ComplicatedSubSystem.cpp.
References Facade_ComplicatedSubSystem::_deviceChains.
|
inlineoverrideprivatevirtual |
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 275 of file Facade_ComplicatedSubSystem.cpp.
References Facade_ComplicatedSubSystem::_deviceChains.
|
inlineoverrideprivatevirtual |
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 319 of file Facade_ComplicatedSubSystem.cpp.
References Facade_ComplicatedSubSystem::_deviceChains.
|
inlineoverrideprivatevirtual |
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 298 of file Facade_ComplicatedSubSystem.cpp.
References Facade_ComplicatedSubSystem::_deviceChains.
std::vector<DeviceChain> _deviceChains { DeviceChain("CHAIN0"), DeviceChain("CHAIN1") } |
The list of device chains. In this case, there are two.
Definition at line 239 of file Facade_ComplicatedSubSystem.cpp.
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().