[][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 Eq for Status[src]

impl Copy for Status[src]

impl PartialEq<Status> for Status[src]

impl Clone for Status[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for Status[src]

impl Hash for Status[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

Auto Trait Implementations

impl Send for Status

impl Sync for Status

Blanket Implementations

impl<T, U> Into 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> From for 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> Any for T where
    T: 'static + ?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.