Skip to main content

TCPLoggerStream

Struct TCPLoggerStream 

Source
pub struct TCPLoggerStream { /* private fields */ }
Expand description

Simple TCP Logger Stream - connects to data stream only, no control

Implementations§

Source§

impl TCPLoggerStream

Source

pub fn new(addr: &str, stream_port: u16) -> Result<Self, NanonisError>

Connect to TCP Logger data stream only

Creates a simple connection to the TCP data stream without any control operations. All control (start/stop/configure) should be handled externally.

§Arguments
  • addr - Server address (e.g., “127.0.0.1”)
  • stream_port - TCP Logger data stream port (typically 6590)
§Returns

Connected TCPLoggerStream ready to read data frames.

Source

pub fn spawn_background_reader(self) -> Receiver<SignalFrame>

Spawn background reader thread

Creates a background thread that continuously reads TCP Logger data frames and sends them through a channel. The thread automatically exits when the receiver is dropped.

§Returns

A receiver channel for TCPLoggerData frames.

Source

pub fn read_frame(&mut self) -> Result<SignalFrame, NanonisError>

Read a single data frame from the stream

§Returns

TCPLoggerData containing the frame header and signal data.

§Frame Format

Always reads 18 bytes header first, then reads data based on num_channels.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.