Struct design_pattern_examples_rust::facade::facade_devicenetworkhighlevel::DeviceNetworkHighLevel
source · pub struct DeviceNetworkHighLevel {
low_level_system: Box<dyn IDeviceNetworkLowLevel>,
}
Expand description
This struct wraps the IDeviceNetworkLowLevel interface and implements the high level IDeviceNetworkHighLevel interface, which is a simpler interface. All calls on the high level interface are forwarded to the appropriate low level interface. Part of the “Facade” pattern example.
Fields§
§low_level_system: Box<dyn IDeviceNetworkLowLevel>
Implementations§
source§impl DeviceNetworkHighLevel
impl DeviceNetworkHighLevel
sourcepub fn new() -> Box<dyn IDeviceNetworkHighLevel>
pub fn new() -> Box<dyn IDeviceNetworkHighLevel>
Constructor.
Trait Implementations§
source§impl IDeviceNetworkHighLevel for DeviceNetworkHighLevel
impl IDeviceNetworkHighLevel for DeviceNetworkHighLevel
source§fn num_chains(&self) -> usize
fn num_chains(&self) -> usize
The number of device chains available from the sub-system.
source§fn get_idcodes(&mut self, chain_index: usize) -> Vec<u32>
fn get_idcodes(&mut self, chain_index: usize) -> Vec<u32>
Returns a list of all idcodes from all selected devices in the
given device chain.
source§fn enable_devices_in_device_chain(&mut self, chain_index: usize, select_mask: u32)
fn enable_devices_in_device_chain(&mut self, chain_index: usize, select_mask: u32)
Make visible certain devices in the given device chain. The
selectMask
value has a bit set for each TAP device to make visible.source§fn disable_devices_in_device_chain(&mut self, chain_index: usize)
fn disable_devices_in_device_chain(&mut self, chain_index: usize)
Resets the given device chain so that all devices except the TAP
controller is no longer visible.