Struct r2r::sensor_msgs::msg::BatteryState
source · pub struct BatteryState {Show 16 fields
pub header: Header,
pub voltage: f32,
pub temperature: f32,
pub current: f32,
pub charge: f32,
pub capacity: f32,
pub design_capacity: f32,
pub percentage: f32,
pub power_supply_status: u8,
pub power_supply_health: u8,
pub power_supply_technology: u8,
pub present: bool,
pub cell_voltage: Vec<f32>,
pub cell_temperature: Vec<f32>,
pub location: String,
pub serial_number: String,
}
Fields§
§header: Header
§voltage: f32
§temperature: f32
§current: f32
§charge: f32
§capacity: f32
§design_capacity: f32
§percentage: f32
§power_supply_status: u8
§power_supply_health: u8
§power_supply_technology: u8
§present: bool
§cell_voltage: Vec<f32>
§cell_temperature: Vec<f32>
§location: String
§serial_number: String
Implementations§
source§impl BatteryState
impl BatteryState
pub const POWER_SUPPLY_HEALTH_COLD: _bindgen_ty_130 = sensor_msgs__msg__BatteryState__POWER_SUPPLY_HEALTH_COLD
pub const POWER_SUPPLY_HEALTH_DEAD: _bindgen_ty_127 = sensor_msgs__msg__BatteryState__POWER_SUPPLY_HEALTH_DEAD
pub const POWER_SUPPLY_HEALTH_GOOD: _bindgen_ty_125 = sensor_msgs__msg__BatteryState__POWER_SUPPLY_HEALTH_GOOD
pub const POWER_SUPPLY_HEALTH_OVERHEAT: _bindgen_ty_126 = sensor_msgs__msg__BatteryState__POWER_SUPPLY_HEALTH_OVERHEAT
pub const POWER_SUPPLY_HEALTH_OVERVOLTAGE: _bindgen_ty_128 = sensor_msgs__msg__BatteryState__POWER_SUPPLY_HEALTH_OVERVOLTAGE
pub const POWER_SUPPLY_HEALTH_SAFETY_TIMER_EXPIRE: _bindgen_ty_132 = sensor_msgs__msg__BatteryState__POWER_SUPPLY_HEALTH_SAFETY_TIMER_EXPIRE
pub const POWER_SUPPLY_HEALTH_UNKNOWN: _bindgen_ty_124 = sensor_msgs__msg__BatteryState__POWER_SUPPLY_HEALTH_UNKNOWN
pub const POWER_SUPPLY_HEALTH_UNSPEC_FAILURE: _bindgen_ty_129 = sensor_msgs__msg__BatteryState__POWER_SUPPLY_HEALTH_UNSPEC_FAILURE
pub const POWER_SUPPLY_HEALTH_WATCHDOG_TIMER_EXPIRE: _bindgen_ty_131 = sensor_msgs__msg__BatteryState__POWER_SUPPLY_HEALTH_WATCHDOG_TIMER_EXPIRE
pub const POWER_SUPPLY_STATUS_CHARGING: _bindgen_ty_120 = sensor_msgs__msg__BatteryState__POWER_SUPPLY_STATUS_CHARGING
pub const POWER_SUPPLY_STATUS_DISCHARGING: _bindgen_ty_121 = sensor_msgs__msg__BatteryState__POWER_SUPPLY_STATUS_DISCHARGING
pub const POWER_SUPPLY_STATUS_FULL: _bindgen_ty_123 = sensor_msgs__msg__BatteryState__POWER_SUPPLY_STATUS_FULL
pub const POWER_SUPPLY_STATUS_NOT_CHARGING: _bindgen_ty_122 = sensor_msgs__msg__BatteryState__POWER_SUPPLY_STATUS_NOT_CHARGING
pub const POWER_SUPPLY_STATUS_UNKNOWN: _bindgen_ty_119 = sensor_msgs__msg__BatteryState__POWER_SUPPLY_STATUS_UNKNOWN
pub const POWER_SUPPLY_TECHNOLOGY_LIFE: _bindgen_ty_137 = sensor_msgs__msg__BatteryState__POWER_SUPPLY_TECHNOLOGY_LIFE
pub const POWER_SUPPLY_TECHNOLOGY_LIMN: _bindgen_ty_139 = sensor_msgs__msg__BatteryState__POWER_SUPPLY_TECHNOLOGY_LIMN
pub const POWER_SUPPLY_TECHNOLOGY_LION: _bindgen_ty_135 = sensor_msgs__msg__BatteryState__POWER_SUPPLY_TECHNOLOGY_LION
pub const POWER_SUPPLY_TECHNOLOGY_LIPO: _bindgen_ty_136 = sensor_msgs__msg__BatteryState__POWER_SUPPLY_TECHNOLOGY_LIPO
pub const POWER_SUPPLY_TECHNOLOGY_NICD: _bindgen_ty_138 = sensor_msgs__msg__BatteryState__POWER_SUPPLY_TECHNOLOGY_NICD
pub const POWER_SUPPLY_TECHNOLOGY_NIMH: _bindgen_ty_134 = sensor_msgs__msg__BatteryState__POWER_SUPPLY_TECHNOLOGY_NIMH
pub const POWER_SUPPLY_TECHNOLOGY_UNKNOWN: _bindgen_ty_133 = sensor_msgs__msg__BatteryState__POWER_SUPPLY_TECHNOLOGY_UNKNOWN
Trait Implementations§
source§impl Clone for BatteryState
impl Clone for BatteryState
source§fn clone(&self) -> BatteryState
fn clone(&self) -> BatteryState
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for BatteryState
impl Debug for BatteryState
source§impl Default for BatteryState
impl Default for BatteryState
source§impl<'de> Deserialize<'de> for BatteryStatewhere
BatteryState: Default,
impl<'de> Deserialize<'de> for BatteryStatewhere
BatteryState: Default,
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for BatteryState
impl PartialEq for BatteryState
source§impl Serialize for BatteryState
impl Serialize for BatteryState
source§impl WrappedTypesupport for BatteryState
impl WrappedTypesupport for BatteryState
type CStruct = sensor_msgs__msg__BatteryState
fn get_ts() -> &'static rosidl_message_type_support_t
fn create_msg() -> *mut sensor_msgs__msg__BatteryState
fn destroy_msg(msg: *mut sensor_msgs__msg__BatteryState)
fn from_native(msg: &Self::CStruct) -> BatteryState
fn copy_to_native(&self, msg: &mut Self::CStruct)
source§fn to_serialized_bytes(&self) -> Result<Vec<u8>>
fn to_serialized_bytes(&self) -> Result<Vec<u8>>
This serializes the message using ROS2 methods.
source§fn from_serialized_bytes(data: &[u8]) -> Result<Self>
fn from_serialized_bytes(data: &[u8]) -> Result<Self>
This deserializes the message using ROS2 methods.
impl StructuralPartialEq for BatteryState
Auto Trait Implementations§
impl Freeze for BatteryState
impl RefUnwindSafe for BatteryState
impl Send for BatteryState
impl Sync for BatteryState
impl Unpin for BatteryState
impl UnwindSafe for BatteryState
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more