Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
roswrap::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_
 
std::mutex connection_id_counter_mutex_
 
S_Connection connections_
 
std::mutex connections_mutex_
 
V_Connection dropped_connections_
 
std::mutex dropped_connections_mutex_
 
boost::signals2::connection poll_conn_
 
PollManagerPtr poll_manager_
 
TransportTCPPtr tcpserver_transport_
 
TransportUDPPtr udpserver_transport_
 

Static Private Attributes

const static int MAX_TCPROS_CONN_QUEUE = 100
 

Detailed Description

Definition at line 45 of file connection_manager.h.

Constructor & Destructor Documentation

◆ ConnectionManager()

roswrap::ConnectionManager::ConnectionManager ( )

◆ ~ConnectionManager()

roswrap::ConnectionManager::~ConnectionManager ( )

Member Function Documentation

◆ addConnection()

void roswrap::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

◆ clear()

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

◆ getNewConnectionID()

uint32_t roswrap::ConnectionManager::getNewConnectionID ( )

Get a new connection ID.

◆ getTCPPort()

uint32_t roswrap::ConnectionManager::getTCPPort ( )

◆ getTCPServerTransport()

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

Definition at line 68 of file connection_manager.h.

◆ getUDPPort()

uint32_t roswrap::ConnectionManager::getUDPPort ( )

◆ getUDPServerTransport()

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

Definition at line 69 of file connection_manager.h.

◆ instance()

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

◆ onConnectionDropped()

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

◆ onConnectionHeaderReceived()

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

◆ removeDroppedConnections()

void roswrap::ConnectionManager::removeDroppedConnections ( )
private

◆ shutdown()

void roswrap::ConnectionManager::shutdown ( )

◆ start()

void roswrap::ConnectionManager::start ( )

◆ tcprosAcceptConnection()

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

◆ udprosIncomingConnection()

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

Member Data Documentation

◆ connection_id_counter_

uint32_t roswrap::ConnectionManager::connection_id_counter_
private

Definition at line 95 of file connection_manager.h.

◆ connection_id_counter_mutex_

std::mutex roswrap::ConnectionManager::connection_id_counter_mutex_
private

Definition at line 96 of file connection_manager.h.

◆ connections_

S_Connection roswrap::ConnectionManager::connections_
private

Definition at line 88 of file connection_manager.h.

◆ connections_mutex_

std::mutex roswrap::ConnectionManager::connections_mutex_
private

Definition at line 90 of file connection_manager.h.

◆ dropped_connections_

V_Connection roswrap::ConnectionManager::dropped_connections_
private

Definition at line 89 of file connection_manager.h.

◆ dropped_connections_mutex_

std::mutex roswrap::ConnectionManager::dropped_connections_mutex_
private

Definition at line 91 of file connection_manager.h.

◆ MAX_TCPROS_CONN_QUEUE

const static int roswrap::ConnectionManager::MAX_TCPROS_CONN_QUEUE = 100
staticprivate

Definition at line 103 of file connection_manager.h.

◆ poll_conn_

boost::signals2::connection roswrap::ConnectionManager::poll_conn_
private

Definition at line 98 of file connection_manager.h.

◆ poll_manager_

PollManagerPtr roswrap::ConnectionManager::poll_manager_
private

Definition at line 86 of file connection_manager.h.

◆ tcpserver_transport_

TransportTCPPtr roswrap::ConnectionManager::tcpserver_transport_
private

Definition at line 100 of file connection_manager.h.

◆ udpserver_transport_

TransportUDPPtr roswrap::ConnectionManager::udpserver_transport_
private

Definition at line 101 of file connection_manager.h.


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


sick_scan_xd
Author(s): Michael Lehning , Jochen Sprickerhof , Martin Günther
autogenerated on Fri Oct 25 2024 02:47:15