pub struct ScpiSession { /* private fields */ }Expand description
SCPI session over a boxed transport.
Implementations§
Source§impl ScpiSession
impl ScpiSession
pub fn new(transport: DynTransport, opts: ConnectOptions) -> Result<Self>
pub fn with_diagnostics(self, diagnostics: Diagnostics) -> Self
pub fn transport(&self) -> &dyn Transport
pub fn options(&self) -> &ConnectOptions
Sourcepub fn write(&mut self, command: &str) -> Result<()>
pub fn write(&mut self, command: &str) -> Result<()>
Writes a command without expecting a response.
Sourcepub fn query(&mut self, command: &str) -> Result<String>
pub fn query(&mut self, command: &str) -> Result<String>
Sends a query and returns the response string.
pub fn query_with_timeout( &mut self, command: &str, timeout: Duration, ) -> Result<String>
Sourcepub fn probe_syst_err(&mut self) -> bool
pub fn probe_syst_err(&mut self) -> bool
Probes and caches whether SYST:ERR? is supported.
Sourcepub fn probe_opc(&mut self) -> bool
pub fn probe_opc(&mut self) -> bool
Timeout is inconclusive and must not be cached as unsupported.
Sourcepub fn check_errors(&mut self) -> Result<Vec<String>>
pub fn check_errors(&mut self) -> Result<Vec<String>>
Drains the error queue, including any entry consumed by an earlier probe.
Auto Trait Implementations§
impl !RefUnwindSafe for ScpiSession
impl !Sync for ScpiSession
impl !UnwindSafe for ScpiSession
impl Freeze for ScpiSession
impl Send for ScpiSession
impl Unpin for ScpiSession
impl UnsafeUnpin for ScpiSession
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