pub struct DeviceCatalog { /* private fields */ }Expand description
Catalog of discovered or injected devices.
Implementations§
Source§impl DeviceCatalog
impl DeviceCatalog
pub fn from_devices( opener: Arc<dyn SessionOpener>, devices: Vec<DiscoveredDevice>, ) -> Self
pub fn from_devices_with_observer( opener: Arc<dyn SessionOpener>, devices: Vec<DiscoveredDevice>, observer: Option<Arc<dyn CommsObserver>>, ) -> Self
Sourcepub fn with_connect_options(self, opts: ConnectOptions) -> Self
pub fn with_connect_options(self, opts: ConnectOptions) -> Self
Sets the default connect options used when opening sessions from this catalog.
pub fn connect_options(&self) -> &ConnectOptions
pub fn from_fixture(address: &str, fixture: ScriptedFixture) -> Result<Self>
pub fn devices(&self) -> &[DiscoveredDevice]
pub fn devices_by_kind(&self, kind: InstrumentKind) -> Vec<&DiscoveredDevice>
pub fn device(&self, address: &str) -> Result<DeviceRef>
pub fn device_by_id(&self, id: &DeviceId) -> Result<DeviceRef>
Sourcepub fn reconnect_by_identity(&self, id: &DeviceId) -> Result<DeviceRef>
pub fn reconnect_by_identity(&self, id: &DeviceId) -> Result<DeviceRef>
Reconnects to a device by stable identity after replacement or address change.
pub fn health(&self, address: &str) -> Result<DeviceHealth>
pub fn open_dmm(&self, address: &str) -> Result<Dmm>
pub fn open_dc_power_supply(&self, address: &str) -> Result<DcPowerSupply>
pub fn open_function_generator( &self, address: &str, ) -> Result<FunctionGenerator>
pub fn open_oscilloscope(&self, address: &str) -> Result<Oscilloscope>
pub fn open_switch(&self, address: &str) -> Result<Switch>
pub fn open_counter(&self, address: &str) -> Result<Counter>
pub fn open_power_meter(&self, address: &str) -> Result<PowerMeter>
pub fn open_spectrum_analyzer(&self, address: &str) -> Result<SpectrumAnalyzer>
pub fn print_summary(&self)
Auto Trait Implementations§
impl !RefUnwindSafe for DeviceCatalog
impl !UnwindSafe for DeviceCatalog
impl Freeze for DeviceCatalog
impl Send for DeviceCatalog
impl Sync for DeviceCatalog
impl Unpin for DeviceCatalog
impl UnsafeUnpin for DeviceCatalog
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more