#[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,
}Expand description
Periodically, and as part of ACK packets, the DAC sends its current playback status to the host.
Fields§
§protocol: u8This remains undocumented in the protocol.
The original implementation source simply sets this to 0.
light_engine_state: u8The current state of the “light engine” state machine.
playback_state: u8The current state of the “playback” state machine.
source: u8The 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: u16If 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: u16These flags may be non-zero during normal operation.
Bits are defined as follows:
0: Shutter state.0is closed,1is open.1: Underflow.1if the last stream ended with underflow rather than aStopcommand. This is reset to0by thePreparecommand.2: E-Stop.1if the last stream ended because the E-Stop state was entered. Reset to zero by thePreparecommand.
source_flags: u16This 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: u16The number of points currently buffered.
point_rate: u32If 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: u32If 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.
Implementations§
Source§impl DacStatus
impl DacStatus
Sourcepub const LIGHT_ENGINE_READY: u8 = 0u8
pub const LIGHT_ENGINE_READY: u8 = 0u8
The light engine is ready.
Sourcepub const LIGHT_ENGINE_WARMUP: u8 = 1u8
pub const LIGHT_ENGINE_WARMUP: u8 = 1u8
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.
Sourcepub const LIGHT_ENGINE_COOLDOWN: u8 = 2u8
pub const LIGHT_ENGINE_COOLDOWN: u8 = 2u8
Lasers are off but thermal control is still active.
Sourcepub const LIGHT_ENGINE_EMERGENCY_STOP: u8 = 3u8
pub const LIGHT_ENGINE_EMERGENCY_STOP: u8 = 3u8
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.
Sourcepub const PLAYBACK_IDLE: u8 = 0u8
pub const PLAYBACK_IDLE: u8 = 0u8
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.
Sourcepub const PLAYBACK_PREPARED: u8 = 1u8
pub const PLAYBACK_PREPARED: u8 = 1u8
The buffer will accept points.
The output is the same as the Idle state
Sourcepub const PLAYBACK_PLAYING: u8 = 2u8
pub const PLAYBACK_PLAYING: u8 = 2u8
Points are being sent to the output.
Sourcepub const SOURCE_NETWORK_STREAMING: u8 = 0u8
pub const SOURCE_NETWORK_STREAMING: u8 = 0u8
Network streaming (the protocol implemented in this library).
Sourcepub const SOURCE_ILDA_PLAYBACK_SD: u8 = 1u8
pub const SOURCE_ILDA_PLAYBACK_SD: u8 = 1u8
ILDA playback from SD card.
Sourcepub const SOURCE_INTERNAL_ABSTRACT_GENERATOR: u8 = 2u8
pub const SOURCE_INTERNAL_ABSTRACT_GENERATOR: u8 = 2u8
Internal abstract generator.