Classes | Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
power_monitor::AdvancedPowerStateEstimator Class Reference

#include <power_state_estimator.h>

Inheritance diagram for power_monitor::AdvancedPowerStateEstimator:
Inheritance graph
[legend]

Classes

struct  LogRecord
 

Public Member Functions

 AdvancedPowerStateEstimator ()
 
PowerStateEstimate estimate (const ros::Time &t)
 
std::string getMethodName () const
 
PowerStateEstimator::Type getMethodType () const
 
virtual void recordObservation (const PowerObservation &obs)
 
- Public Member Functions inherited from power_monitor::PowerStateEstimator
virtual bool canEstimate (const ros::Time &t) const
 
 PowerStateEstimator ()
 

Private Member Functions

bool hasEverDischarged () const
 
bool readObservations (std::vector< LogRecord > &log)
 
bool saveObservation (const PowerObservation &obs) const
 

Static Private Member Functions

static void tokenize (const std::string &str, std::vector< std::string > &tokens, const std::string &delimiters=",")
 

Private Attributes

std::vector< LogRecordlog_
 
std::string log_filename_
 

Static Private Attributes

static const std::string DEFAULT_LOG_FILE = "/var/ros/power_monitor/power.log"
 

Additional Inherited Members

- Public Types inherited from power_monitor::PowerStateEstimator
enum  Type { FuelGauge, Advanced }
 
- Protected Attributes inherited from power_monitor::PowerStateEstimator
PowerObservation obs_
 

Detailed Description

A more advanced power state estimator which is informed by the history of the batteries.

Definition at line 87 of file power_state_estimator.h.

Constructor & Destructor Documentation

AdvancedPowerStateEstimator::AdvancedPowerStateEstimator ( )

Definition at line 82 of file power_state_estimator.cpp.

Member Function Documentation

PowerStateEstimate AdvancedPowerStateEstimator::estimate ( const ros::Time t)
virtual

Implements power_monitor::PowerStateEstimator.

Definition at line 131 of file power_state_estimator.cpp.

string AdvancedPowerStateEstimator::getMethodName ( ) const
virtual

Implements power_monitor::PowerStateEstimator.

Definition at line 94 of file power_state_estimator.cpp.

PowerStateEstimator::Type AdvancedPowerStateEstimator::getMethodType ( ) const
virtual

Implements power_monitor::PowerStateEstimator.

Definition at line 95 of file power_state_estimator.cpp.

bool AdvancedPowerStateEstimator::hasEverDischarged ( ) const
private

Returns whether we've ever received a message that the power board is shutting down. If we have, then we can use the remaining capacity reported at that point to bias our prediction.

Definition at line 122 of file power_state_estimator.cpp.

bool AdvancedPowerStateEstimator::readObservations ( std::vector< LogRecord > &  log)
private

Definition at line 196 of file power_state_estimator.cpp.

void AdvancedPowerStateEstimator::recordObservation ( const PowerObservation obs)
virtual

Reimplemented from power_monitor::PowerStateEstimator.

Definition at line 97 of file power_state_estimator.cpp.

bool AdvancedPowerStateEstimator::saveObservation ( const PowerObservation obs) const
private

Definition at line 249 of file power_state_estimator.cpp.

void AdvancedPowerStateEstimator::tokenize ( const std::string &  str,
std::vector< std::string > &  tokens,
const std::string &  delimiters = "," 
)
staticprivate

Definition at line 182 of file power_state_estimator.cpp.

Member Data Documentation

const std::string AdvancedPowerStateEstimator::DEFAULT_LOG_FILE = "/var/ros/power_monitor/power.log"
staticprivate

Definition at line 110 of file power_state_estimator.h.

std::vector<LogRecord> power_monitor::AdvancedPowerStateEstimator::log_
private

Definition at line 118 of file power_state_estimator.h.

std::string power_monitor::AdvancedPowerStateEstimator::log_filename_
private

Definition at line 120 of file power_state_estimator.h.


The documentation for this class was generated from the following files:


power_monitor
Author(s): Tim Field, Curt Meyers
autogenerated on Fri May 14 2021 02:50:05