pub struct Switch { /* private fields */ }Expand description
Switch / matrix session view (IVI-inspired / SCPI :ROUTe).
Path model: routes are matrix channel pairs (ch1, ch2). Use Self::path_label
for a stable human-readable name; IVI “ClosePath” maps to Self::close_route.
Implementations§
Source§impl Switch
impl Switch
pub fn new(session: InstrumentSession) -> Self
pub fn session(&self) -> &InstrumentSession
pub fn session_mut(&mut self) -> &mut InstrumentSession
Sourcepub fn path_label(ch1: u32, ch2: u32) -> String
pub fn path_label(ch1: u32, ch2: u32) -> String
Formats a matrix path label for channels ch1 and ch2 (1-based).
Equivalent naming to IVI ClosePath / OpenPath path strings.
Sourcepub fn close_route(&mut self, ch1: u32, ch2: u32) -> Result<()>
pub fn close_route(&mut self, ch1: u32, ch2: u32) -> Result<()>
Closes a route between two channels (1-based). IVI ClosePath equivalent.
Sourcepub fn open_route(&mut self, ch1: u32, ch2: u32) -> Result<()>
pub fn open_route(&mut self, ch1: u32, ch2: u32) -> Result<()>
Opens a route between two channels (1-based). IVI OpenPath equivalent.
Auto Trait Implementations§
impl !RefUnwindSafe for Switch
impl !Sync for Switch
impl !UnwindSafe for Switch
impl Freeze for Switch
impl Send for Switch
impl Unpin for Switch
impl UnsafeUnpin for Switch
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