#[non_exhaustive]pub enum ConfigError {
Show 21 variants
ZeroBaudRate,
TimingOverflow,
MaxMasterOutOfRange {
value: u8,
},
StationExceedsMaxMaster {
station: u8,
max_master: u8,
},
MaxInfoFramesOutOfRange {
value: u8,
},
FrameAbortOutOfRange {
value: Duration,
minimum: Duration,
maximum: Duration,
},
FrameGapTooLong {
value: Duration,
maximum: Duration,
},
PostdriveTooLong {
value: Duration,
maximum: Duration,
},
ReplyDelayTooLong {
value: Duration,
maximum: Duration,
},
ReplyMarginTooLong {
margin: Duration,
reply_delay: Duration,
},
ReplyTimeoutOutOfRange {
value: Duration,
minimum: Duration,
maximum: Duration,
},
TurnaroundTooShort {
value: Duration,
minimum: Duration,
},
TurnaroundExceedsUsageDelay {
turnaround: Duration,
usage_delay: Duration,
},
UsageDelayTooLong {
value: Duration,
maximum: Duration,
},
UsageTimeoutOutOfRange {
value: Duration,
minimum: Duration,
maximum: Duration,
},
ZeroLocalDuration {
field: LocalDurationField,
},
ZeroLocalLimit {
field: LocalLimitField,
},
MultipleFrameRatioOutOfRange {
value: u8,
},
TransmitWatchdogTooShort {
value: Duration,
minimum: Duration,
},
ExtendedStorageTooSmall {
buffer: CoreBuffer,
length: usize,
minimum: usize,
},
ReceiveStorageTooSmall {
length: usize,
minimum: usize,
},
}Expand description
A configuration value that violates a protocol or local safety bound.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ZeroBaudRate
A baud rate of zero cannot be used to derive bit-time limits.
TimingOverflow
A derived timing calculation overflowed its arithmetic.
MaxMasterOutOfRange
Max_Master is a seven-bit station address.
StationExceedsMaxMaster
This station cannot be beyond Max_Master.
MaxInfoFramesOutOfRange
Max_Info_Frames must be in the inclusive 1..=255 range.
FrameAbortOutOfRange
T_frame_abort is outside the 60-bit-time through 100 ms range.
Fields
FrameGapTooLong
T_frame_gap is longer than 20 bit times.
PostdriveTooLong
T_postdrive is longer than 15 bit times.
ReplyDelayTooLong
T_reply_delay cannot exceed 250 ms.
ReplyMarginTooLong
The reply transmit margin must leave part of T_reply_delay for the application to answer.
ReplyTimeoutOutOfRange
T_reply_timeout must be between 255 and 300 ms.
Fields
TurnaroundTooShort
T_turnaround must cover at least 40 bit times.
TurnaroundExceedsUsageDelay
T_turnaround cannot exceed the maximum T_usage_delay response window.
Fields
UsageDelayTooLong
T_usage_delay cannot exceed 15 ms.
UsageTimeoutOutOfRange
T_usage_timeout must be between 20 and 35 ms.
Fields
ZeroLocalDuration
A local queue age or watchdog of zero would disable the safety bound.
Fields
field: LocalDurationFieldLocal duration setting that was zero.
ZeroLocalLimit
A local scheduling ratio or starvation limit of zero is invalid.
Fields
field: LocalLimitFieldLocal count or ratio setting that was zero.
MultipleFrameRatioOutOfRange
Multiple-frame ratio is a percentage and cannot exceed 100.
TransmitWatchdogTooShort
The transmit watchdog would abort the longest frame this
configuration sends before the driver could go off: a standard frame
of 511 octets takes 1.06 s at 4800 baud, and an extended one of 1516
octets 1.58 s at 9600. See
MstpCoreConfig::minimum_transmit_watchdog; the baud-rate
constructors and MstpCoreConfig::with_extended_frames set one
that clears it.
Fields
minimum: DurationThe shortest watchdog accepted,
MstpCoreConfig::minimum_transmit_watchdog.
ExtendedStorageTooSmall
MstpCoreConfig::extended_frames is on, but a buffer the core was
given can’t hold the largest extended frame or NPDU. Only
MasterCore::new and
MasterCore::from_parts report it,
since only they see the buffers.
Fields
buffer: CoreBufferThe buffer that is too small.
ReceiveStorageTooSmall
The receive storage the core was given can’t hold even the shortest
frame. Only MasterCore::new and
MasterCore::from_parts report it.
Trait Implementations§
Source§impl Clone for ConfigError
impl Clone for ConfigError
impl Copy for ConfigError
Source§impl Debug for ConfigError
impl Debug for ConfigError
Source§impl Display for ConfigError
impl Display for ConfigError
impl Eq for ConfigError
Source§impl Error for ConfigError
impl Error for ConfigError
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
use the Display impl or to_string()