pub struct ReadDiscreteInputsResponse<'buf> {
pub byte_count: u8,
pub coil_status: &'buf [u8],
}Expand description
Response to a Read Discrete Inputs request (FC 0x02).
Contains bit-packed discrete input status data in LSB-first order.
Fields§
§byte_count: u8Number of data bytes that follow.
coil_status: &'buf [u8]Bit-packed input status, LSB-first within each byte.
Implementations§
Trait Implementations§
Source§impl<'buf> Debug for ReadDiscreteInputsResponse<'buf>
impl<'buf> Debug for ReadDiscreteInputsResponse<'buf>
Source§impl Encode for ReadDiscreteInputsResponse<'_>
impl Encode for ReadDiscreteInputsResponse<'_>
Source§fn encode_into(&self, buf: &mut [u8]) -> Result<usize, EncodeError>
fn encode_into(&self, buf: &mut [u8]) -> Result<usize, EncodeError>
Write the full PDU (function code + data) into
buf. Read moreSource§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Total encoded length in bytes (including the function code byte).
Auto Trait Implementations§
impl<'buf> Freeze for ReadDiscreteInputsResponse<'buf>
impl<'buf> RefUnwindSafe for ReadDiscreteInputsResponse<'buf>
impl<'buf> Send for ReadDiscreteInputsResponse<'buf>
impl<'buf> Sync for ReadDiscreteInputsResponse<'buf>
impl<'buf> Unpin for ReadDiscreteInputsResponse<'buf>
impl<'buf> UnsafeUnpin for ReadDiscreteInputsResponse<'buf>
impl<'buf> UnwindSafe for ReadDiscreteInputsResponse<'buf>
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