[][src]Struct lasy::Lasy

pub struct Lasy { /* fields omitted */ }

A general API that allows for detecting and enumerating laser DACs on a network and establishing new streams of communication with them.

Methods

impl Lasy[src]

pub fn new() -> Self[src]

Instantiate the laser API.

pub fn detect_dacs(&self) -> Result<DetectDacs>[src]

An iterator yielding laser DACs available on the system as they are discovered.

Currently, the only laser protocol supported is the ether dream protocol. Thus, this enumerates ether dream DACs that are discovered on the LAN.

Note that the produced iterator will iterate forever and never terminate, so you may only want to check a certain number of entries or run this iterator on some other thread.

pub fn detect_dac(&self, id: DacId) -> Result<DetectedDac>[src]

Block and wait until the DAC with the given Id is detected.

pub fn new_frame_stream<M, F>(&self, model: M, render: F) -> Builder<M, F> where
    F: RenderFn<M>, 
[src]

Begin building a new laser frame stream.

The stream will call the render function each time new points are needed to feed the laser DAC buffer. The rate at which this will be called depends on the point_hz, frame_hz and the latency_points.

pub fn new_raw_stream<M, F>(&self, model: M, render: F) -> Builder<M, F> where
    F: RenderFn<M>, 
[src]

Begin building a new laser raw stream.

The raw stream will call the given render function with a request for as many points as the DAC currently might need to fill the buffer based on the stream latency.

Auto Trait Implementations

impl Send for Lasy

impl Sync for Lasy

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]