ros::ConnectionManager Class Reference

#include <connection_manager.h>

List of all members.

Public Member Functions

void addConnection (const ConnectionPtr &connection)
 Add a connection to be tracked by the node. Will automatically remove them if they've been dropped, but from inside the ros thread.
void clear (Connection::DropReason reason)
 ConnectionManager ()
uint32_t getNewConnectionID ()
 Get a new connection ID.
uint32_t getTCPPort ()
const TransportTCPPtr & getTCPServerTransport ()
uint32_t getUDPPort ()
const TransportUDPPtr & getUDPServerTransport ()
void shutdown ()
void start ()
void udprosIncomingConnection (const TransportUDPPtr &transport, Header &header)
 ~ConnectionManager ()

Static Public Member Functions

static const ConnectionManagerPtr & instance ()

Private Member Functions

void onConnectionDropped (const ConnectionPtr &conn)
bool onConnectionHeaderReceived (const ConnectionPtr &conn, const Header &header)
void removeDroppedConnections ()
void tcprosAcceptConnection (const TransportTCPPtr &transport)

Private Attributes

uint32_t connection_id_counter_
boost::mutex connection_id_counter_mutex_
S_Connection connections_
boost::mutex connections_mutex_
V_Connection dropped_connections_
boost::mutex dropped_connections_mutex_
boost::signals::connection poll_conn_
PollManagerPtr poll_manager_
TransportTCPPtr tcpserver_transport_
TransportUDPPtr udpserver_transport_

Static Private Attributes

static const int MAX_TCPROS_CONN_QUEUE = 100

Detailed Description

Definition at line 38 of file connection_manager.h.

Constructor & Destructor Documentation

ros::ConnectionManager::ConnectionManager (  ) 

Definition at line 59 of file connection_manager.cpp.

ros::ConnectionManager::~ConnectionManager (  ) 

Definition at line 64 of file connection_manager.cpp.

Member Function Documentation

void ros::ConnectionManager::addConnection ( const ConnectionPtr &  connection  ) 

Add a connection to be tracked by the node. Will automatically remove them if they've been dropped, but from inside the ros thread.

The connection to add

Definition at line 150 of file connection_manager.cpp.

void ros::ConnectionManager::clear ( Connection::DropReason  reason  ) 

Definition at line 113 of file connection_manager.cpp.

uint32_t ros::ConnectionManager::getNewConnectionID (  ) 

Get a new connection ID.

Definition at line 143 of file connection_manager.cpp.

uint32_t ros::ConnectionManager::getTCPPort (  ) 

Definition at line 133 of file connection_manager.cpp.

const TransportTCPPtr& ros::ConnectionManager::getTCPServerTransport (  )  [inline]

Definition at line 61 of file connection_manager.h.

uint32_t ros::ConnectionManager::getUDPPort (  ) 

Definition at line 138 of file connection_manager.cpp.

const TransportUDPPtr& ros::ConnectionManager::getUDPServerTransport (  )  [inline]

Definition at line 62 of file connection_manager.h.

const ConnectionManagerPtr & ros::ConnectionManager::instance (  )  [static]

Definition at line 45 of file connection_manager.cpp.

void ros::ConnectionManager::onConnectionDropped ( const ConnectionPtr &  conn  )  [private]

Definition at line 158 of file connection_manager.cpp.

bool ros::ConnectionManager::onConnectionHeaderReceived ( const ConnectionPtr &  conn,
const Header header 
) [private]

Definition at line 206 of file connection_manager.cpp.

void ros::ConnectionManager::removeDroppedConnections (  )  [private]

Definition at line 164 of file connection_manager.cpp.

void ros::ConnectionManager::shutdown (  ) 

Definition at line 94 of file connection_manager.cpp.

void ros::ConnectionManager::start (  ) 

Definition at line 69 of file connection_manager.cpp.

void ros::ConnectionManager::tcprosAcceptConnection ( const TransportTCPPtr &  transport  )  [private]

Definition at line 195 of file connection_manager.cpp.

void ros::ConnectionManager::udprosIncomingConnection ( const TransportUDPPtr &  transport,
Header header 

Definition at line 183 of file connection_manager.cpp.

Member Data Documentation

Definition at line 88 of file connection_manager.h.

Definition at line 89 of file connection_manager.h.

S_Connection ros::ConnectionManager::connections_ [private]

Definition at line 81 of file connection_manager.h.

Definition at line 83 of file connection_manager.h.

Definition at line 82 of file connection_manager.h.

Definition at line 84 of file connection_manager.h.

const int ros::ConnectionManager::MAX_TCPROS_CONN_QUEUE = 100 [static, private]

Definition at line 96 of file connection_manager.h.

boost::signals::connection ros::ConnectionManager::poll_conn_ [private]

Definition at line 91 of file connection_manager.h.

PollManagerPtr ros::ConnectionManager::poll_manager_ [private]

Definition at line 79 of file connection_manager.h.

Definition at line 93 of file connection_manager.h.

Definition at line 94 of file connection_manager.h.

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

Author(s): Morgan Quigley mquigley@cs.stanford.edu, Josh Faust jfaust@willowgarage.com, Brian Gerkey gerkey@willowgarage.com, Troy Straszheim straszheim@willowgarage.com
autogenerated on Sat Mar 2 13:23:31 2013