$search

rviz::InteractiveMarkerClient Class Reference

#include <interactive_marker_client.h>

List of all members.

Classes

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
M_InteractiveMarkerUpdate
typedef std::map< std::string,
PublisherContextPtr
M_PublisherContext
typedef boost::shared_ptr
< PublisherContext
PublisherContextPtr

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_
InteractiveMarkerReceiverreceiver_
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

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  ) 

Constructor.

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

Definition at line 98 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 322 of file interactive_marker_client.cpp.

void rviz::InteractiveMarkerClient::clear (  ) 

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

Definition at line 277 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 372 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 367 of file interactive_marker_client.cpp.

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

Definition at line 309 of file interactive_marker_client.cpp.

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

Definition at line 185 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 106 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 211 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 288 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 283 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


rviz
Author(s): Josh Faust, Dave Hershberger
autogenerated on Sat Mar 2 14:17:35 2013