#[repr(C)]pub struct DacResponse {
pub response: u8,
pub command: u8,
pub dac_status: DacStatus,
}Expand description
A response from a DAC.
Fields§
§response: u8See the DacResponse associated constants for the possible values for this field.
command: u8In the case of ACK/NAK responses, this echoes back the command to which the response is sent.
Commands are always sent in order, so this field exists for sanity-checking on the host-side.
dac_status: DacStatusThe current status of the DAC.
Implementations§
Source§impl DacResponse
impl DacResponse
Sourcepub const NAK_FULL: u8 = 0x46
pub const NAK_FULL: u8 = 0x46
The write command could not be performed because there was not enough buffer space when it was received.
Sourcepub const NAK_INVALID: u8 = 0x49
pub const NAK_INVALID: u8 = 0x49
The command contained an invalid command byte or parameters.
Sourcepub const NAK_STOP_CONDITION: u8 = 0x21
pub const NAK_STOP_CONDITION: u8 = 0x21
An emergency-stop condition still exists.
Trait Implementations§
Source§impl Clone for DacResponse
impl Clone for DacResponse
Source§fn clone(&self) -> DacResponse
fn clone(&self) -> DacResponse
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DacResponse
impl Debug for DacResponse
Source§impl Hash for DacResponse
impl Hash for DacResponse
Source§impl PartialEq for DacResponse
impl PartialEq for DacResponse
Source§impl ReadFromBytes for DacResponse
impl ReadFromBytes for DacResponse
Source§fn read_from_bytes<R: ReadBytesExt>(reader: R) -> Result<Self>
fn read_from_bytes<R: ReadBytesExt>(reader: R) -> Result<Self>
Read the command from bytes.
Source§impl SizeBytes for DacResponse
impl SizeBytes for DacResponse
const SIZE_BYTES: usize
Source§impl WriteToBytes for DacResponse
impl WriteToBytes for DacResponse
Source§fn write_to_bytes<W: WriteBytesExt>(&self, writer: W) -> Result<()>
fn write_to_bytes<W: WriteBytesExt>(&self, writer: W) -> Result<()>
Write the command to bytes.
impl Copy for DacResponse
impl Eq for DacResponse
impl StructuralPartialEq for DacResponse
Auto Trait Implementations§
impl Freeze for DacResponse
impl RefUnwindSafe for DacResponse
impl Send for DacResponse
impl Sync for DacResponse
impl Unpin for DacResponse
impl UnsafeUnpin for DacResponse
impl UnwindSafe for DacResponse
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more