$search

power_monitor::PowerMonitor Class Reference

#include <power_monitor.h>

List of all members.

Public Member Functions

void batteryServerUpdate (const boost::shared_ptr< const pr2_msgs::BatteryServer2 > &battery_server)
void configCallback (power_monitor::PowerMonitorConfig &config, uint32_t level)
 PowerMonitor ()
void powerNodeUpdate (const boost::shared_ptr< const pr2_msgs::PowerBoardState > &power_board_state)
bool setActiveEstimator (PowerStateEstimator::Type estimator_type)

Private Member Functions

void addEstimator (PowerStateEstimator *estimator)
PowerObservation extractObservation ()
ros::Time getLastBatteryUpdate () const
std::string masterStateToString (int8_t master_state) const
void onPublishTimer (const ros::TimerEvent &e)
void publishPowerState ()

Private Attributes

boost::shared_ptr
< PowerStateEstimator
active_estimator_
ros::Subscriber battery_server_sub_
std::map< int,
boost::shared_ptr< const
pr2_msgs::BatteryServer2 > > 
battery_servers_
double battery_update_timeout_
dynamic_reconfigure::Server
< power_monitor::PowerMonitorConfig > 
config_server_
std::map< std::string,
PowerStateEstimator::Type
estimator_types_
std::map
< PowerStateEstimator::Type,
boost::shared_ptr
< PowerStateEstimator > > 
estimators_
int8_t master_state_
PowerObservation observation_
ros::Subscriber power_node_sub_
ros::Publisher power_state_pub_
ros::Timer power_state_pub_timer_
boost::mutex publish_mutex_
boost::mutex update_mutex_

Detailed Description

This class listens to BatteryServer2 and PowerBoardState messages and publishes PowerState messages with estimates of the time remaining until the robot switches off (if discharging) or until the robot is fully charged (if charging).

Definition at line 58 of file power_monitor.h.


Constructor & Destructor Documentation

PowerMonitor::PowerMonitor (  ) 

Definition at line 40 of file power_monitor.cpp.


Member Function Documentation

void PowerMonitor::addEstimator ( PowerStateEstimator estimator  )  [private]

Definition at line 88 of file power_monitor.cpp.

void PowerMonitor::batteryServerUpdate ( const boost::shared_ptr< const pr2_msgs::BatteryServer2 > &  battery_server  ) 

Definition at line 117 of file power_monitor.cpp.

void power_monitor::PowerMonitor::configCallback ( power_monitor::PowerMonitorConfig &  config,
uint32_t  level 
)
PowerObservation PowerMonitor::extractObservation (  )  [private]

Definition at line 155 of file power_monitor.cpp.

ros::Time PowerMonitor::getLastBatteryUpdate (  )  const [private]

Definition at line 202 of file power_monitor.cpp.

string PowerMonitor::masterStateToString ( int8_t  master_state  )  const [private]

Definition at line 142 of file power_monitor.cpp.

void PowerMonitor::onPublishTimer ( const ros::TimerEvent e  )  [private]

Definition at line 215 of file power_monitor.cpp.

void PowerMonitor::powerNodeUpdate ( const boost::shared_ptr< const pr2_msgs::PowerBoardState > &  power_board_state  ) 

Definition at line 126 of file power_monitor.cpp.

void PowerMonitor::publishPowerState (  )  [private]

Definition at line 227 of file power_monitor.cpp.

bool PowerMonitor::setActiveEstimator ( PowerStateEstimator::Type  estimator_type  ) 

Definition at line 99 of file power_monitor.cpp.


Member Data Documentation

Definition at line 86 of file power_monitor.h.

Definition at line 90 of file power_monitor.h.

std::map<int, boost::shared_ptr<const pr2_msgs::BatteryServer2> > power_monitor::PowerMonitor::battery_servers_ [private]

Definition at line 81 of file power_monitor.h.

Definition at line 95 of file power_monitor.h.

dynamic_reconfigure::Server<power_monitor::PowerMonitorConfig> power_monitor::PowerMonitor::config_server_ [private]

Definition at line 75 of file power_monitor.h.

Definition at line 83 of file power_monitor.h.

Definition at line 84 of file power_monitor.h.

Definition at line 80 of file power_monitor.h.

Definition at line 93 of file power_monitor.h.

Definition at line 91 of file power_monitor.h.

Definition at line 89 of file power_monitor.h.

Definition at line 88 of file power_monitor.h.

Definition at line 78 of file power_monitor.h.

Definition at line 77 of file power_monitor.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends


power_monitor
Author(s): Tim Field, Curt Meyers
autogenerated on Sat Mar 2 13:04:48 2013