An embeddable panel which listens on rosout and displays any messages that arrive. More...
#include <rosout_panel.h>
Classes | |
struct | FilterInfo |
Public Member Functions | |
void | clear () |
Clear all messages. | |
void | clearFilters () |
RosoutFrame * | createNewFrame () |
RosoutTextFilterPtr | createTextFilter () |
rosgraph_msgs::LogConstPtr | getMessageByIndex (uint32_t index) const |
Get a message by index in our ordered message list. Used by the list control. | |
RosoutMessageSummary | getMessageSummary (double duration) const |
Returns a summary of the types of messages that have been received recently. | |
void | refilter () |
Re-filter all messages. | |
RosoutPanel (wxWindow *parent, int id=wxID_ANY, wxPoint pos=wxDefaultPosition, wxSize size=wxDefaultSize, int style=wxTAB_TRAVERSAL) | |
Constructor. | |
void | setBufferSize (uint32_t size) |
Set the number of messages to display before we start throwing away old ones. | |
void | setEnabled (bool enabled) |
Set this panel to be enabled or not. | |
void | setTopic (const std::string &topic) |
Set the topic to listen on for rosgraph_msgs::Log messages. | |
~RosoutPanel () | |
Protected Types | |
typedef std::map< uint32_t, rosgraph_msgs::Log::ConstPtr > | M_IdToMessage |
typedef std::vector< FilterInfo > | V_FilterInfo |
typedef std::vector < rosgraph_msgs::Log::ConstPtr > | V_Log |
typedef std::vector< uint32_t > | V_u32 |
Protected Member Functions | |
void | addFilter (const RosoutFilterPtr &filter, wxWindow *control) |
void | addMessageToTable (const rosgraph_msgs::Log::ConstPtr &message, uint32_t id) |
Add a message to the table. | |
void | checkForMaster () |
bool | filter (uint32_t id) const |
Filter a message based on our current filter. | |
void | incomingMessage (const rosgraph_msgs::Log::ConstPtr &message) |
(ros callback) Called when there is a new message waiting | |
void | onAddFilterPressed (wxCommandEvent &event) |
virtual void | onClear (wxCommandEvent &event) |
(wx callback) Called when the "Clear" button is pressed | |
void | onFilterChanged (const RosoutFilter *) |
void | onFilterDelete (wxCommandEvent &event) |
void | onFilterEnableChecked (wxCommandEvent &event) |
void | onFilterMoveDown (wxCommandEvent &event) |
void | onFilterMoveUp (wxCommandEvent &event) |
virtual void | onLoggerLevels (wxCommandEvent &event) |
void | onLoggerLevelsClose (wxCloseEvent &event) |
void | onMasterDisconnected (wxEvent &event) |
void | onMasterReconnected (wxEvent &event) |
virtual void | onNewWindow (wxCommandEvent &event) |
virtual void | onPause (wxCommandEvent &event) |
(wx callback) Called when the "Pause" button is pressed | |
void | onProcessTimer (wxTimerEvent &evt) |
(wx callback) Called every 250ms so we can process new messages | |
virtual void | onSetup (wxCommandEvent &event) |
(wx callback) Called when the "Setup" button is pressed | |
void | popMessage () |
Remove The oldest message. | |
void | processMessage (const rosgraph_msgs::Log::ConstPtr &message) |
Process a log message. | |
void | processMessages () |
Processes any messages in our message queue. | |
void | removeFilter (const RosoutFilterPtr &filter) |
void | resizeFiltersPane () |
void | setMessages (const M_IdToMessage &messages) |
void | subscribe () |
subscribe to our topic | |
void | unsubscribe () |
unsubscribe from our topic | |
void | updateFilterBackgrounds () |
void | validateOrderedMessages () |
Protected Attributes | |
ros::CallbackQueue | callback_queue_ |
boost::thread * | check_master_thread_ |
Thread used to periodically check for master. | |
bool | connected_ |
Are we connected to master? | |
wxBitmap | delete_filter_bitmap_ |
const int | DISCONNECTED_FROM_MASTER_EVENT_ |
bool | enabled_ |
Are we enabled? | |
V_FilterInfo | filters_ |
LoggerLevelFrame * | logger_level_frame_ |
uint32_t | max_messages_ |
Max number of messages to keep around. When we hit this limit, we start throwing away the oldest messages. | |
uint32_t | message_id_counter_ |
Counter for generating unique ids for messages. | |
V_Log | message_queue_ |
Queue of messages we've received since the last time processMessages() was called. | |
M_IdToMessage | messages_ |
Map of id->message. | |
bool | needs_refilter_ |
Set to true when we need to refilter our messages (ie. a filter has changed) | |
ros::NodeHandle | nh_ |
V_u32 | ordered_messages_ |
Already-filtered messages that are being displayed in the list. | |
bool | pause_ |
wxTimer * | process_timer_ |
Timer used to periodically process messages. | |
const int | RECONNECTED_TO_MASTER_EVENT_ |
float | refilter_timer_ |
Accumulator used to gate how often we refilter. | |
RosoutSeverityFilterPtr | severity_filter_ |
bool | shutdown_thread_ |
Should the thread terminate? | |
ros::Subscriber | sub_ |
std::string | topic_ |
The topic we're listening on (or will listen on once we're enabled) |
An embeddable panel which listens on rosout and displays any messages that arrive.
Definition at line 100 of file rosout_panel.h.
typedef std::map<uint32_t, rosgraph_msgs::Log::ConstPtr> rxtools::RosoutPanel::M_IdToMessage [protected] |
Definition at line 251 of file rosout_panel.h.
typedef std::vector<FilterInfo> rxtools::RosoutPanel::V_FilterInfo [protected] |
Definition at line 281 of file rosout_panel.h.
typedef std::vector<rosgraph_msgs::Log::ConstPtr> rxtools::RosoutPanel::V_Log [protected] |
Definition at line 262 of file rosout_panel.h.
typedef std::vector<uint32_t> rxtools::RosoutPanel::V_u32 [protected] |
Definition at line 271 of file rosout_panel.h.
rxtools::RosoutPanel::RosoutPanel | ( | wxWindow * | parent, |
int | id = wxID_ANY , |
||
wxPoint | pos = wxDefaultPosition , |
||
wxSize | size = wxDefaultSize , |
||
int | style = wxTAB_TRAVERSAL |
||
) |
Constructor.
parent | The window which is the parent of this one |
Definition at line 58 of file rosout_panel.cpp.
Definition at line 111 of file rosout_panel.cpp.
void rxtools::RosoutPanel::addFilter | ( | const RosoutFilterPtr & | filter, |
wxWindow * | control | ||
) | [protected] |
Definition at line 324 of file rosout_panel.cpp.
void rxtools::RosoutPanel::addMessageToTable | ( | const rosgraph_msgs::Log::ConstPtr & | message, |
uint32_t | id | ||
) | [protected] |
Add a message to the table.
message | The message |
id | The unique id of the message |
Definition at line 513 of file rosout_panel.cpp.
void rxtools::RosoutPanel::checkForMaster | ( | ) | [protected] |
Definition at line 764 of file rosout_panel.cpp.
void rxtools::RosoutPanel::clear | ( | ) |
Clear all messages.
Definition at line 126 of file rosout_panel.cpp.
void rxtools::RosoutPanel::clearFilters | ( | ) |
Definition at line 434 of file rosout_panel.cpp.
Definition at line 196 of file rosout_panel.cpp.
Definition at line 494 of file rosout_panel.cpp.
bool rxtools::RosoutPanel::filter | ( | uint32_t | id | ) | const [protected] |
Filter a message based on our current filter.
id | The id of the message to filter |
Definition at line 531 of file rosout_panel.cpp.
rosgraph_msgs::LogConstPtr rxtools::RosoutPanel::getMessageByIndex | ( | uint32_t | index | ) | const |
Get a message by index in our ordered message list. Used by the list control.
index | Index of the message to return |
Definition at line 518 of file rosout_panel.cpp.
RosoutMessageSummary rxtools::RosoutPanel::getMessageSummary | ( | double | duration | ) | const |
Returns a summary of the types of messages that have been received recently.
duration | Controls how far in the past the function searches for messages |
Definition at line 720 of file rosout_panel.cpp.
void rxtools::RosoutPanel::incomingMessage | ( | const rosgraph_msgs::Log::ConstPtr & | message | ) | [protected] |
(ros callback) Called when there is a new message waiting
Definition at line 687 of file rosout_panel.cpp.
void rxtools::RosoutPanel::onAddFilterPressed | ( | wxCommandEvent & | event | ) | [protected] |
Definition at line 503 of file rosout_panel.cpp.
void rxtools::RosoutPanel::onClear | ( | wxCommandEvent & | event | ) | [protected, virtual] |
(wx callback) Called when the "Clear" button is pressed
Reimplemented from rxtools::RosoutPanelBase.
Definition at line 508 of file rosout_panel.cpp.
void rxtools::RosoutPanel::onFilterChanged | ( | const RosoutFilter * | ) | [protected] |
Definition at line 442 of file rosout_panel.cpp.
void rxtools::RosoutPanel::onFilterDelete | ( | wxCommandEvent & | event | ) | [protected] |
Definition at line 250 of file rosout_panel.cpp.
void rxtools::RosoutPanel::onFilterEnableChecked | ( | wxCommandEvent & | event | ) | [protected] |
Definition at line 234 of file rosout_panel.cpp.
void rxtools::RosoutPanel::onFilterMoveDown | ( | wxCommandEvent & | event | ) | [protected] |
Definition at line 288 of file rosout_panel.cpp.
void rxtools::RosoutPanel::onFilterMoveUp | ( | wxCommandEvent & | event | ) | [protected] |
Definition at line 265 of file rosout_panel.cpp.
void rxtools::RosoutPanel::onLoggerLevels | ( | wxCommandEvent & | event | ) | [protected, virtual] |
Reimplemented from rxtools::RosoutPanelBase.
Definition at line 217 of file rosout_panel.cpp.
void rxtools::RosoutPanel::onLoggerLevelsClose | ( | wxCloseEvent & | event | ) | [protected] |
Definition at line 211 of file rosout_panel.cpp.
void rxtools::RosoutPanel::onMasterDisconnected | ( | wxEvent & | event | ) | [protected] |
Definition at line 796 of file rosout_panel.cpp.
void rxtools::RosoutPanel::onMasterReconnected | ( | wxEvent & | event | ) | [protected] |
Definition at line 789 of file rosout_panel.cpp.
void rxtools::RosoutPanel::onNewWindow | ( | wxCommandEvent & | event | ) | [protected, virtual] |
Reimplemented from rxtools::RosoutPanelBase.
Definition at line 206 of file rosout_panel.cpp.
void rxtools::RosoutPanel::onPause | ( | wxCommandEvent & | event | ) | [protected, virtual] |
(wx callback) Called when the "Pause" button is pressed
Reimplemented from rxtools::RosoutPanelBase.
Definition at line 695 of file rosout_panel.cpp.
void rxtools::RosoutPanel::onProcessTimer | ( | wxTimerEvent & | evt | ) | [protected] |
(wx callback) Called every 250ms so we can process new messages
Definition at line 474 of file rosout_panel.cpp.
void rxtools::RosoutPanel::onSetup | ( | wxCommandEvent & | event | ) | [protected, virtual] |
(wx callback) Called when the "Setup" button is pressed
Reimplemented from rxtools::RosoutPanelBase.
Definition at line 700 of file rosout_panel.cpp.
void rxtools::RosoutPanel::popMessage | ( | ) | [protected] |
Remove The oldest message.
Definition at line 613 of file rosout_panel.cpp.
void rxtools::RosoutPanel::processMessage | ( | const rosgraph_msgs::Log::ConstPtr & | message | ) | [protected] |
Process a log message.
message | The message to process |
Definition at line 643 of file rosout_panel.cpp.
void rxtools::RosoutPanel::processMessages | ( | ) | [protected] |
Processes any messages in our message queue.
Definition at line 662 of file rosout_panel.cpp.
void rxtools::RosoutPanel::refilter | ( | ) |
Re-filter all messages.
Definition at line 588 of file rosout_panel.cpp.
void rxtools::RosoutPanel::removeFilter | ( | const RosoutFilterPtr & | filter | ) | [protected] |
Definition at line 418 of file rosout_panel.cpp.
void rxtools::RosoutPanel::resizeFiltersPane | ( | ) | [protected] |
Definition at line 394 of file rosout_panel.cpp.
void rxtools::RosoutPanel::setBufferSize | ( | uint32_t | size | ) |
Set the number of messages to display before we start throwing away old ones.
size | The number of messages |
Definition at line 711 of file rosout_panel.cpp.
void rxtools::RosoutPanel::setEnabled | ( | bool | enabled | ) |
Set this panel to be enabled or not.
When enabled, it will be subscribed to the rosout topic and processing messages. When disabled, it will not.
enabled | Should we be enabled? |
Definition at line 133 of file rosout_panel.cpp.
void rxtools::RosoutPanel::setMessages | ( | const M_IdToMessage & | messages | ) | [protected] |
Definition at line 180 of file rosout_panel.cpp.
void rxtools::RosoutPanel::setTopic | ( | const std::string & | topic | ) |
Set the topic to listen on for rosgraph_msgs::Log messages.
topic | The topic name |
Definition at line 166 of file rosout_panel.cpp.
void rxtools::RosoutPanel::subscribe | ( | ) | [protected] |
subscribe to our topic
Definition at line 151 of file rosout_panel.cpp.
void rxtools::RosoutPanel::unsubscribe | ( | ) | [protected] |
unsubscribe from our topic
Definition at line 161 of file rosout_panel.cpp.
void rxtools::RosoutPanel::updateFilterBackgrounds | ( | ) | [protected] |
Definition at line 306 of file rosout_panel.cpp.
void rxtools::RosoutPanel::validateOrderedMessages | ( | ) | [protected] |
Definition at line 570 of file rosout_panel.cpp.
Definition at line 278 of file rosout_panel.h.
boost::thread* rxtools::RosoutPanel::check_master_thread_ [protected] |
Thread used to periodically check for master.
Definition at line 295 of file rosout_panel.h.
bool rxtools::RosoutPanel::connected_ [protected] |
Are we connected to master?
Definition at line 294 of file rosout_panel.h.
wxBitmap rxtools::RosoutPanel::delete_filter_bitmap_ [protected] |
Definition at line 286 of file rosout_panel.h.
const int rxtools::RosoutPanel::DISCONNECTED_FROM_MASTER_EVENT_ [protected] |
Definition at line 299 of file rosout_panel.h.
bool rxtools::RosoutPanel::enabled_ [protected] |
Are we enabled?
Definition at line 257 of file rosout_panel.h.
V_FilterInfo rxtools::RosoutPanel::filters_ [protected] |
Definition at line 282 of file rosout_panel.h.
Definition at line 290 of file rosout_panel.h.
uint32_t rxtools::RosoutPanel::max_messages_ [protected] |
Max number of messages to keep around. When we hit this limit, we start throwing away the oldest messages.
Definition at line 274 of file rosout_panel.h.
uint32_t rxtools::RosoutPanel::message_id_counter_ [protected] |
Counter for generating unique ids for messages.
Definition at line 267 of file rosout_panel.h.
V_Log rxtools::RosoutPanel::message_queue_ [protected] |
Queue of messages we've received since the last time processMessages() was called.
Definition at line 263 of file rosout_panel.h.
M_IdToMessage rxtools::RosoutPanel::messages_ [protected] |
Map of id->message.
Definition at line 269 of file rosout_panel.h.
bool rxtools::RosoutPanel::needs_refilter_ [protected] |
Set to true when we need to refilter our messages (ie. a filter has changed)
Definition at line 275 of file rosout_panel.h.
ros::NodeHandle rxtools::RosoutPanel::nh_ [protected] |
Definition at line 260 of file rosout_panel.h.
V_u32 rxtools::RosoutPanel::ordered_messages_ [protected] |
Already-filtered messages that are being displayed in the list.
Definition at line 272 of file rosout_panel.h.
bool rxtools::RosoutPanel::pause_ [protected] |
Definition at line 288 of file rosout_panel.h.
wxTimer* rxtools::RosoutPanel::process_timer_ [protected] |
Timer used to periodically process messages.
Definition at line 265 of file rosout_panel.h.
const int rxtools::RosoutPanel::RECONNECTED_TO_MASTER_EVENT_ [protected] |
Definition at line 298 of file rosout_panel.h.
float rxtools::RosoutPanel::refilter_timer_ [protected] |
Accumulator used to gate how often we refilter.
Definition at line 276 of file rosout_panel.h.
Definition at line 284 of file rosout_panel.h.
bool rxtools::RosoutPanel::shutdown_thread_ [protected] |
Should the thread terminate?
Definition at line 296 of file rosout_panel.h.
ros::Subscriber rxtools::RosoutPanel::sub_ [protected] |
Definition at line 279 of file rosout_panel.h.
std::string rxtools::RosoutPanel::topic_ [protected] |
The topic we're listening on (or will listen on once we're enabled)
Definition at line 258 of file rosout_panel.h.