Skip to main content

ResponsePdu

Enum ResponsePdu 

Source
pub enum ResponsePdu<'buf> {
Show 21 variants ReadCoils(ReadCoilsResponse<'buf>), ReadDiscreteInputs(ReadDiscreteInputsResponse<'buf>), ReadHoldingRegisters(ReadHoldingRegistersResponse<'buf>), ReadInputRegisters(ReadInputRegistersResponse<'buf>), WriteSingleCoil(WriteSingleCoilResponse), WriteSingleRegister(WriteSingleRegisterResponse), ReadExceptionStatus(ReadExceptionStatusResponse), Diagnostics(DiagnosticsResponse<'buf>), GetCommEventCounter(GetCommEventCounterResponse), GetCommEventLog(GetCommEventLogResponse<'buf>), WriteMultipleCoils(WriteMultipleCoilsResponse), WriteMultipleRegisters(WriteMultipleRegistersResponse), ReportServerId(ReportServerIdResponse<'buf>), ReadFileRecord(ReadFileRecordResponse<'buf>), WriteFileRecord(WriteFileRecordResponse<'buf>), MaskWriteRegister(MaskWriteRegisterResponse), ReadWriteMultipleRegisters(ReadWriteMultipleRegistersResponse<'buf>), ReadFifoQueue(ReadFifoQueueResponse<'buf>), EncapsulatedInterface(EncapsulatedInterfaceResponse<'buf>), Custom(u8, &'buf [u8]), Exception(ExceptionResponse),
}
Expand description

Fully dispatched response PDU. Each variant borrows from the source buffer.

Variants§

§

ReadCoils(ReadCoilsResponse<'buf>)

FC 0x01 — Read Coils.

§

ReadDiscreteInputs(ReadDiscreteInputsResponse<'buf>)

FC 0x02 — Read Discrete Inputs.

§

ReadHoldingRegisters(ReadHoldingRegistersResponse<'buf>)

FC 0x03 — Read Holding Registers.

§

ReadInputRegisters(ReadInputRegistersResponse<'buf>)

FC 0x04 — Read Input Registers.

§

WriteSingleCoil(WriteSingleCoilResponse)

FC 0x05 — Write Single Coil.

§

WriteSingleRegister(WriteSingleRegisterResponse)

FC 0x06 — Write Single Register.

§

ReadExceptionStatus(ReadExceptionStatusResponse)

FC 0x07 — Read Exception Status.

§

Diagnostics(DiagnosticsResponse<'buf>)

FC 0x08 — Diagnostics.

§

GetCommEventCounter(GetCommEventCounterResponse)

FC 0x0B — Get Comm Event Counter.

§

GetCommEventLog(GetCommEventLogResponse<'buf>)

FC 0x0C — Get Comm Event Log.

§

WriteMultipleCoils(WriteMultipleCoilsResponse)

FC 0x0F — Write Multiple Coils.

§

WriteMultipleRegisters(WriteMultipleRegistersResponse)

FC 0x10 — Write Multiple Registers.

§

ReportServerId(ReportServerIdResponse<'buf>)

FC 0x11 — Report Server ID.

§

ReadFileRecord(ReadFileRecordResponse<'buf>)

FC 0x14 — Read File Record.

§

WriteFileRecord(WriteFileRecordResponse<'buf>)

FC 0x15 — Write File Record.

§

MaskWriteRegister(MaskWriteRegisterResponse)

FC 0x16 — Mask Write Register.

§

ReadWriteMultipleRegisters(ReadWriteMultipleRegistersResponse<'buf>)

FC 0x17 — Read/Write Multiple Registers.

§

ReadFifoQueue(ReadFifoQueueResponse<'buf>)

FC 0x18 — Read FIFO Queue.

§

EncapsulatedInterface(EncapsulatedInterfaceResponse<'buf>)

FC 0x2B — Encapsulated Interface Transport.

§

Custom(u8, &'buf [u8])

Non-standard / vendor-specific response.

§

Exception(ExceptionResponse)

Exception response.

Trait Implementations§

Source§

impl<'buf> Debug for ResponsePdu<'buf>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'buf> Freeze for ResponsePdu<'buf>

§

impl<'buf> RefUnwindSafe for ResponsePdu<'buf>

§

impl<'buf> Send for ResponsePdu<'buf>

§

impl<'buf> Sync for ResponsePdu<'buf>

§

impl<'buf> Unpin for ResponsePdu<'buf>

§

impl<'buf> UnsafeUnpin for ResponsePdu<'buf>

§

impl<'buf> UnwindSafe for ResponsePdu<'buf>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.