rviz::InteractiveMarkerClient Class Reference

#include <interactive_marker_client.h>

List of all members.


struct  PublisherContext

Public Member Functions

void clear ()
void flagLateConnections ()
 InteractiveMarkerClient (InteractiveMarkerReceiver *receiver)
bool isPublisherListEmpty ()
void processMarkerInit (const visualization_msgs::InteractiveMarkerInit::ConstPtr &marker_init)
void processMarkerUpdate (const visualization_msgs::InteractiveMarkerUpdate::ConstPtr &marker_update)
void reinit ()
void unsubscribedFromInit ()

Private Types

typedef std::map< uint64_t,
visualization_msgs::InteractiveMarkerUpdate::ConstPtr > 
typedef std::map< std::string,
typedef boost::shared_ptr
< PublisherContext

Private Member Functions

void applyUpdate (const visualization_msgs::InteractiveMarkerUpdate::ConstPtr &marker_update, PublisherContextPtr &context)
void maybeUnsubscribeFromInit ()
void playbackUpdateQueue (PublisherContextPtr &context)

Private Attributes

bool cleared_
M_PublisherContext publisher_contexts_
bool subscribed_to_init_

Detailed Description

Client for interactive markers sent from one or more interactive marker servers. Implements the logic of init and update sequencing. To actually display or use the received markers, implement a subclass of InteractiveMarkerReceiver and pass that to the constructor.

TODO: think about integrating topic subscription into this class, it might simplify some of the between-class logic. (hersh)

Definition at line 100 of file interactive_marker_client.h.

Member Typedef Documentation

typedef std::map<uint64_t, visualization_msgs::InteractiveMarkerUpdate::ConstPtr> rviz::InteractiveMarkerClient::M_InteractiveMarkerUpdate [private]

Definition at line 156 of file interactive_marker_client.h.

Definition at line 185 of file interactive_marker_client.h.

Definition at line 183 of file interactive_marker_client.h.

Constructor & Destructor Documentation

rviz::InteractiveMarkerClient::InteractiveMarkerClient ( InteractiveMarkerReceiver receiver  ) 


receiver pointer to the consumer of interactive marker data. Must not be NULL.

Definition at line 101 of file interactive_marker_client.cpp.

Member Function Documentation

void rviz::InteractiveMarkerClient::applyUpdate ( const visualization_msgs::InteractiveMarkerUpdate::ConstPtr &  marker_update,
PublisherContextPtr context 
) [private]

Definition at line 325 of file interactive_marker_client.cpp.

void rviz::InteractiveMarkerClient::clear (  ) 

Clear the list of publisher contexts and call reinit().

Definition at line 280 of file interactive_marker_client.cpp.

void rviz::InteractiveMarkerClient::flagLateConnections (  ) 

Compare the current time with the last_update_time of each publisher context and call setStatusWarn() for ones which are late.

Definition at line 375 of file interactive_marker_client.cpp.

bool rviz::InteractiveMarkerClient::isPublisherListEmpty (  ) 

Return true if we haven't seen any publishers since the last reinit().

Definition at line 370 of file interactive_marker_client.cpp.

void rviz::InteractiveMarkerClient::maybeUnsubscribeFromInit (  )  [private]

Definition at line 312 of file interactive_marker_client.cpp.

void rviz::InteractiveMarkerClient::playbackUpdateQueue ( PublisherContextPtr context  )  [private]

Definition at line 188 of file interactive_marker_client.cpp.

void rviz::InteractiveMarkerClient::processMarkerInit ( const visualization_msgs::InteractiveMarkerInit::ConstPtr &  marker_init  ) 

ROS callback notifying us of an init message (full update with all data). Send this to NodeHandle::subscribe() for the init topic.

Definition at line 109 of file interactive_marker_client.cpp.

void rviz::InteractiveMarkerClient::processMarkerUpdate ( const visualization_msgs::InteractiveMarkerUpdate::ConstPtr &  marker_update  ) 

ROS callback notifying us of a new marker. Send this to NodeHandle::subscribe() for the update topic.

Definition at line 214 of file interactive_marker_client.cpp.

void rviz::InteractiveMarkerClient::reinit (  ) 

Reinitialize. Call this when topics have been unsubscribed and are now being subscribed again. Calls InteractiveMarkerReceiver::subscribeToInit().

Definition at line 291 of file interactive_marker_client.cpp.

void rviz::InteractiveMarkerClient::unsubscribedFromInit (  ) 

If the user of the InteractiveMarkerClient unsubscribes from the init topic on its own, the client needs to be told. Call this function to do so.

Definition at line 286 of file interactive_marker_client.cpp.

Member Data Documentation

Definition at line 190 of file interactive_marker_client.h.

Definition at line 186 of file interactive_marker_client.h.

Definition at line 154 of file interactive_marker_client.h.

Definition at line 195 of file interactive_marker_client.h.

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

Author(s): Dave Hershberger, Josh Faust
autogenerated on Wed Jun 6 11:25:47 2012