pub struct NetState {
pub name: String,
pub role: String,
pub state: Option<String>,
pub reason: Option<String>,
pub reason_code: Option<String>,
pub extra: Map<String, Value>,
}Expand description
Brief live state of one saved net, from GET /nets/state.
The box probes each physical instrument in parallel under a shared
whole-request budget (8s), so a slow, wedged or absent instrument comes
back with state: None and a NetState::reason instead of failing or
delaying the rest of the bench.
Fields§
§name: StringNet name.
role: StringNet role ("usb", "power-supply", …).
state: Option<String>Live state (e.g. "enabled", "3.300V"), or None when the box
could not read one — see NetState::reason for why.
reason: Option<String>Attached only when state is None: "deadline" (the shared
budget ran out before this net’s instrument answered — not
necessarily this instrument’s fault), "no probe for role" (uart,
spi, i2c, … have no live-state probe), or "unreadable: <detail>".
reason_code: Option<String>Stable machine-readable token alongside reason (e.g.
"hub-skipped"), when the box classified the fault. The human
reason is always complete on its own.
extra: Map<String, Value>Any further keys a newer box attaches.