pub struct Dac {
pub hw_revision: u16,
pub sw_revision: u16,
pub buffer_capacity: u16,
pub max_point_rate: u32,
pub status: Status,
}Expand description
A simple abstraction around a single Ether Dream DAC.
This type monitors the multiple state machines described within the protocol and provides access to information about the Ether Dream hardware and software implementations.
Fields§
§hw_revision: u16This is undocumented in the official protocol but seems to represent a version number for the hardware in use by the DAC.
sw_revision: u16This is undocumented in the official protocol but seems to represent the version of the
protocol implementation. As of writing this, this is hardcoded as 2 in the original
source.
buffer_capacity: u16The maximum number of points that the DAC may buffer at once.
max_point_rate: u32The maximum rate at which the DAC may process buffered points.
status: StatusA more rust-esque version of the ether_dream::protocol::DacState.
The DAC sends its status with each DacBroadcast and DacResponse.
Implementations§
Source§impl Dac
impl Dac
Sourcepub fn update_status(&mut self, status: &DacStatus) -> Result<(), ProtocolError>
pub fn update_status(&mut self, status: &DacStatus) -> Result<(), ProtocolError>
Update the inner status given a new protocol representation.