Skip to main content

StreamInlet

Struct StreamInlet 

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

A stream inlet. Receives data from a stream outlet.

Implementations§

Source§

impl StreamInlet

Source

pub fn new( info: &StreamInfo, max_buflen: i32, max_chunklen: i32, recover: bool, ) -> Self

Source

pub fn open_stream(&self, timeout: f64) -> Result<(), String>

Open the data stream (connect to the outlet’s TCP port).

Source

pub fn pull_sample_f( &self, buffer: &mut [f32], timeout: f64, ) -> Result<f64, String>

Pull a single float sample. Returns the timestamp, or 0 on timeout.

Source

pub fn pull_sample_d( &self, buffer: &mut [f64], timeout: f64, ) -> Result<f64, String>

Source

pub fn pull_sample_i32( &self, buffer: &mut [i32], timeout: f64, ) -> Result<f64, String>

Source

pub fn pull_sample_i16( &self, buffer: &mut [i16], timeout: f64, ) -> Result<f64, String>

Source

pub fn pull_sample_i64( &self, buffer: &mut [i64], timeout: f64, ) -> Result<f64, String>

Source

pub fn pull_sample_str( &self, timeout: f64, ) -> Result<(Vec<String>, f64), String>

Source

pub fn close_stream(&self)

Source

pub fn time_correction(&self, timeout: f64) -> f64

Estimate the clock offset between this machine and the outlet’s machine. Uses NTP-like probing against the outlet’s UDP service port.

Source

pub fn set_postprocessing(&self, flags: u32)

Source

pub fn samples_available(&self) -> u32

Source

pub fn flush(&self) -> u32

Source

pub fn was_clock_reset(&self) -> bool

Source

pub fn smoothing_halftime(&self, value: f32)

Source

pub fn get_fullinfo(&self, _timeout: f64) -> StreamInfo

Trait Implementations§

Source§

impl Drop for StreamInlet

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

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.