Struct design_pattern_examples_rust::facade::facade_complicatedsubsystem::FacadeComplicatedSubSystem
source · pub struct FacadeComplicatedSubSystem {
device_chains: Vec<DeviceChain>,
}
Expand description
Represents some kind of system that contains multiple device chains. Part of the “Facade” pattern example.
The following operations are available:
- get_num_chains()
- lock_devices()
- unlock_devices()
- reset_devices()
- select_devices()
- deselect_devices()
- get_idcodes()
Fields§
§device_chains: Vec<DeviceChain>
Implementations§
source§impl FacadeComplicatedSubSystem
impl FacadeComplicatedSubSystem
sourcepub fn new() -> Box<dyn IDeviceNetworkLowLevel>
pub fn new() -> Box<dyn IDeviceNetworkLowLevel>
Constructor.
Trait Implementations§
source§impl IDeviceNetworkLowLevel for FacadeComplicatedSubSystem
impl IDeviceNetworkLowLevel for FacadeComplicatedSubSystem
source§fn get_num_chains(&self) -> usize
fn get_num_chains(&self) -> usize
Retrieve the number of device chains available in the network. Read more
source§fn lock_device_chain(&mut self, chain_index: usize) -> bool
fn lock_device_chain(&mut self, chain_index: usize) -> bool
Lock the specified device chain for exclusive access. Read more
source§fn unlock_device_chain(&mut self, chain_index: usize) -> bool
fn unlock_device_chain(&mut self, chain_index: usize) -> bool
Unlock the specified device chain to release exclusive access. Read more
source§fn reset_device_chain(&mut self, chain_index: usize)
fn reset_device_chain(&mut self, chain_index: usize)
Reset the visibility of all devices on the specified device chain. Read more
source§fn enable_devices_in_device_chain(
&mut self,
chain_index: usize,
devices_select_mask: u32
)
fn enable_devices_in_device_chain( &mut self, chain_index: usize, devices_select_mask: u32 )
Make visible the specified devices on the specified device chain. Read more