[][src]Struct ether_dream::dac::Status

pub struct Status {
    pub protocol: u8,
    pub light_engine: LightEngine,
    pub playback: Playback,
    pub data_source: DataSource,
    pub light_engine_flags: LightEngineFlags,
    pub playback_flags: PlaybackFlags,
    pub buffer_fullness: u16,
    pub point_rate: u32,
    pub point_count: u32,
}

A more rust-esque version of the ether_dream::protocol::DacState.

The DAC sends its status with each DacBroadcast and DacResponse.

Fields

protocol: u8

This remains undocumented in the protocol.

The original implementation source simply sets this to 0.

light_engine: LightEngine

The current state of the DAC's "light engine" state machine.

playback: Playback

The current state of the DAC's "playback" state machine.

data_source: DataSource

The currently-selected data source.

light_engine_flags: LightEngineFlags

If the light engine is Ready no flags will be set.

playback_flags: PlaybackFlags

These flags may be non-zero during normal operation.

buffer_fullness: u16

The number of points currently buffered within the DAC.

point_rate: u32

If in the Prepared or Playing playback states, this is the number of points per second for which the DAC is configured.

If in the Idle playback state, this will be 0.

point_count: u32

If in the Playing playback state, this is the number of points that the DAC has actually emitted since it started playing.

If in the Prepared or Idle playback states, this will be 0.

Methods

impl Status[src]

pub fn from_protocol(status: &DacStatus) -> Result<Self, ProtocolError>[src]

Create a Status from the lower-level protocol representation.

pub fn update(&mut self, status: &DacStatus) -> Result<(), ProtocolError>[src]

Update the Status from the lower-level protocol representation.

pub fn to_protocol(&self) -> DacStatus[src]

Convert the Status to its lower-level protocol representation.

Trait Implementations

impl Clone for Status[src]

impl Copy for Status[src]

impl Debug for Status[src]

impl Eq for Status[src]

impl Hash for Status[src]

impl PartialEq<Status> for Status[src]

impl StructuralEq for Status[src]

impl StructuralPartialEq for Status[src]

Auto Trait Implementations

impl RefUnwindSafe for Status

impl Send for Status

impl Sync for Status

impl Unpin for Status

impl UnwindSafe for Status

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.