#[repr(u8)]pub enum ExceptionCode {
IllegalFunction = 1,
IllegalDataAddress = 2,
IllegalDataValue = 3,
ServerDeviceFailure = 4,
}Expand description
Modbus exception codes as defined in the Modbus Application Protocol Specification V1.1b3.
These codes are used in exception responses (function code | 0x80) to indicate the type of error that occurred when processing a request.
Variants§
IllegalFunction = 1
0x01: Illegal Function - The function code is not supported by the server.
IllegalDataAddress = 2
0x02: Illegal Data Address - The addressed register does not exist.
IllegalDataValue = 3
0x03: Illegal Data Value - The quantity of items to read/write is invalid.
ServerDeviceFailure = 4
0x04: Server Device Failure - Unrecoverable device failure.
Trait Implementations§
Source§impl Clone for ExceptionCode
impl Clone for ExceptionCode
Source§fn clone(&self) -> ExceptionCode
fn clone(&self) -> ExceptionCode
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 ExceptionCode
impl Debug for ExceptionCode
Source§impl From<ExceptionCode> for u8
impl From<ExceptionCode> for u8
Source§fn from(code: ExceptionCode) -> Self
fn from(code: ExceptionCode) -> Self
Converts to this type from the input type.
Source§impl PartialEq for ExceptionCode
impl PartialEq for ExceptionCode
impl Copy for ExceptionCode
impl Eq for ExceptionCode
impl StructuralPartialEq for ExceptionCode
Auto Trait Implementations§
impl Freeze for ExceptionCode
impl RefUnwindSafe for ExceptionCode
impl Send for ExceptionCode
impl Sync for ExceptionCode
impl Unpin for ExceptionCode
impl UnsafeUnpin for ExceptionCode
impl UnwindSafe for ExceptionCode
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