#include <node_click_handler.h>
| Public Slots | |
| void | logLevelClicked () | 
| Protected Member Functions | |
| bool | eventFilter (QObject *obj, QEvent *event) | 
| Private Member Functions | |
| template<class T > | |
| bool | callService (ros::ServiceClient &client, T &service, int timeout_secs=5) | 
| template<class T > | |
| void | callServiceWorker (ros::ServiceClient &client, T *service, bool *success) | 
| QMenu * | createMenu (const QString &logger_name, const QString ¤t_level) | 
| bool | showContextMenu (QListView *list, QContextMenuEvent *event) | 
| Private Attributes | |
| std::vector< std::string > | all_loggers_ | 
| ros::NodeHandle | nh_ | 
| std::string | node_name_ | 
| Static Private Attributes | |
| static const std::string | ALL_LOGGERS = "All Loggers" | 
| static const std::string | GET_LOGGERS_SVC = "/get_loggers" | 
| static const std::string | SET_LOGGER_LEVEL_SVC = "/set_logger_level" | 
Definition at line 50 of file node_click_handler.h.
| bool swri_console::NodeClickHandler::callService | ( | ros::ServiceClient & | client, | 
| T & | service, | ||
| int | timeout_secs = 5 | ||
| ) |  [inline, private] | 
Attempts to call a ROS service. Will time out and return false if the service call does not return within a specified time.
This is *so* ugly, but some sort of hack like this is necessary for keeping the UI responsive; ROS service clients do not have any built-in timeout mechanism, so we have to wrap our own around the service call. If we don't, a call to a hanged node could spin forever.
| T | Type of the ROS service | 
| client | An initialized ros::ServiceClient | 
| service | An instance of the ROS service | 
| timeout_secs | The number of seconds to wait before timing out | 
Definition at line 82 of file node_click_handler.h.
| void swri_console::NodeClickHandler::callServiceWorker | ( | ros::ServiceClient & | client, | 
| T * | service, | ||
| bool * | success | ||
| ) |  [inline, private] | 
Used by callService() to actually call the service in another thread.
Definition at line 64 of file node_click_handler.h.
| QMenu * swri_console::NodeClickHandler::createMenu | ( | const QString & | logger_name, | 
| const QString & | current_level | ||
| ) |  [private] | 
Definition at line 124 of file node_click_handler.cpp.
| bool swri_console::NodeClickHandler::eventFilter | ( | QObject * | obj, | 
| QEvent * | event | ||
| ) |  [protected] | 
Definition at line 47 of file node_click_handler.cpp.
| void swri_console::NodeClickHandler::logLevelClicked | ( | ) |  [slot] | 
Definition at line 145 of file node_click_handler.cpp.
| bool swri_console::NodeClickHandler::showContextMenu | ( | QListView * | list, | 
| QContextMenuEvent * | event | ||
| ) |  [private] | 
Normally this call should return very quickly, but we don't want the GUI to hang if the roscore is stuck, so add a timeout. The value is pretty arbitrary, but we also want to give enough time for this to still respond over a slow network link, so it shouldn't be *too* small.
Definition at line 69 of file node_click_handler.cpp.
| const std::string swri_console::NodeClickHandler::ALL_LOGGERS = "All Loggers"  [static, private] | 
Definition at line 101 of file node_click_handler.h.
| std::vector<std::string> swri_console::NodeClickHandler::all_loggers_  [private] | 
Definition at line 99 of file node_click_handler.h.
| const std::string swri_console::NodeClickHandler::GET_LOGGERS_SVC = "/get_loggers"  [static, private] | 
Definition at line 102 of file node_click_handler.h.
Definition at line 97 of file node_click_handler.h.
| std::string swri_console::NodeClickHandler::node_name_  [private] | 
Definition at line 98 of file node_click_handler.h.
| const std::string swri_console::NodeClickHandler::SET_LOGGER_LEVEL_SVC = "/set_logger_level"  [static, private] | 
Definition at line 103 of file node_click_handler.h.