#[repr(C, packed)]pub struct Error {
pub value: u8,
}
Expand description
reg.udral.service.battery.Error.0.1
Fixed size 1 bytes
Generic error codes reported by the service provider. An error is reported when the corresponding parameter exceeds its safe operating area (SOA) as defined by the vendor; see https://en.wikipedia.org/wiki/Safe_operating_area. As long as an error condition is present, the service health should not be NOMINAL.
If there are multiple error conditions present, the most severe one should be reported. The severity ordering is implementation-defined. Barring special requirements, it is recommended to give preference to errors whose code is smaller (e.g., BAD_BATTERY trumps TEMPERATURE_COLD).
Fields§
§value: u8
saturated uint8
Always aligned, size 8 bits
Implementations§
source§impl Error
impl Error
sourcepub const BAD_BATTERY: u8 = 10u8
pub const BAD_BATTERY: u8 = 10u8
The battery should not be used anymore. Detection criteria are implementation-defined.
sourcepub const NEEDS_SERVICE: u8 = 11u8
pub const NEEDS_SERVICE: u8 = 11u8
The battery requires offline maintenance.
sourcepub const BMS_ERROR: u8 = 20u8
pub const BMS_ERROR: u8 = 20u8
An internal error in the battery management system, not related to the battery itself.
sourcepub const CONFIGURATION: u8 = 30u8
pub const CONFIGURATION: u8 = 30u8
The battery/BMS/node/service configuration is missing or invalid.
sourcepub const OVERDISCHARGE: u8 = 50u8
pub const OVERDISCHARGE: u8 = 50u8
The battery is discharged beyond the design limits and may have incurred damage.
pub const CELL_OVERVOLTAGE: u8 = 60u8
sourcepub const CELL_UNDERVOLTAGE: u8 = 61u8
pub const CELL_UNDERVOLTAGE: u8 = 61u8
Voltage of one of the battery cells exceeds its SOA.
sourcepub const CELL_COUNT: u8 = 62u8
pub const CELL_COUNT: u8 = 62u8
The sum of cell voltages is far from the total pack voltage. The threshold is implementation-defined.
pub const TEMPERATURE_HOT: u8 = 100u8
sourcepub const TEMPERATURE_COLD: u8 = 101u8
pub const TEMPERATURE_COLD: u8 = 101u8
At least one cell is above/below the temperature SOA.
Trait Implementations§
source§impl AsBytes for Errorwhere
u8: AsBytes,
impl AsBytes for Errorwhere u8: AsBytes,
source§fn as_bytes_mut(&mut self) -> &mut [u8]where
Self: FromBytes,
fn as_bytes_mut(&mut self) -> &mut [u8]where Self: FromBytes,
source§fn write_to_prefix<B>(&self, bytes: B) -> Option<()>where
B: ByteSliceMut,
fn write_to_prefix<B>(&self, bytes: B) -> Option<()>where B: ByteSliceMut,
source§fn write_to_suffix<B>(&self, bytes: B) -> Option<()>where
B: ByteSliceMut,
fn write_to_suffix<B>(&self, bytes: B) -> Option<()>where B: ByteSliceMut,
source§impl Deserialize for Error
impl Deserialize for Error
source§fn deserialize(cursor: &mut ReadCursor<'_>) -> Result<Self, DeserializeError>where
Self: Sized,
fn deserialize(cursor: &mut ReadCursor<'_>) -> Result<Self, DeserializeError>where Self: Sized,
source§fn deserialize_zero_copy(cursor: &mut ReadCursor<'_>) -> Selfwhere
Self: Sized + AsBytes + FromBytes,
fn deserialize_zero_copy(cursor: &mut ReadCursor<'_>) -> Selfwhere Self: Sized + AsBytes + FromBytes,
source§fn deserialize_from_bytes(bytes: &[u8]) -> Result<Self, DeserializeError>where
Self: Sized,
fn deserialize_from_bytes(bytes: &[u8]) -> Result<Self, DeserializeError>where Self: Sized,
deserialize
source§impl FromBytes for Errorwhere
u8: FromBytes,
impl FromBytes for Errorwhere u8: FromBytes,
source§fn new_zeroed() -> Selfwhere
Self: Sized,
fn new_zeroed() -> Selfwhere Self: Sized,
Self
from zeroed bytes.source§impl Serialize for Error
impl Serialize for Error
source§fn size_bits(&self) -> usize
fn size_bits(&self) -> usize
source§fn serialize(&self, cursor: &mut WriteCursor<'_>)
fn serialize(&self, cursor: &mut WriteCursor<'_>)
source§fn serialize_to_bytes(&self, bytes: &mut [u8])
fn serialize_to_bytes(&self, bytes: &mut [u8])
serialize