pub struct ScpiSession { /* private fields */ }Expand description
SCPI session over a boxed transport.
Implementations§
Source§impl ScpiSession
impl ScpiSession
pub fn new( transport: Box<dyn Transport>, opts: ConnectOptions, ) -> Result<ScpiSession, Error>
pub fn with_diagnostics(self, diagnostics: Diagnostics) -> ScpiSession
pub fn transport(&self) -> &dyn Transport
pub fn options(&self) -> &ConnectOptions
Sourcepub fn flush(&mut self) -> Result<(), Error>
pub fn flush(&mut self) -> Result<(), Error>
Drains pending bytes from the transport read buffer.
Sourcepub fn write(&mut self, command: &str) -> Result<(), Error>
pub fn write(&mut self, command: &str) -> Result<(), Error>
Writes a command without expecting a response.
Sourcepub fn query(&mut self, command: &str) -> Result<String, Error>
pub fn query(&mut self, command: &str) -> Result<String, Error>
Sends a query and returns the response string.
pub fn query_with_timeout( &mut self, command: &str, timeout: Duration, ) -> Result<String, Error>
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.
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