[−][src]Struct ether_dream::protocol::DacStatus
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 aStop
command. This is reset to0
by thePrepare
command.2
: E-Stop.1
if the last stream ended because the E-Stop state was entered. Reset to zero by thePrepare
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]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<DacStatus> for DacStatus
[src]
impl ReadFromBytes for DacStatus
[src]
fn read_from_bytes<R: ReadBytesExt>(reader: R) -> Result<Self>
[src]
impl SizeBytes for DacStatus
[src]
const SIZE_BYTES: usize
[src]
impl StructuralEq for DacStatus
[src]
impl StructuralPartialEq for DacStatus
[src]
impl WriteToBytes for DacStatus
[src]
fn write_to_bytes<W: WriteBytesExt>(&self, writer: W) -> Result<()>
[src]
Auto Trait Implementations
impl RefUnwindSafe for DacStatus
impl Send for DacStatus
impl Sync for DacStatus
impl Unpin for DacStatus
impl UnwindSafe for DacStatus
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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
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>,