instrument-core 0.1.0

VISA-agnostic transport, SCPI session, discovery, and mock fixtures for instrument control
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::scpi::AsyncScpiSession;
use std::time::Duration;

/// Returns true when any probe command succeeds on the async session.
pub async fn probe_any_async(
    session: &mut AsyncScpiSession,
    commands: &[&str],
    timeout: Duration,
) -> bool {
    for cmd in commands {
        if session.query_with_timeout(cmd, timeout).await.is_ok() {
            return true;
        }
    }
    false
}