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,
}Expand description
A more rust-esque version of the ether_dream::protocol::DacState.
The DAC sends its status with each DacBroadcast and DacResponse.
Fields§
§protocol: u8This remains undocumented in the protocol.
The original implementation source simply sets this to 0.
light_engine: LightEngineThe current state of the DAC’s “light engine” state machine.
playback: PlaybackThe current state of the DAC’s “playback” state machine.
data_source: DataSourceThe currently-selected data source.
light_engine_flags: LightEngineFlagsIf the light engine is Ready no flags will be set.
playback_flags: PlaybackFlagsThese flags may be non-zero during normal operation.
buffer_fullness: u16The number of points currently buffered within the DAC.
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 Status
impl Status
Sourcepub fn from_protocol(status: &DacStatus) -> Result<Self, ProtocolError>
pub fn from_protocol(status: &DacStatus) -> Result<Self, ProtocolError>
Create a Status from the lower-level protocol representation.
Sourcepub fn update(&mut self, status: &DacStatus) -> Result<(), ProtocolError>
pub fn update(&mut self, status: &DacStatus) -> Result<(), ProtocolError>
Update the Status from the lower-level protocol representation.
Sourcepub fn to_protocol(&self) -> DacStatus
pub fn to_protocol(&self) -> DacStatus
Convert the Status to its lower-level protocol representation.