CanIdRange Class¶
Validated construction/checking for 11-bit (Standard) and 29-bit (Extended) CAN IDs (arc42 "Adressierungs-Helfer"; SRS FR-RAW-040).
Inheritance Object → CanIdRange
Remarks¶
Every layer that already masks an ID (CanFrame/CanFrameView,
IsoTpEndpoint) does so silently (id & mask) rather than rejecting an
out-of-range value — appropriate on a hot path, but it means a caller-supplied ID that is
too wide is truncated without any signal. These helpers are the opposite: an explicit,
throwing check for call sites (configuration, protocol-instance setup) where silently
accepting a truncated ID would be the wrong failure mode.
Fields¶
CanIdRange.ExtendedMax Field¶
Largest valid 29-bit extended CAN ID (inclusive).
Field Value¶
CanIdRange.StandardMax Field¶
Largest valid 11-bit standard CAN ID (inclusive).
Field Value¶
Methods¶
CanIdRange.IsValidExtended(uint) Method¶
True when id fits in 29 bits.
Parameters¶
id UInt32
Returns¶
CanIdRange.IsValidStandard(uint) Method¶
True when id fits in 11 bits.
Parameters¶
id UInt32
Returns¶
CanIdRange.ValidateExtended(uint) Method¶
Returns id unchanged if it fits in 29 bits, otherwise throws.
Parameters¶
id UInt32
Returns¶
CanIdRange.ValidateStandard(uint) Method¶
Returns id unchanged if it fits in 11 bits, otherwise throws.
Parameters¶
id UInt32