Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
ros::ConnectionManager Class Reference

#include <connection_manager.h>

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. More...
 
void clear (Connection::DropReason reason)
 
 ConnectionManager ()
 
uint32_t getNewConnectionID ()
 Get a new connection ID. More...
 
uint32_t getTCPPort ()
 
const TransportTCPPtrgetTCPServerTransport ()
 
uint32_t getUDPPort ()
 
const TransportUDPPtrgetUDPServerTransport ()
 
void shutdown ()
 
void start ()
 
void udprosIncomingConnection (const TransportUDPPtr &transport, Header &header)
 
 ~ConnectionManager ()
 

Static Public Member Functions

static const ConnectionManagerPtrinstance ()
 

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::signals2::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 44 of file connection_manager.h.

Constructor & Destructor Documentation

◆ ConnectionManager()

ros::ConnectionManager::ConnectionManager ( )

Definition at line 49 of file connection_manager.cpp.

◆ ~ConnectionManager()

ros::ConnectionManager::~ConnectionManager ( )

Definition at line 54 of file connection_manager.cpp.

Member Function Documentation

◆ addConnection()

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.

Parameters
Theconnection to add

Definition at line 140 of file connection_manager.cpp.

◆ clear()

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

Definition at line 103 of file connection_manager.cpp.

◆ getNewConnectionID()

uint32_t ros::ConnectionManager::getNewConnectionID ( )

Get a new connection ID.

Definition at line 133 of file connection_manager.cpp.

◆ getTCPPort()

uint32_t ros::ConnectionManager::getTCPPort ( )

Definition at line 123 of file connection_manager.cpp.

◆ getTCPServerTransport()

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

Definition at line 67 of file connection_manager.h.

◆ getUDPPort()

uint32_t ros::ConnectionManager::getUDPPort ( )

Definition at line 128 of file connection_manager.cpp.

◆ getUDPServerTransport()

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

Definition at line 68 of file connection_manager.h.

◆ instance()

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

Definition at line 43 of file connection_manager.cpp.

◆ onConnectionDropped()

void ros::ConnectionManager::onConnectionDropped ( const ConnectionPtr conn)
private

Definition at line 148 of file connection_manager.cpp.

◆ onConnectionHeaderReceived()

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

Definition at line 196 of file connection_manager.cpp.

◆ removeDroppedConnections()

void ros::ConnectionManager::removeDroppedConnections ( )
private

Definition at line 154 of file connection_manager.cpp.

◆ shutdown()

void ros::ConnectionManager::shutdown ( )

Definition at line 84 of file connection_manager.cpp.

◆ start()

void ros::ConnectionManager::start ( )

Definition at line 59 of file connection_manager.cpp.

◆ tcprosAcceptConnection()

void ros::ConnectionManager::tcprosAcceptConnection ( const TransportTCPPtr transport)
private

Definition at line 185 of file connection_manager.cpp.

◆ udprosIncomingConnection()

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

Definition at line 173 of file connection_manager.cpp.

Member Data Documentation

◆ connection_id_counter_

uint32_t ros::ConnectionManager::connection_id_counter_
private

Definition at line 94 of file connection_manager.h.

◆ connection_id_counter_mutex_

boost::mutex ros::ConnectionManager::connection_id_counter_mutex_
private

Definition at line 95 of file connection_manager.h.

◆ connections_

S_Connection ros::ConnectionManager::connections_
private

Definition at line 87 of file connection_manager.h.

◆ connections_mutex_

boost::mutex ros::ConnectionManager::connections_mutex_
private

Definition at line 89 of file connection_manager.h.

◆ dropped_connections_

V_Connection ros::ConnectionManager::dropped_connections_
private

Definition at line 88 of file connection_manager.h.

◆ dropped_connections_mutex_

boost::mutex ros::ConnectionManager::dropped_connections_mutex_
private

Definition at line 90 of file connection_manager.h.

◆ MAX_TCPROS_CONN_QUEUE

const int ros::ConnectionManager::MAX_TCPROS_CONN_QUEUE = 100
staticprivate

Definition at line 102 of file connection_manager.h.

◆ poll_conn_

boost::signals2::connection ros::ConnectionManager::poll_conn_
private

Definition at line 97 of file connection_manager.h.

◆ poll_manager_

PollManagerPtr ros::ConnectionManager::poll_manager_
private

Definition at line 85 of file connection_manager.h.

◆ tcpserver_transport_

TransportTCPPtr ros::ConnectionManager::tcpserver_transport_
private

Definition at line 99 of file connection_manager.h.

◆ udpserver_transport_

TransportUDPPtr ros::ConnectionManager::udpserver_transport_
private

Definition at line 100 of file connection_manager.h.


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


roscpp
Author(s): Morgan Quigley, Josh Faust, Brian Gerkey, Troy Straszheim, Dirk Thomas
autogenerated on Mon Feb 28 2022 23:33:27