#include <observation.h>
Public Member Functions | |
unsigned int | getAcCount () const |
const std::vector < BatteryObservation > & | getBatteries () const |
int8_t | getMasterState () const |
ros::Duration | getMaxTimeToFull (const ros::Time &t) const |
unsigned int | getMinRelativeStateOfCharge () const |
ros::Duration | getMinTimeToEmpty (const ros::Time &t) const |
float | getMinVoltage () const |
const ros::Time & | getStamp () const |
float | getTotalPower () const |
float | getTotalRemainingCapacity () const |
PowerObservation (const ros::Time &stamp, int8_t master_state, const std::vector< BatteryObservation > &batteries) | |
PowerObservation () | |
Private Attributes | |
std::vector< BatteryObservation > | batteries_ |
int8_t | master_state_ |
ros::Time | stamp_ |
Stores information reported by the power system used to estimate the power state.
Definition at line 50 of file observation.h.
PowerObservation::PowerObservation | ( | ) |
Definition at line 48 of file observation.cpp.
power_monitor::PowerObservation::PowerObservation | ( | const ros::Time & | stamp, | |
int8_t | master_state, | |||
const std::vector< BatteryObservation > & | batteries | |||
) |
unsigned int PowerObservation::getAcCount | ( | ) | const |
Definition at line 56 of file observation.cpp.
const vector< BatteryObservation > & PowerObservation::getBatteries | ( | ) | const |
Definition at line 54 of file observation.cpp.
int8_t PowerObservation::getMasterState | ( | ) | const |
Definition at line 53 of file observation.cpp.
ros::Duration PowerObservation::getMaxTimeToFull | ( | const ros::Time & | t | ) | const |
Returns ros::Duration(-1, 0) if no batteries are charging.
Definition at line 144 of file observation.cpp.
unsigned int PowerObservation::getMinRelativeStateOfCharge | ( | ) | const |
Returns 999 if no batteries observed.
Definition at line 90 of file observation.cpp.
ros::Duration PowerObservation::getMinTimeToEmpty | ( | const ros::Time & | t | ) | const |
Returns ros::Duration(-1, 0) if all batteries are charging.
Definition at line 111 of file observation.cpp.
float PowerObservation::getMinVoltage | ( | ) | const |
Returns 9999.9 if no batteries observed.
Definition at line 78 of file observation.cpp.
const ros::Time & PowerObservation::getStamp | ( | ) | const |
Definition at line 52 of file observation.cpp.
float PowerObservation::getTotalPower | ( | ) | const |
Definition at line 66 of file observation.cpp.
float PowerObservation::getTotalRemainingCapacity | ( | ) | const |
Definition at line 99 of file observation.cpp.
std::vector<BatteryObservation> power_monitor::PowerObservation::batteries_ [private] |
Definition at line 71 of file observation.h.
int8_t power_monitor::PowerObservation::master_state_ [private] |
Definition at line 70 of file observation.h.
ros::Time power_monitor::PowerObservation::stamp_ [private] |
Definition at line 69 of file observation.h.