[][src]Struct ether_dream::protocol::DacStatus

#[repr(C)]pub struct DacStatus {
    pub protocol: u8,
    pub light_engine_state: u8,
    pub playback_state: u8,
    pub source: u8,
    pub light_engine_flags: u16,
    pub playback_flags: u16,
    pub source_flags: u16,
    pub buffer_fullness: u16,
    pub point_rate: u32,
    pub point_count: u32,
}

Periodically, and as part of ACK packets, the DAC sends its current playback status to the host.

Fields

protocol: u8

This remains undocumented in the protocol.

The original implementation source simply sets this to 0.

light_engine_state: u8

The current state of the "light engine" state machine.

playback_state: u8

The current state of the "playback" state machine.

source: u8

The currently-selected data source:

  • 0: Network streaming (the protocol implemented in this library).
  • 1: ILDA playback from SD card.
  • 2: Internal abstract generator.
light_engine_flags: u16

If the light engine is Ready, this will be 0.

Otherwise, bits will be set as follows:

  • 0: Emergency stop occurred due to E-Stop packet or invalid command.
  • 1: Emergency stop occurred due to E-Stop input to projector.
  • 2: Emergency stop input to projector is currently active.
  • 3: Emergency stop occurred due to over-temperature condition.
  • 4: Over-temperature condition is currently active.
  • 5: Emergency stop occurred due to loss of ethernet link.

All remaining are reserved for future use.

playback_flags: u16

These flags may be non-zero during normal operation.

Bits are defined as follows:

  • 0: Shutter state. 0 is closed, 1 is open.
  • 1: Underflow. 1 if the last stream ended with underflow rather than a Stop command. This is reset to 0 by the Prepare command.
  • 2: E-Stop. 1 if the last stream ended because the E-Stop state was entered. Reset to zero by the Prepare command.
source_flags: u16

This field is undocumented within the protocol reference.

By looking at the source code of the original implementation, this seems to represent the state of the current source.

If source is set to 1 for ILDA playback from SD card, the following flags are defined:

  • 0: ILDA_PLAYER_PLAYING.
  • 1: ILDA_PLAYER_REPEAT.

If source is set to 2 for the internal abstract generator, the flags are defined as follows:

  • 0: ABSTRACT_PLAYING.
buffer_fullness: u16

The number of points currently buffered.

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 DacStatus[src]

pub const LIGHT_ENGINE_READY: u8[src]

The light engine is ready.

pub const LIGHT_ENGINE_WARMUP: u8[src]

In the case where the DAC is also used for thermal control of laser apparatus, this is the state that is entered after power-up.

pub const LIGHT_ENGINE_COOLDOWN: u8[src]

Lasers are off but thermal control is still active.

pub const LIGHT_ENGINE_EMERGENCY_STOP: u8[src]

An emergency stop has been triggered, either by an E-stop input on the DAC, an E-stop command over the network, or a fault such as over-temperature.

pub const PLAYBACK_IDLE: u8[src]

The default state:

  • No points may be added to the buffer.
  • No output is generated.
  • All analog outputs are at 0v.
  • The shutter is controlled by the data source.

pub const PLAYBACK_PREPARED: u8[src]

The buffer will accept points.

The output is the same as the Idle state

pub const PLAYBACK_PLAYING: u8[src]

Points are being sent to the output.

pub const SOURCE_NETWORK_STREAMING: u8[src]

Network streaming (the protocol implemented in this library).

pub const SOURCE_ILDA_PLAYBACK_SD: u8[src]

ILDA playback from SD card.

pub const SOURCE_INTERNAL_ABSTRACT_GENERATOR: u8[src]

Internal abstract generator.

Trait Implementations

impl Clone for DacStatus[src]

impl Copy for DacStatus[src]

impl Debug for DacStatus[src]

impl Eq for DacStatus[src]

impl Hash for DacStatus[src]

impl PartialEq<DacStatus> for DacStatus[src]

impl ReadFromBytes for DacStatus[src]

impl SizeBytes for DacStatus[src]

impl StructuralEq for DacStatus[src]

impl StructuralPartialEq for DacStatus[src]

impl WriteToBytes for DacStatus[src]

Auto Trait Implementations

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.