Handles a connection to a single publisher on a given topic. Receives messages from a publisher and hands them off to its parent Subscription. More...
#include <transport_publisher_link.h>
Public Member Functions | |
virtual void | drop () |
const ConnectionPtr & | getConnection () |
virtual std::string | getTransportType () |
bool | initialize (const ConnectionPtr &connection) |
TransportPublisherLink (const SubscriptionPtr &parent, const std::string &xmlrpc_uri, const TransportHints &transport_hints) | |
virtual | ~TransportPublisherLink () |
Private Member Functions | |
virtual void | handleMessage (const SerializedMessage &m, bool ser, bool nocopy) |
Handles handing off a received message to the subscription, where it will be deserialized and called back. | |
void | onConnectionDropped (const ConnectionPtr &conn, Connection::DropReason reason) |
bool | onHeaderReceived (const ConnectionPtr &conn, const Header &header) |
void | onHeaderWritten (const ConnectionPtr &conn) |
void | onMessage (const ConnectionPtr &conn, const boost::shared_array< uint8_t > &buffer, uint32_t size, bool success) |
void | onMessageLength (const ConnectionPtr &conn, const boost::shared_array< uint8_t > &buffer, uint32_t size, bool success) |
void | onRetryTimer (const ros::WallTimerEvent &) |
Private Attributes | |
ConnectionPtr | connection_ |
bool | dropping_ |
bool | needs_retry_ |
WallTime | next_retry_ |
WallDuration | retry_period_ |
int32_t | retry_timer_handle_ |
Handles a connection to a single publisher on a given topic. Receives messages from a publisher and hands them off to its parent Subscription.
Definition at line 50 of file transport_publisher_link.h.
ros::TransportPublisherLink::TransportPublisherLink | ( | const SubscriptionPtr & | parent, | |
const std::string & | xmlrpc_uri, | |||
const TransportHints & | transport_hints | |||
) |
Definition at line 56 of file transport_publisher_link.cpp.
ros::TransportPublisherLink::~TransportPublisherLink | ( | ) | [virtual] |
Definition at line 64 of file transport_publisher_link.cpp.
void ros::TransportPublisherLink::drop | ( | ) | [virtual] |
Implements ros::PublisherLink.
Definition at line 103 of file transport_publisher_link.cpp.
const ConnectionPtr& ros::TransportPublisherLink::getConnection | ( | ) | [inline] |
Definition at line 59 of file transport_publisher_link.h.
std::string ros::TransportPublisherLink::getTransportType | ( | ) | [virtual] |
Implements ros::PublisherLink.
Definition at line 294 of file transport_publisher_link.cpp.
void ros::TransportPublisherLink::handleMessage | ( | const SerializedMessage & | m, | |
bool | ser, | |||
bool | nocopy | |||
) | [private, virtual] |
Handles handing off a received message to the subscription, where it will be deserialized and called back.
Implements ros::PublisherLink.
Definition at line 281 of file transport_publisher_link.cpp.
bool ros::TransportPublisherLink::initialize | ( | const ConnectionPtr & | connection | ) |
Definition at line 76 of file transport_publisher_link.cpp.
void ros::TransportPublisherLink::onConnectionDropped | ( | const ConnectionPtr & | conn, | |
Connection::DropReason | reason | |||
) | [private] |
Definition at line 241 of file transport_publisher_link.cpp.
bool ros::TransportPublisherLink::onHeaderReceived | ( | const ConnectionPtr & | conn, | |
const Header & | header | |||
) | [private] |
Definition at line 119 of file transport_publisher_link.cpp.
void ros::TransportPublisherLink::onHeaderWritten | ( | const ConnectionPtr & | conn | ) | [private] |
Definition at line 114 of file transport_publisher_link.cpp.
void ros::TransportPublisherLink::onMessage | ( | const ConnectionPtr & | conn, | |
const boost::shared_array< uint8_t > & | buffer, | |||
uint32_t | size, | |||
bool | success | |||
) | [private] |
Definition at line 173 of file transport_publisher_link.cpp.
void ros::TransportPublisherLink::onMessageLength | ( | const ConnectionPtr & | conn, | |
const boost::shared_array< uint8_t > & | buffer, | |||
uint32_t | size, | |||
bool | success | |||
) | [private] |
Definition at line 140 of file transport_publisher_link.cpp.
void ros::TransportPublisherLink::onRetryTimer | ( | const ros::WallTimerEvent & | ) | [private] |
Definition at line 191 of file transport_publisher_link.cpp.
Definition at line 79 of file transport_publisher_link.h.
bool ros::TransportPublisherLink::dropping_ [private] |
Definition at line 85 of file transport_publisher_link.h.
bool ros::TransportPublisherLink::needs_retry_ [private] |
Definition at line 82 of file transport_publisher_link.h.
WallTime ros::TransportPublisherLink::next_retry_ [private] |
Definition at line 84 of file transport_publisher_link.h.
WallDuration ros::TransportPublisherLink::retry_period_ [private] |
Definition at line 83 of file transport_publisher_link.h.
int32_t ros::TransportPublisherLink::retry_timer_handle_ [private] |
Definition at line 81 of file transport_publisher_link.h.