Fawkes API
Fawkes Development Version
|
A treeview that retrieves battery data from the robots over remote blackboard connections and displays those. More...
#include <tools/battery_monitor/battery_monitor_treeview.h>
Classes | |
class | BatteryRecord |
Column record class for the battery monitor treeview. More... | |
Public Member Functions | |
BatteryMonitorTreeView (BaseObjectType *cobject, const Glib::RefPtr< Gtk::Builder > &builder) | |
Constructor. More... | |
virtual | ~BatteryMonitorTreeView () |
Destructor. More... | |
void | add_host (const char *host) |
Add given host. More... | |
void | rem_host (const char *host) |
Remove given host. More... | |
Protected Attributes | |
BatteryRecord | m_battery_record |
Column record object to acces the columns of the storage object. More... | |
Glib::RefPtr< Gtk::ListStore > | m_battery_list |
Storage object. More... | |
std::map< std::string, fawkes::BlackBoard *> | m_remote_bbs |
Map with remote blackboards: hostname -> remote blackboard. More... | |
std::map< std::string, fawkes::BatteryInterface *> | m_battery_interfaces |
Map containing the battery interfaces: hostname -> battery interface. More... | |
std::map< std::string, fawkes::InterfaceDispatcher *> | m_interface_dispatcher |
Interface dispatcher for the battery interfaces. More... | |
A treeview that retrieves battery data from the robots over remote blackboard connections and displays those.
Definition at line 39 of file battery_monitor_treeview.h.
BatteryMonitorTreeView::BatteryMonitorTreeView | ( | BaseObjectType * | cobject, |
const Glib::RefPtr< Gtk::Builder > & | builder | ||
) |
Constructor.
cobject | base object type |
builder | builder to get widgets from |
Definition at line 70 of file battery_monitor_treeview.cpp.
References BatteryMonitorTreeView::BatteryRecord::absolute_soc, BatteryMonitorTreeView::BatteryRecord::current, m_battery_list, m_battery_record, BatteryMonitorTreeView::BatteryRecord::relative_soc, BatteryMonitorTreeView::BatteryRecord::short_name, and BatteryMonitorTreeView::BatteryRecord::voltage.
|
virtual |
Destructor.
Definition at line 92 of file battery_monitor_treeview.cpp.
References m_battery_interfaces, m_interface_dispatcher, and m_remote_bbs.
void BatteryMonitorTreeView::add_host | ( | const char * | h | ) |
Add given host.
h | the host's hostname |
Definition at line 137 of file battery_monitor_treeview.cpp.
References fawkes::Exception::append(), m_battery_interfaces, m_remote_bbs, fawkes::BlackBoard::open_for_reading(), fawkes::Exception::print_trace(), and fawkes::BlackBoard::register_listener().
void BatteryMonitorTreeView::rem_host | ( | const char * | h | ) |
Remove given host.
h | the host's hostname |
Definition at line 199 of file battery_monitor_treeview.cpp.
References BatteryMonitorTreeView::BatteryRecord::absolute_soc, fawkes::BatteryInterface::absolute_soc(), fawkes::Exception::append(), fawkes::BlackBoard::close(), BatteryMonitorTreeView::BatteryRecord::current, fawkes::BatteryInterface::current(), BatteryMonitorTreeView::BatteryRecord::fqdn, fawkes::Interface::has_writer(), m_battery_interfaces, m_battery_list, m_battery_record, m_interface_dispatcher, m_remote_bbs, fawkes::Exception::print_trace(), fawkes::Interface::read(), BatteryMonitorTreeView::BatteryRecord::relative_soc, fawkes::BatteryInterface::relative_soc(), BatteryMonitorTreeView::BatteryRecord::short_name, fawkes::BlackBoard::unregister_listener(), BatteryMonitorTreeView::BatteryRecord::voltage, and fawkes::BatteryInterface::voltage().
|
protected |
Map containing the battery interfaces: hostname -> battery interface.
Definition at line 75 of file battery_monitor_treeview.h.
Referenced by add_host(), rem_host(), and ~BatteryMonitorTreeView().
|
protected |
Storage object.
Definition at line 72 of file battery_monitor_treeview.h.
Referenced by BatteryMonitorTreeView(), and rem_host().
|
protected |
Column record object to acces the columns of the storage object.
Definition at line 71 of file battery_monitor_treeview.h.
Referenced by BatteryMonitorTreeView(), and rem_host().
|
protected |
Interface dispatcher for the battery interfaces.
Definition at line 76 of file battery_monitor_treeview.h.
Referenced by rem_host(), and ~BatteryMonitorTreeView().
|
protected |
Map with remote blackboards: hostname -> remote blackboard.
Definition at line 74 of file battery_monitor_treeview.h.
Referenced by add_host(), rem_host(), and ~BatteryMonitorTreeView().