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

#include <rtt_rostopic_ros_publish_activity.hpp>

Inheritance diagram for rtt_roscomm::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 rtt_rostopic_ros_publish_activity.hpp.


Member Typedef Documentation

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

Definition at line 79 of file rtt_rostopic_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 78 of file rtt_rostopic_ros_publish_activity.hpp.

Reimplemented from RTT::base::ActivityInterface.

Definition at line 69 of file rtt_rostopic_ros_publish_activity.hpp.

Definition at line 71 of file rtt_rostopic_ros_publish_activity.hpp.


Constructor & Destructor Documentation

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

Definition at line 38 of file rtt_rostopic_ros_publish_activity.cpp.

Definition at line 72 of file rtt_rostopic_ros_publish_activity.cpp.


Member Function Documentation

Definition at line 62 of file rtt_rostopic_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 rtt_rostopic_ros_publish_activity.cpp.

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

Reimplemented from RTT::Activity.

Definition at line 45 of file rtt_rostopic_ros_publish_activity.cpp.

Definition at line 67 of file rtt_rostopic_ros_publish_activity.cpp.


Member Data Documentation

Definition at line 80 of file rtt_rostopic_ros_publish_activity.hpp.

Definition at line 81 of file rtt_rostopic_ros_publish_activity.hpp.

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

Definition at line 73 of file rtt_rostopic_ros_publish_activity.hpp.


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


rtt_roscomm
Author(s): Ruben Smits, Jonathan Bohren
autogenerated on Mon Apr 3 2017 03:34:43