Struct visa_api::Instrument
source · pub struct Instrument {
pub idn: Idn,
pub session: Instrument,
pub address: VisaString,
}Expand description
Instrument struct that holds the IDN data, the session and the instrument adress
Fields§
§idn: Idn§session: Instrument§address: VisaStringImplementations§
source§impl Instrument
impl Instrument
sourcepub fn new(idn: Idn, session: Instrument, address: VisaString) -> Instrument
pub fn new(idn: Idn, session: Instrument, address: VisaString) -> Instrument
Create a new Instrument object
pub fn private_read(session: &Instrument) -> Result<String>
sourcepub fn query_idn(&mut self) -> Result<Idn>
pub fn query_idn(&mut self) -> Result<Idn>
Query the device for Identify data, returns the Idn struct
sourcepub fn get_instrument(
resource_manager: &DefaultRM,
manufacturer: &str,
model: &str
) -> Result<Option<Instrument>>
pub fn get_instrument( resource_manager: &DefaultRM, manufacturer: &str, model: &str ) -> Result<Option<Instrument>>
Query for a devide with a specific manufacturer and model, returns the VISA API Instrument struct
sourcepub fn get_addresses(resource_manager: &DefaultRM) -> Result<Vec<VisaString>>
pub fn get_addresses(resource_manager: &DefaultRM) -> Result<Vec<VisaString>>
Query for all instruments connected, returns a list of addresses
pub fn reset(&mut self) -> Result<()>
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Instrument
impl Send for Instrument
impl Sync for Instrument
impl Unpin for Instrument
impl UnwindSafe for Instrument
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