rxtools::RosoutPanel Class Reference

An embeddable panel which listens on rosout and displays any messages that arrive. More...

#include <rosout_panel.h>

Inheritance diagram for rxtools::RosoutPanel:
Inheritance graph
[legend]

List of all members.

Classes

struct  FilterInfo

Public Member Functions

void clear ()
 Clear all messages.
void clearFilters ()
RosoutFramecreateNewFrame ()
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< FilterInfoV_FilterInfo
typedef std::vector
< rosgraph_msgs::Log::ConstPtr > 
V_Log
typedef std::vector< uint32_tV_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.
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)
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 100ms 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_
wxBitmap delete_filter_bitmap_
bool enabled_
 Are we enabled?
V_FilterInfo filters_
LoggerLevelFramelogger_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.
float refilter_timer_
 Accumulator used to gate how often we refilter.
RosoutSeverityFilterPtr severity_filter_
ros::Subscriber sub_
std::string topic_
 The topic we're listening on (or will listen on once we're enabled).

Detailed Description

An embeddable panel which listens on rosout and displays any messages that arrive.

Definition at line 98 of file rosout_panel.h.


Member Typedef Documentation

typedef std::map<uint32_t, rosgraph_msgs::Log::ConstPtr> rxtools::RosoutPanel::M_IdToMessage [protected]

Definition at line 249 of file rosout_panel.h.

typedef std::vector<FilterInfo> rxtools::RosoutPanel::V_FilterInfo [protected]

Definition at line 279 of file rosout_panel.h.

typedef std::vector<rosgraph_msgs::Log::ConstPtr> rxtools::RosoutPanel::V_Log [protected]

Definition at line 260 of file rosout_panel.h.

typedef std::vector<uint32_t> rxtools::RosoutPanel::V_u32 [protected]

Definition at line 269 of file rosout_panel.h.


Constructor & Destructor Documentation

rxtools::RosoutPanel::RosoutPanel ( wxWindow *  parent,
int  id = wxID_ANY,
wxPoint  pos = wxDefaultPosition,
wxSize  size = wxDefaultSize,
int  style = wxTAB_TRAVERSAL 
)

Constructor.

Parameters:
parent The window which is the parent of this one

Definition at line 56 of file rosout_panel.cpp.

rxtools::RosoutPanel::~RosoutPanel (  ) 

Definition at line 101 of file rosout_panel.cpp.


Member Function Documentation

void rxtools::RosoutPanel::addFilter ( const RosoutFilterPtr filter,
wxWindow *  control 
) [protected]

Definition at line 310 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.

Parameters:
message The message
id The unique id of the message

Definition at line 496 of file rosout_panel.cpp.

void rxtools::RosoutPanel::clear (  ) 

Clear all messages.

Definition at line 112 of file rosout_panel.cpp.

void rxtools::RosoutPanel::clearFilters (  ) 

Definition at line 420 of file rosout_panel.cpp.

RosoutFrame * rxtools::RosoutPanel::createNewFrame (  ) 

Definition at line 182 of file rosout_panel.cpp.

RosoutTextFilterPtr rxtools::RosoutPanel::createTextFilter (  ) 

Definition at line 477 of file rosout_panel.cpp.

bool rxtools::RosoutPanel::filter ( uint32_t  id  )  const [protected]

Filter a message based on our current filter.

Parameters:
id The id of the message to filter
Returns:
True of anything in the message matches, false otherwise

Definition at line 514 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.

Parameters:
index Index of the message to return
Returns:
The message

Definition at line 501 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.

Parameters:
duration Controls how far in the past the function searches for messages
Returns:
a RosoutMessageSummary structure detailing the types of messages received.

Definition at line 703 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 670 of file rosout_panel.cpp.

void rxtools::RosoutPanel::onAddFilterPressed ( wxCommandEvent &  event  )  [protected]

Definition at line 486 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 491 of file rosout_panel.cpp.

void rxtools::RosoutPanel::onFilterChanged ( const RosoutFilter  )  [protected]

Definition at line 428 of file rosout_panel.cpp.

void rxtools::RosoutPanel::onFilterDelete ( wxCommandEvent &  event  )  [protected]

Definition at line 236 of file rosout_panel.cpp.

void rxtools::RosoutPanel::onFilterEnableChecked ( wxCommandEvent &  event  )  [protected]

Definition at line 220 of file rosout_panel.cpp.

void rxtools::RosoutPanel::onFilterMoveDown ( wxCommandEvent &  event  )  [protected]

Definition at line 274 of file rosout_panel.cpp.

void rxtools::RosoutPanel::onFilterMoveUp ( wxCommandEvent &  event  )  [protected]

Definition at line 251 of file rosout_panel.cpp.

void rxtools::RosoutPanel::onLoggerLevels ( wxCommandEvent &  event  )  [protected, virtual]

Reimplemented from rxtools::RosoutPanelBase.

Definition at line 203 of file rosout_panel.cpp.

void rxtools::RosoutPanel::onLoggerLevelsClose ( wxCloseEvent &  event  )  [protected]

Definition at line 197 of file rosout_panel.cpp.

void rxtools::RosoutPanel::onNewWindow ( wxCommandEvent &  event  )  [protected, virtual]

Reimplemented from rxtools::RosoutPanelBase.

Definition at line 192 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 678 of file rosout_panel.cpp.

void rxtools::RosoutPanel::onProcessTimer ( wxTimerEvent &  evt  )  [protected]

(wx callback) Called every 100ms so we can process new messages

Definition at line 460 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 683 of file rosout_panel.cpp.

void rxtools::RosoutPanel::popMessage (  )  [protected]

Remove The oldest message.

Definition at line 596 of file rosout_panel.cpp.

void rxtools::RosoutPanel::processMessage ( const rosgraph_msgs::Log::ConstPtr &  message  )  [protected]

Process a log message.

Parameters:
message The message to process

Definition at line 626 of file rosout_panel.cpp.

void rxtools::RosoutPanel::processMessages (  )  [protected]

Processes any messages in our message queue.

Definition at line 645 of file rosout_panel.cpp.

void rxtools::RosoutPanel::refilter (  ) 

Re-filter all messages.

Definition at line 571 of file rosout_panel.cpp.

void rxtools::RosoutPanel::removeFilter ( const RosoutFilterPtr filter  )  [protected]

Definition at line 404 of file rosout_panel.cpp.

void rxtools::RosoutPanel::resizeFiltersPane (  )  [protected]

Definition at line 380 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.

Parameters:
size The number of messages

Definition at line 694 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.

Parameters:
enabled Should we be enabled?

Definition at line 119 of file rosout_panel.cpp.

void rxtools::RosoutPanel::setMessages ( const M_IdToMessage messages  )  [protected]

Definition at line 166 of file rosout_panel.cpp.

void rxtools::RosoutPanel::setTopic ( const std::string &  topic  ) 

Set the topic to listen on for rosgraph_msgs::Log messages.

Parameters:
topic The topic name

Definition at line 152 of file rosout_panel.cpp.

void rxtools::RosoutPanel::subscribe (  )  [protected]

subscribe to our topic

Definition at line 137 of file rosout_panel.cpp.

void rxtools::RosoutPanel::unsubscribe (  )  [protected]

unsubscribe from our topic

Definition at line 147 of file rosout_panel.cpp.

void rxtools::RosoutPanel::updateFilterBackgrounds (  )  [protected]

Definition at line 292 of file rosout_panel.cpp.

void rxtools::RosoutPanel::validateOrderedMessages (  )  [protected]

Definition at line 553 of file rosout_panel.cpp.


Member Data Documentation

ros::CallbackQueue rxtools::RosoutPanel::callback_queue_ [protected]

Definition at line 276 of file rosout_panel.h.

Definition at line 284 of file rosout_panel.h.

Are we enabled?

Definition at line 255 of file rosout_panel.h.

Definition at line 280 of file rosout_panel.h.

Definition at line 288 of file rosout_panel.h.

Max number of messages to keep around. When we hit this limit, we start throwing away the oldest messages.

Definition at line 272 of file rosout_panel.h.

Counter for generating unique ids for messages.

Definition at line 265 of file rosout_panel.h.

Queue of messages we've received since the last time processMessages() was called.

Definition at line 261 of file rosout_panel.h.

Map of id->message.

Definition at line 267 of file rosout_panel.h.

Set to true when we need to refilter our messages (ie. a filter has changed).

Definition at line 273 of file rosout_panel.h.

ros::NodeHandle rxtools::RosoutPanel::nh_ [protected]

Definition at line 258 of file rosout_panel.h.

Already-filtered messages that are being displayed in the list.

Definition at line 270 of file rosout_panel.h.

bool rxtools::RosoutPanel::pause_ [protected]

Definition at line 286 of file rosout_panel.h.

Timer used to periodically process messages.

Definition at line 263 of file rosout_panel.h.

Accumulator used to gate how often we refilter.

Definition at line 274 of file rosout_panel.h.

Definition at line 282 of file rosout_panel.h.

ros::Subscriber rxtools::RosoutPanel::sub_ [protected]

Definition at line 277 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 256 of file rosout_panel.h.


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


rxtools
Author(s): Josh Faust, Rob Wheeler, Ken Conley
autogenerated on Fri Jan 11 09:52:03 2013