pub struct Signal {
pub name: String,
pub index: u8,
pub tcp_channel: Option<u8>,
}Expand description
Signal representation with both Nanonis index and optional TCP channel
This struct replaces the old SignalIndex/NanonisIndex/ChannelIndex wrapper types. It carries both the Nanonis signal index (0-127) and the optional TCP channel mapping (0-23) in one place, eliminating the need for verbose conversions.
Fields§
§name: StringOriginal Name from Machine
index: u8Nanonis signal index (0-127)
tcp_channel: Option<u8>TCP channel index (0-23) if this signal has TCP logger mapping
Implementations§
Source§impl Signal
impl Signal
Sourcepub fn new(
name: String,
index: u8,
tcp_channel: Option<u8>,
) -> Result<Self, NanonisError>
pub fn new( name: String, index: u8, tcp_channel: Option<u8>, ) -> Result<Self, NanonisError>
Create a new Signal with validation
pub fn new_unchecked(name: &str, index: u8, tcp_channel: Option<u8>) -> Self
Sourcepub fn index_only(name: &str, index: u8) -> Self
pub fn index_only(name: &str, index: u8) -> Self
Create a Signal with only Nanonis index (no TCP mapping)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signal
impl<'de> Deserialize<'de> for Signal
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Signal
impl StructuralPartialEq for Signal
Auto Trait Implementations§
impl Freeze for Signal
impl RefUnwindSafe for Signal
impl Send for Signal
impl Sync for Signal
impl Unpin for Signal
impl UnwindSafe for Signal
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