Public Types | Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Private Attributes | Static Private Attributes
ros_integration::RosPublishActivity Class Reference

#include <ros_publish_activity.hpp>

Inheritance diagram for ros_integration::RosPublishActivity:
Inheritance graph
[legend]

List of all members.

Public Types

typedef boost::shared_ptr
< RosPublishActivity
shared_ptr

Public Member Functions

void addPublisher (RosPublisher *pub)
void removePublisher (RosPublisher *pub)
 ~RosPublishActivity ()

Static Public Member Functions

static shared_ptr Instance ()

Private Types

typedef Publishers::iterator iterator
typedef std::set< RosPublisher * > Publishers
typedef boost::weak_ptr
< RosPublishActivity
weak_ptr

Private Member Functions

void loop ()
 RosPublishActivity (const std::string &name)

Private Attributes

Publishers publishers
RTT::os::Mutex publishers_lock

Static Private Attributes

static weak_ptr ros_pub_act
 This pointer may not be refcounted since it would prevent cleanup.

Detailed Description

A process wide thread that handles all publishing of ROS topics of the current process. There is no strong reason why only one publisher should exist, in later implementations, one publisher thread per channel may exist as well. See the usage recommendations for Instance()

Definition at line 66 of file ros_publish_activity.hpp.


Member Typedef Documentation

typedef Publishers::iterator ros_integration::RosPublishActivity::iterator [private]

Definition at line 78 of file ros_publish_activity.hpp.

A set keeping track of all publishers in the current process. It must be guarded by the mutex since insertion/removal happens concurrently.

Definition at line 77 of file ros_publish_activity.hpp.

Reimplemented from RTT::base::ActivityInterface.

Definition at line 68 of file ros_publish_activity.hpp.

Definition at line 70 of file ros_publish_activity.hpp.


Constructor & Destructor Documentation

ros_integration::RosPublishActivity::RosPublishActivity ( const std::string &  name) [private]

Definition at line 38 of file ros_publish_activity.cpp.

Definition at line 72 of file ros_publish_activity.cpp.


Member Function Documentation

Definition at line 62 of file ros_publish_activity.cpp.

Returns the single instance of the RosPublisher. This function is not thread-safe when it creates the RosPublisher object. Therefor, it is advised to cache the object which Intance() returns such that, in the unlikely event that two publishers exist, you consistently keep using the same instance, which is fine then.

Definition at line 52 of file ros_publish_activity.cpp.

void ros_integration::RosPublishActivity::loop ( ) [private, virtual]

Reimplemented from RTT::Activity.

Definition at line 45 of file ros_publish_activity.cpp.

Definition at line 67 of file ros_publish_activity.cpp.


Member Data Documentation

Definition at line 79 of file ros_publish_activity.hpp.

Definition at line 80 of file ros_publish_activity.hpp.

This pointer may not be refcounted since it would prevent cleanup.

Definition at line 72 of file ros_publish_activity.hpp.


The documentation for this class was generated from the following files:


rtt_rosnode
Author(s): Ruben Smits, ruben.smits@mech.kuleuven.be
autogenerated on Mon Oct 6 2014 07:24:21