pub enum KnxError {
Show 50 variants
InvalidGroupAddress(String),
InvalidIndividualAddress(String),
AddressOutOfRange {
address: String,
valid_range: String,
},
InvalidDpt(String),
DptEncoding {
dpt: String,
reason: String,
},
DptDecoding {
dpt: String,
reason: String,
},
DptValueOutOfRange {
value: String,
valid_range: String,
},
FrameTooShort {
expected: usize,
actual: usize,
},
InvalidHeader(String),
InvalidProtocolVersion {
expected: u8,
actual: u8,
},
UnknownServiceType(u16),
FrameLengthMismatch {
header_length: usize,
actual_length: usize,
},
InvalidHpai(String),
UnknownMessageCode(u8),
InvalidCemi(String),
UnknownApci(u16),
ConnectionFailed {
address: SocketAddr,
reason: String,
},
ConnectionTimeout {
timeout_ms: u64,
},
ConnectionClosed(String),
NoMoreConnections {
max: usize,
},
InvalidChannel(u8),
SequenceError {
expected: u8,
actual: u8,
},
DuplicateFrame {
sequence: u8,
expected: u8,
},
OutOfOrderFrame {
sequence: u8,
expected: u8,
distance: u8,
},
FatalDesync {
sequence: u8,
expected: u8,
distance: u8,
},
SendErrorThresholdExceeded {
consecutive_errors: u32,
threshold: u32,
},
TunnelError(String),
TunnelTimeout {
channel_id: u8,
},
TunnelAckError {
status: u8,
},
AckTimeout {
channel_id: u8,
sequence: u8,
attempts: u8,
},
ConfirmationNack {
channel_id: u8,
},
ConfirmationTimeout {
channel_id: u8,
sequence: u8,
},
InvalidStateTransition {
from: String,
to: String,
},
ChannelMismatch {
expected: u8,
actual: u8,
},
FlowControlDrop {
reason: String,
},
FlowControlQueued {
channel_id: u8,
},
CircuitBreakerOpen {
consecutive_failures: u32,
threshold: u32,
},
PaceFilterDelayExceeded {
delay_ms: u64,
max_delay_ms: u64,
},
GroupObjectNotFound(String),
GroupObjectWriteNotAllowed(String),
GroupObjectReadNotAllowed(String),
Server(String),
ServerNotRunning,
ServerAlreadyRunning,
BindError {
address: SocketAddr,
reason: String,
},
Config(String),
InvalidConfigValue {
field: String,
reason: String,
},
Io(Error),
Core(Error),
Internal(String),
}Expand description
KNX error types.
Variants§
InvalidGroupAddress(String)
Invalid group address format.
InvalidIndividualAddress(String)
Invalid individual address format.
AddressOutOfRange
Address out of range.
InvalidDpt(String)
Invalid datapoint type.
DptEncoding
DPT encoding error.
DptDecoding
DPT decoding error.
DptValueOutOfRange
DPT value out of range.
FrameTooShort
Frame too short.
InvalidHeader(String)
Invalid frame header.
InvalidProtocolVersion
Invalid protocol version.
UnknownServiceType(u16)
Unknown service type.
FrameLengthMismatch
Frame length mismatch.
InvalidHpai(String)
Invalid HPAI (Host Protocol Address Information).
UnknownMessageCode(u8)
Unknown cEMI message code.
InvalidCemi(String)
Invalid cEMI frame.
UnknownApci(u16)
Unknown APCI.
ConnectionFailed
Connection failed.
ConnectionTimeout
Connection timeout.
ConnectionClosed(String)
Connection closed.
NoMoreConnections
No more connections available.
InvalidChannel(u8)
Invalid channel ID.
SequenceError
Sequence error.
DuplicateFrame
Duplicate frame detected.
OutOfOrderFrame
Out-of-order frame detected.
FatalDesync
Fatal sequence desync (knxd: seqno >= rno + 5).
SendErrorThresholdExceeded
Send error threshold exceeded.
TunnelError(String)
Tunnel connection error.
TunnelTimeout
Tunnel request timeout.
TunnelAckError
Tunnel ACK error.
AckTimeout
Tunnel ACK timeout after retries.
ConfirmationNack
L_Data.con confirmation failure (Ctrl1 bit 0 = 1).
ConfirmationTimeout
L_Data.con confirmation timeout.
InvalidStateTransition
Tunnel state transition error.
ChannelMismatch
Channel ID mismatch.
FlowControlDrop
Frame dropped by flow control filter.
FlowControlQueued
Frame queued by flow control (not an error, informational).
CircuitBreakerOpen
Circuit breaker is open, dropping frames.
PaceFilterDelayExceeded
PaceFilter delay exceeded maximum allowed.
GroupObjectNotFound(String)
Group object not found.
GroupObjectWriteNotAllowed(String)
Group object write not allowed.
GroupObjectReadNotAllowed(String)
Group object read not allowed.
Server(String)
Server error.
ServerNotRunning
Server not running.
ServerAlreadyRunning
Server already running.
BindError
Bind error.
Config(String)
Configuration error.
InvalidConfigValue
Invalid configuration value.
Io(Error)
I/O error.
Core(Error)
Core error.
Internal(String)
Internal error.
Implementations§
Source§impl KnxError
impl KnxError
Sourcepub fn frame_too_short(expected: usize, actual: usize) -> Self
pub fn frame_too_short(expected: usize, actual: usize) -> Self
Create a frame too short error.
Sourcepub fn connection_failed(address: SocketAddr, reason: impl Into<String>) -> Self
pub fn connection_failed(address: SocketAddr, reason: impl Into<String>) -> Self
Create a connection failed error.
Sourcepub fn dpt_encoding(dpt: impl Into<String>, reason: impl Into<String>) -> Self
pub fn dpt_encoding(dpt: impl Into<String>, reason: impl Into<String>) -> Self
Create a DPT encoding error.
Sourcepub fn dpt_decoding(dpt: impl Into<String>, reason: impl Into<String>) -> Self
pub fn dpt_decoding(dpt: impl Into<String>, reason: impl Into<String>) -> Self
Create a DPT decoding error.
Sourcepub fn sequence_error(expected: u8, actual: u8) -> Self
pub fn sequence_error(expected: u8, actual: u8) -> Self
Create a sequence error.
Sourcepub fn is_recoverable(&self) -> bool
pub fn is_recoverable(&self) -> bool
Check if this is a recoverable error.
Sourcepub fn is_flow_control_error(&self) -> bool
pub fn is_flow_control_error(&self) -> bool
Check if this is a flow control related error.
Sourcepub fn requires_tunnel_restart(&self) -> bool
pub fn requires_tunnel_restart(&self) -> bool
Check if this requires tunnel restart.
Sourcepub fn is_protocol_error(&self) -> bool
pub fn is_protocol_error(&self) -> bool
Check if this is a protocol error.
Sourcepub fn is_config_error(&self) -> bool
pub fn is_config_error(&self) -> bool
Check if this is a configuration error.