pub struct Parameters {
Show 17 fields pub unique_id: u64, pub mass: Scalar, pub design_capacity: Scalar, pub design_cell_voltage_min_max: [Scalar; 2], pub discharge_current: Scalar, pub discharge_current_burst: Scalar, pub charge_current: Scalar, pub charge_current_fast: Scalar, pub charge_termination_threshold: Scalar, pub charge_voltage: Scalar, pub cycle_count: u16, pub series_cell_count: u8, pub state_of_health_pct: u8, pub technology: Technology, pub nominal_voltage: Scalar, pub unix_manufacture_time: u64, pub name: Vec<u8, 64>,
}
Expand description

reg.udral.service.battery.Parameters.0.3

Size ranges from 64 to 128 bytes

Smart battery parameter message. It is mostly intended for automated battery charging and maintenance systems. This message is modeled after the Smart Battery Data Specification (SBS) and the MAVLink battery status messages.

The values carried by this message are either constant or slow-changing, so, generally, the publishing frequency should not be higher than 0.2 Hz, and the priority should be either OPTIONAL or SLOW.

All parameters are required unless specifically stated otherwise. For non-rechargeable batteries all “charge_*” parameters should be NaN.

Fields§

§unique_id: u64

A statistically unique number that can be used to identify this exact battery for logging and diagnostic purposes. This value should be invariant to the identity of the reporting node unless it is an integral part of the battery. If the battery supports SBS, the recommended way to populate this field is from two CRC-32C (Castagnoli) values as:

  • 32 most significant bits identify the vendor as: CRC32C(ManufacturerName)
  • 32 least significant bits identify the battery as: CRC32C(DeviceName + ManufactureDate + SerialNumber) If the battery does not support SBS, the vendor may choose arbitrary random numbers. Note that these are mere recommendations. The only hard requirement for this field is to be statistically unique.

truncated uint64

Always aligned, size 64 bits

§mass: Scalar

The total mass of the battery, including the packaging, electronics, cabling, and all auxiliary items, if any. May be used for predicting the kinematic parameters of the vehicle. NaN if unknown.

uavcan.si.unit.mass.Scalar.1.0

Always aligned, size 32 bits

§design_capacity: Scalar

The maximum total charge of the pack, at 100% SoH, specified by the manufacturer.

uavcan.si.unit.electric_charge.Scalar.1.0

Always aligned, size 32 bits

§design_cell_voltage_min_max: [Scalar; 2]

The minimum (end of discharge) and the maximum (end of charge) resting cell voltage specified by the manufacturer at 100% SoH. Example: {2.8, 4.2} V. These voltages correspond to resting voltages; i.e., the stabilized voltages after the discharge/charge has been terminated. Voltage below the min may be observed during discharge due to the cell’s internal resistance. Voltage above the max voltage may be observed during regenerative braking/charging etc due to the cell’s internal resistance.

uavcan.si.unit.voltage.Scalar.1.0[2]

Always aligned, size 64 bits

§discharge_current: Scalar

Recommended continuous discharge current of the battery.

uavcan.si.unit.electric_current.Scalar.1.0

Always aligned, size 32 bits

§discharge_current_burst: Scalar

Maximum current that may be safely discharged at least for 5 seconds.

uavcan.si.unit.electric_current.Scalar.1.0

Always aligned, size 32 bits

§charge_current: Scalar

Recommended continuous charge current of the battery.

uavcan.si.unit.electric_current.Scalar.1.0

Always aligned, size 32 bits

§charge_current_fast: Scalar

Recommended safest highest continuous charge current for the battery. This may cause accelerated aging of the battery.

uavcan.si.unit.electric_current.Scalar.1.0

Always aligned, size 32 bits

§charge_termination_threshold: Scalar

End-of-charging current threshold. Charging may be terminated when the current falls below this threshold.

uavcan.si.unit.electric_current.Scalar.1.0

Always aligned, size 32 bits

§charge_voltage: Scalar

The total voltage (not per-cell) that may be used by the charger to charge the battery pack.

uavcan.si.unit.voltage.Scalar.1.0

Always aligned, size 32 bits

§cycle_count: u16

The number of charge-discharge cycles. Zero if the battery is new. May increase at runtime. What constitutes a charge-discharge cycle is implementation-defined.

saturated uint16

Always aligned, size 16 bits

§series_cell_count: u8

The number of cells connected in series. This value should match the array of cell voltages reported via Status.

saturated uint8

Always aligned, size 8 bits

§state_of_health_pct: u8

[percent] The SoH of the battery, or best guess thereof; ranges from 0 (unusable) to 100 (new).

saturated uint7

Always aligned, size 7 bits

§technology: Technology

The battery technology information may be leveraged by the charger to choose the appropriate charging strategy.

reg.udral.service.battery.Technology.0.1

Always aligned, size 8 bits

§nominal_voltage: Scalar

The nominal voltage of the battery pack (not per-cell) as defined by the vendor. E.g., a typical 22S LiCoO2 pack would usually report 81.4 V here.

uavcan.si.unit.voltage.Scalar.1.0

Always aligned, size 32 bits

§unix_manufacture_time: u64

The approximate UNIX Epoch time when the battery was manufactured, zero if unknown.

truncated uint40

Always aligned, size 40 bits

§name: Vec<u8, 64>

An arbitrary human-readable textual description of this battery. Empty if unknown/unused. Batteries that support SBS are recommended to report the manufacturer name and the device name here.

saturated uint8[<=64]

Always aligned, size ranges from 0 to 512 bits

Trait Implementations§

source§

impl DataType for Parameters

source§

const EXTENT_BYTES: Option<u32> = _

This type is delimited with an extent of 300 bytes.

source§

impl Deserialize for Parameters

source§

fn deserialize(cursor: &mut ReadCursor<'_>) -> Result<Self, DeserializeError>where Self: Sized,

Deserializes a value and returns it
source§

fn deserialize_from_bytes(bytes: &[u8]) -> Result<Self, DeserializeError>where Self: Sized,

A convenience function that creates a cursor around the provided bytes and calls deserialize
source§

impl Serialize for Parameters

source§

fn size_bits(&self) -> usize

Returns the size of the encoded form of this value, in bits Read more
source§

fn serialize(&self, cursor: &mut WriteCursor<'_>)

Serializes this value into a buffer Read more
source§

fn serialize_to_bytes(&self, bytes: &mut [u8])

A convenience function that creates a cursor around the provided bytes and calls serialize
source§

impl Message for Parameters

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.