Classes | Macros | Typedefs | Functions
mavlink_msg_battery_status.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  __mavlink_battery_status_t
 

Macros

#define MAVLINK_MESSAGE_INFO_BATTERY_STATUS
 
#define MAVLINK_MSG_BATTERY_STATUS_FIELD_VOLTAGES_LEN   10
 
#define MAVLINK_MSG_ID_147_CRC   154
 
#define MAVLINK_MSG_ID_147_LEN   36
 
#define MAVLINK_MSG_ID_BATTERY_STATUS   147
 
#define MAVLINK_MSG_ID_BATTERY_STATUS_CRC   154
 
#define MAVLINK_MSG_ID_BATTERY_STATUS_LEN   36
 

Typedefs

typedef struct __mavlink_battery_status_t mavlink_battery_status_t
 

Functions

static void mavlink_msg_battery_status_decode (const mavlink_message_t *msg, mavlink_battery_status_t *battery_status)
 Decode a battery_status message into a struct. More...
 
static uint16_t mavlink_msg_battery_status_encode (uint8_t system_id, uint8_t component_id, mavlink_message_t *msg, const mavlink_battery_status_t *battery_status)
 Encode a battery_status struct. More...
 
static uint16_t mavlink_msg_battery_status_encode_chan (uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t *msg, const mavlink_battery_status_t *battery_status)
 Encode a battery_status struct on a channel. More...
 
static uint8_t mavlink_msg_battery_status_get_battery_function (const mavlink_message_t *msg)
 Get field battery_function from battery_status message. More...
 
static int8_t mavlink_msg_battery_status_get_battery_remaining (const mavlink_message_t *msg)
 Get field battery_remaining from battery_status message. More...
 
static int16_t mavlink_msg_battery_status_get_current_battery (const mavlink_message_t *msg)
 Get field current_battery from battery_status message. More...
 
static int32_t mavlink_msg_battery_status_get_current_consumed (const mavlink_message_t *msg)
 Get field current_consumed from battery_status message. More...
 
static int32_t mavlink_msg_battery_status_get_energy_consumed (const mavlink_message_t *msg)
 Get field energy_consumed from battery_status message. More...
 
static uint8_t mavlink_msg_battery_status_get_id (const mavlink_message_t *msg)
 Send a battery_status message. More...
 
static int16_t mavlink_msg_battery_status_get_temperature (const mavlink_message_t *msg)
 Get field temperature from battery_status message. More...
 
static uint8_t mavlink_msg_battery_status_get_type (const mavlink_message_t *msg)
 Get field type from battery_status message. More...
 
static uint16_t mavlink_msg_battery_status_get_voltages (const mavlink_message_t *msg, uint16_t *voltages)
 Get field voltages from battery_status message. More...
 
static uint16_t mavlink_msg_battery_status_pack (uint8_t system_id, uint8_t component_id, mavlink_message_t *msg, uint8_t id, uint8_t battery_function, uint8_t type, int16_t temperature, const uint16_t *voltages, int16_t current_battery, int32_t current_consumed, int32_t energy_consumed, int8_t battery_remaining)
 Pack a battery_status message. More...
 
static uint16_t mavlink_msg_battery_status_pack_chan (uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t *msg, uint8_t id, uint8_t battery_function, uint8_t type, int16_t temperature, const uint16_t *voltages, int16_t current_battery, int32_t current_consumed, int32_t energy_consumed, int8_t battery_remaining)
 Pack a battery_status message on a channel. More...
 

Macro Definition Documentation

#define MAVLINK_MESSAGE_INFO_BATTERY_STATUS
Value:
{ \
"BATTERY_STATUS", \
9, \
{ { "current_consumed", NULL, MAVLINK_TYPE_INT32_T, 0, 0, offsetof(mavlink_battery_status_t, current_consumed) }, \
{ "energy_consumed", NULL, MAVLINK_TYPE_INT32_T, 0, 4, offsetof(mavlink_battery_status_t, energy_consumed) }, \
{ "temperature", NULL, MAVLINK_TYPE_INT16_T, 0, 8, offsetof(mavlink_battery_status_t, temperature) }, \
{ "voltages", NULL, MAVLINK_TYPE_UINT16_T, 10, 10, offsetof(mavlink_battery_status_t, voltages) }, \
{ "current_battery", NULL, MAVLINK_TYPE_INT16_T, 0, 30, offsetof(mavlink_battery_status_t, current_battery) }, \
{ "id", NULL, MAVLINK_TYPE_UINT8_T, 0, 32, offsetof(mavlink_battery_status_t, id) }, \
{ "battery_function", NULL, MAVLINK_TYPE_UINT8_T, 0, 33, offsetof(mavlink_battery_status_t, battery_function) }, \
{ "type", NULL, MAVLINK_TYPE_UINT8_T, 0, 34, offsetof(mavlink_battery_status_t, type) }, \
{ "battery_remaining", NULL, MAVLINK_TYPE_INT8_T, 0, 35, offsetof(mavlink_battery_status_t, battery_remaining) }, \
} \
}

Definition at line 26 of file mavlink_msg_battery_status.h.

#define MAVLINK_MSG_BATTERY_STATUS_FIELD_VOLTAGES_LEN   10

Definition at line 24 of file mavlink_msg_battery_status.h.

#define MAVLINK_MSG_ID_147_CRC   154

Definition at line 22 of file mavlink_msg_battery_status.h.

#define MAVLINK_MSG_ID_147_LEN   36

Definition at line 19 of file mavlink_msg_battery_status.h.

#define MAVLINK_MSG_ID_BATTERY_STATUS   147

Definition at line 3 of file mavlink_msg_battery_status.h.

#define MAVLINK_MSG_ID_BATTERY_STATUS_CRC   154

Definition at line 21 of file mavlink_msg_battery_status.h.

#define MAVLINK_MSG_ID_BATTERY_STATUS_LEN   36

Definition at line 18 of file mavlink_msg_battery_status.h.

Typedef Documentation

Function Documentation

static void mavlink_msg_battery_status_decode ( const mavlink_message_t *  msg,
mavlink_battery_status_t battery_status 
)
inlinestatic

Decode a battery_status message into a struct.

Parameters
msgThe message to decode
battery_statusC-struct to decode the message contents into

Definition at line 378 of file mavlink_msg_battery_status.h.

static uint16_t mavlink_msg_battery_status_encode ( uint8_t  system_id,
uint8_t  component_id,
mavlink_message_t *  msg,
const mavlink_battery_status_t battery_status 
)
inlinestatic

Encode a battery_status struct.

Parameters
system_idID of this system
component_idID of this component (e.g. 200 for IMU)
msgThe MAVLink message to compress the data into
battery_statusC-struct to read the message contents from

Definition at line 159 of file mavlink_msg_battery_status.h.

static uint16_t mavlink_msg_battery_status_encode_chan ( uint8_t  system_id,
uint8_t  component_id,
uint8_t  chan,
mavlink_message_t *  msg,
const mavlink_battery_status_t battery_status 
)
inlinestatic

Encode a battery_status struct on a channel.

Parameters
system_idID of this system
component_idID of this component (e.g. 200 for IMU)
chanThe MAVLink channel this message will be sent over
msgThe MAVLink message to compress the data into
battery_statusC-struct to read the message contents from

Definition at line 173 of file mavlink_msg_battery_status.h.

static uint8_t mavlink_msg_battery_status_get_battery_function ( const mavlink_message_t *  msg)
inlinestatic

Get field battery_function from battery_status message.

Returns
Function of the battery

Definition at line 297 of file mavlink_msg_battery_status.h.

static int8_t mavlink_msg_battery_status_get_battery_remaining ( const mavlink_message_t *  msg)
inlinestatic

Get field battery_remaining from battery_status message.

Returns
Remaining battery energy: (0%: 0, 100%: 100), -1: autopilot does not estimate the remaining battery

Definition at line 367 of file mavlink_msg_battery_status.h.

static int16_t mavlink_msg_battery_status_get_current_battery ( const mavlink_message_t *  msg)
inlinestatic

Get field current_battery from battery_status message.

Returns
Battery current, in 10*milliamperes (1 = 10 milliampere), -1: autopilot does not measure the current

Definition at line 337 of file mavlink_msg_battery_status.h.

static int32_t mavlink_msg_battery_status_get_current_consumed ( const mavlink_message_t *  msg)
inlinestatic

Get field current_consumed from battery_status message.

Returns
Consumed charge, in milliampere hours (1 = 1 mAh), -1: autopilot does not provide mAh consumption estimate

Definition at line 347 of file mavlink_msg_battery_status.h.

static int32_t mavlink_msg_battery_status_get_energy_consumed ( const mavlink_message_t *  msg)
inlinestatic

Get field energy_consumed from battery_status message.

Returns
Consumed energy, in 100*Joules (intergrated U*I*dt) (1 = 100 Joule), -1: autopilot does not provide energy consumption estimate

Definition at line 357 of file mavlink_msg_battery_status.h.

static uint8_t mavlink_msg_battery_status_get_id ( const mavlink_message_t *  msg)
inlinestatic

Send a battery_status message.

Parameters
chanMAVLink channel to send the message
idBattery ID
battery_functionFunction of the battery
typeType (chemistry) of the battery
temperatureTemperature of the battery in centi-degrees celsius. INT16_MAX for unknown temperature.
voltagesBattery voltage of cells, in millivolts (1 = 1 millivolt). Cells above the valid cell count for this battery should have the UINT16_MAX value.
current_batteryBattery current, in 10*milliamperes (1 = 10 milliampere), -1: autopilot does not measure the current
current_consumedConsumed charge, in milliampere hours (1 = 1 mAh), -1: autopilot does not provide mAh consumption estimate
energy_consumedConsumed energy, in 100*Joules (intergrated U*I*dt) (1 = 100 Joule), -1: autopilot does not provide energy consumption estimate
battery_remainingRemaining battery energy: (0%: 0, 100%: 100), -1: autopilot does not estimate the remaining battery Get field id from battery_status message
Returns
Battery ID

Definition at line 287 of file mavlink_msg_battery_status.h.

static int16_t mavlink_msg_battery_status_get_temperature ( const mavlink_message_t *  msg)
inlinestatic

Get field temperature from battery_status message.

Returns
Temperature of the battery in centi-degrees celsius. INT16_MAX for unknown temperature.

Definition at line 317 of file mavlink_msg_battery_status.h.

static uint8_t mavlink_msg_battery_status_get_type ( const mavlink_message_t *  msg)
inlinestatic

Get field type from battery_status message.

Returns
Type (chemistry) of the battery

Definition at line 307 of file mavlink_msg_battery_status.h.

static uint16_t mavlink_msg_battery_status_get_voltages ( const mavlink_message_t *  msg,
uint16_t *  voltages 
)
inlinestatic

Get field voltages from battery_status message.

Returns
Battery voltage of cells, in millivolts (1 = 1 millivolt). Cells above the valid cell count for this battery should have the UINT16_MAX value.

Definition at line 327 of file mavlink_msg_battery_status.h.

static uint16_t mavlink_msg_battery_status_pack ( uint8_t  system_id,
uint8_t  component_id,
mavlink_message_t *  msg,
uint8_t  id,
uint8_t  battery_function,
uint8_t  type,
int16_t  temperature,
const uint16_t *  voltages,
int16_t  current_battery,
int32_t  current_consumed,
int32_t  energy_consumed,
int8_t  battery_remaining 
)
inlinestatic

Pack a battery_status message.

Parameters
system_idID of this system
component_idID of this component (e.g. 200 for IMU)
msgThe MAVLink message to compress the data into
idBattery ID
battery_functionFunction of the battery
typeType (chemistry) of the battery
temperatureTemperature of the battery in centi-degrees celsius. INT16_MAX for unknown temperature.
voltagesBattery voltage of cells, in millivolts (1 = 1 millivolt). Cells above the valid cell count for this battery should have the UINT16_MAX value.
current_batteryBattery current, in 10*milliamperes (1 = 10 milliampere), -1: autopilot does not measure the current
current_consumedConsumed charge, in milliampere hours (1 = 1 mAh), -1: autopilot does not provide mAh consumption estimate
energy_consumedConsumed energy, in 100*Joules (intergrated U*I*dt) (1 = 100 Joule), -1: autopilot does not provide energy consumption estimate
battery_remainingRemaining battery energy: (0%: 0, 100%: 100), -1: autopilot does not estimate the remaining battery
Returns
length of the message in bytes (excluding serial stream start sign)

Definition at line 59 of file mavlink_msg_battery_status.h.

static uint16_t mavlink_msg_battery_status_pack_chan ( uint8_t  system_id,
uint8_t  component_id,
uint8_t  chan,
mavlink_message_t *  msg,
uint8_t  id,
uint8_t  battery_function,
uint8_t  type,
int16_t  temperature,
const uint16_t *  voltages,
int16_t  current_battery,
int32_t  current_consumed,
int32_t  energy_consumed,
int8_t  battery_remaining 
)
inlinestatic

Pack a battery_status message on a channel.

Parameters
system_idID of this system
component_idID of this component (e.g. 200 for IMU)
chanThe MAVLink channel this message will be sent over
msgThe MAVLink message to compress the data into
idBattery ID
battery_functionFunction of the battery
typeType (chemistry) of the battery
temperatureTemperature of the battery in centi-degrees celsius. INT16_MAX for unknown temperature.
voltagesBattery voltage of cells, in millivolts (1 = 1 millivolt). Cells above the valid cell count for this battery should have the UINT16_MAX value.
current_batteryBattery current, in 10*milliamperes (1 = 10 milliampere), -1: autopilot does not measure the current
current_consumedConsumed charge, in milliampere hours (1 = 1 mAh), -1: autopilot does not provide mAh consumption estimate
energy_consumedConsumed energy, in 100*Joules (intergrated U*I*dt) (1 = 100 Joule), -1: autopilot does not provide energy consumption estimate
battery_remainingRemaining battery energy: (0%: 0, 100%: 100), -1: autopilot does not estimate the remaining battery
Returns
length of the message in bytes (excluding serial stream start sign)

Definition at line 113 of file mavlink_msg_battery_status.h.



rosflight
Author(s): Daniel Koch , James Jackson
autogenerated on Wed Jul 3 2019 20:00:13