pub struct DefaultRM(/* private fields */);Expand description
A ResourceManager which close everything on drop
Implementations§
Source§impl DefaultRM
impl DefaultRM
Sourcepub fn new() -> Result<DefaultRM, Error>
pub fn new() -> Result<DefaultRM, Error>
Returns a session to the Default Resource Manager resource.
The first call to this function initializes the VISA system, including the Default Resource Manager resource, and also returns a session to that resource. Subsequent calls to this function return unique sessions to the same Default Resource Manager resource.
When a Resource Manager session is dropped, not only is that session closed, but also all find lists and device sessions (which that Resource Manager session was used to create) are closed.
Trait Implementations§
Source§impl AsResourceManager for DefaultRM
impl AsResourceManager for DefaultRM
Source§fn find_res_list(&self, expr: &VisaString) -> Result<ResList, Error>
fn find_res_list(&self, expr: &VisaString) -> Result<ResList, Error>
Queries a VISA system to locate the resources associated with a specified interface. Read more
Source§fn find_res(&self, expr: &VisaString) -> Result<VisaString, Error>
fn find_res(&self, expr: &VisaString) -> Result<VisaString, Error>
Queries a VISA system to locate the resources associated with a specified interface, return the first resource matched
Source§fn parse_res(
&self,
res: &VisaString,
) -> Result<(AttrIntfType, AttrIntfNum), Error>
fn parse_res( &self, res: &VisaString, ) -> Result<(AttrIntfType, AttrIntfNum), Error>
Parse a resource string to get the interface information.
Source§fn parse_res_ex(
&self,
res: &VisaString,
) -> Result<(AttrIntfType, AttrIntfNum, VisaString, VisaString, VisaString), Error>
fn parse_res_ex( &self, res: &VisaString, ) -> Result<(AttrIntfType, AttrIntfNum, VisaString, VisaString, VisaString), Error>
Parse a resource string to get extended interface information. Read more
Source§fn open(
&self,
res_name: &VisaString,
access_mode: AccessMode,
open_timeout: Duration,
) -> Result<Instrument, Error>
fn open( &self, res_name: &VisaString, access_mode: AccessMode, open_timeout: Duration, ) -> Result<Instrument, Error>
Opens a session to the specified resource. Read more
Source§impl HasAttribute for DefaultRM
impl HasAttribute for DefaultRM
Source§impl Ord for DefaultRM
impl Ord for DefaultRM
Source§impl PartialOrd for DefaultRM
impl PartialOrd for DefaultRM
impl Eq for DefaultRM
impl StructuralPartialEq for DefaultRM
Auto Trait Implementations§
impl Freeze for DefaultRM
impl RefUnwindSafe for DefaultRM
impl Send for DefaultRM
impl Sync for DefaultRM
impl Unpin for DefaultRM
impl UnwindSafe for DefaultRM
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