#[repr(u8)]pub enum Exception {
Undefined(u8),
IllegalFunction = 1,
IllegalDataAddress = 2,
IllegalDataValue = 3,
DeviceFailure = 4,
Acknowledge = 5,
DeviceBusy = 6,
MemoryParityError = 8,
GatewayPathUnavailable = 10,
GatewayTargetDeviceFailedToRespond = 11,
}Variants§
Undefined(u8)
An undefined exception code not covered by this crate.
IllegalFunction = 1
The function code received is not supported by the device or is invalid in the current state.
IllegalDataAddress = 2
The requested address range is invalid for the device.
IllegalDataValue = 3
A value in the request is not valid or does not match the expected structure.
DeviceFailure = 4
An unrecoverable device error occurred during processing.
Acknowledge = 5
The request was accepted but requires a long time to complete. Prevents master timeout.
DeviceBusy = 6
The device is busy processing a long-duration command. Try again later.
MemoryParityError = 8
Memory parity error.
The gateway could not establish a communication path. Check configuration or load.
GatewayTargetDeviceFailedToRespond = 11
The gateway received no response from the target device.
Implementations§
Source§impl Exception
impl Exception
Sourcepub fn is_ack(&self) -> bool
pub fn is_ack(&self) -> bool
Returns true if the exception is Exception::Acknowledge.
§Returns
true if the exception is Exception::Acknowledge, otherwise false.