Enum rodbus::ExceptionCode
source · pub enum ExceptionCode {
IllegalFunction,
IllegalDataAddress,
IllegalDataValue,
ServerDeviceFailure,
Acknowledge,
ServerDeviceBusy,
MemoryParityError,
GatewayPathUnavailable,
GatewayTargetDeviceFailedToRespond,
Unknown(u8),
}Expand description
Exception codes defined in the Modbus specification
Variants§
IllegalFunction
The function code received in the query is not an allowable action for the server
IllegalDataAddress
The data address received in the query is not an allowable address for the server
IllegalDataValue
A value contained in the request is not an allowable value for server
ServerDeviceFailure
An unrecoverable error occurred while the server was attempting to perform the requested action
Acknowledge
Specialized use in conjunction with programming commands
The server has accepted the request and is processing it
ServerDeviceBusy
Specialized use in conjunction with programming commands
The server is engaged in processing a long–duration program command, try again later
MemoryParityError
Specialized use in conjunction with function codes 20 and 21 and reference type 6, to indicate that the extended file area failed to pass a consistency check.
The server attempted to read a record file, but detected a parity error in the memory
Specialized use in conjunction with gateways.
Indicates that the gateway was unable to allocate an internal communication path from the input port to the output port for processing the request. Usually means that the gateway is mis-configured or overloaded
GatewayTargetDeviceFailedToRespond
Specialized use in conjunction with gateways.
Indicates that no response was obtained from the target device. Usually means that the device is not present on the network.
Unknown(u8)
The exception code received is not defined in the standard
Trait Implementations§
source§impl Clone for ExceptionCode
impl Clone for ExceptionCode
source§fn clone(&self) -> ExceptionCode
fn clone(&self) -> ExceptionCode
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for ExceptionCode
impl Debug for ExceptionCode
source§impl Display for ExceptionCode
impl Display for ExceptionCode
source§impl Error for ExceptionCode
impl Error for ExceptionCode
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
source§impl From<ExceptionCode> for RequestError
impl From<ExceptionCode> for RequestError
source§fn from(err: ExceptionCode) -> Self
fn from(err: ExceptionCode) -> Self
source§impl From<ExceptionCode> for u8
impl From<ExceptionCode> for u8
source§fn from(ex: ExceptionCode) -> Self
fn from(ex: ExceptionCode) -> Self
source§impl From<u8> for ExceptionCode
impl From<u8> for ExceptionCode
source§impl Ord for ExceptionCode
impl Ord for ExceptionCode
source§fn cmp(&self, other: &ExceptionCode) -> Ordering
fn cmp(&self, other: &ExceptionCode) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq<ExceptionCode> for ExceptionCode
impl PartialEq<ExceptionCode> for ExceptionCode
source§fn eq(&self, other: &ExceptionCode) -> bool
fn eq(&self, other: &ExceptionCode) -> bool
self and other values to be equal, and is used
by ==.source§impl PartialOrd<ExceptionCode> for ExceptionCode
impl PartialOrd<ExceptionCode> for ExceptionCode
source§fn partial_cmp(&self, other: &ExceptionCode) -> Option<Ordering>
fn partial_cmp(&self, other: &ExceptionCode) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self and other) and is used by the <=
operator. Read more