[−][src]Struct ether_dream::dac::stream::CommandQueue
A queue of commands that are to be submitted at once before listening for their responses.
Methods
impl<'a> CommandQueue<'a>
[src]
pub fn prepare_stream(self) -> Self
[src]
This command causes the playback system to enter the Prepared
state. The DAC resets its
buffer to be empty and sets "point_count" to 0
.
This command may only be sent if the light engine is Ready
and the playback system is
Idle
. If so, the DAC replies with ACK. Otherwise, it replies with NAK - Invalid.
pub fn begin(self, low_water_mark: u16, point_rate: u32) -> Self
[src]
Causes the DAC to begin producing output.
low_water_mark
Currently unused.
point_rate
The number of points per second to be read from the buffer. If the playback system was
Prepared
and there was data in the buffer, then the DAC will reply with ACK. Otherwise,
it replies with NAK - Invalid.
pub fn point_rate(self, point_rate: u32) -> Self
[src]
Adds a new point rate to the point rate buffer.
Point rate changes are read out of the buffer when a point with an appropriate flag is
played (see the WriteData
command).
If the DAC's playback state is not Prepared
or Playing
, it replies with NAK - Invalid.
If the point rate buffer is full, it replies with NAK - Full.
Otherwise, it replies with ACK.
pub fn data<I>(self, points: I) -> Self where
I: IntoIterator<Item = DacPoint>,
[src]
I: IntoIterator<Item = DacPoint>,
Indicates to the DAC to add the following point data into its buffer.
pub fn stop(self) -> Self
[src]
Causes the DAC to immediately stop playing and return to the Idle
playback state.
It is ACKed if the DAC was in the Playing
or Prepared
playback states.
Otherwise it is replied to with NAK - Invalid.
pub fn emergency_stop(self) -> Self
[src]
Causes the light engine to enter the E-Stop state, regardless of its previous state.
This command is always ACKed.
pub fn clear_emergency_stop(self) -> Self
[src]
If the light engine was in E-Stop state due to an emergency stop command (either from a
local stop condition or over the network), this command resets it to Ready
.
It is ACKed if the DAC was previously in E-Stop.
Otherwise it is replied to with a NAK - Invalid.
If the condition that caused the emergency stop is still active (e.g. E-Stop input still asserted, temperature still out of bounds, etc) a NAK - Stop Condition is sent.
pub fn ping(self) -> Self
[src]
The DAC will reply to this with an ACK packet.
This serves as a keep-alive for the connection when the DAC is not actively streaming.
pub fn submit(self) -> Result<(), CommunicationError>
[src]
Finish queueing commands and send them to the DAC.
First all commands are written to the TCP stream, then we block waiting for a response to each from the DAC.
Auto Trait Implementations
impl<'a> RefUnwindSafe for CommandQueue<'a>
impl<'a> Send for CommandQueue<'a>
impl<'a> Sync for CommandQueue<'a>
impl<'a> Unpin for CommandQueue<'a>
impl<'a> !UnwindSafe for CommandQueue<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,