28 #ifndef ROSCPP_SUBSCRIBER_LINK_H
29 #define ROSCPP_SUBSCRIBER_LINK_H
31 #include "ros/common.h"
33 #include <boost/thread/mutex.hpp>
34 #include <boost/shared_array.hpp>
35 #include <boost/weak_ptr.hpp>
36 #include <boost/enable_shared_from_this.hpp>
50 class ROSCPP_DECL
SubscriberLink :
public boost::enable_shared_from_this<SubscriberLink>
58 : bytes_sent_(0), message_data_sent_(0), messages_sent_(0) { }
64 const std::string&
getTopic()
const {
return topic_; }
72 virtual void enqueueMessage(
const SerializedMessage& m,
bool ser,
bool nocopy) = 0;
74 virtual void drop() = 0;
76 virtual std::string getTransportType() = 0;
77 virtual std::string getTransportInfo() = 0;
80 virtual void getPublishTypes(
bool& ser,
bool& nocopy,
const std::type_info& ti) { (void)ti; ser =
true; nocopy =
false; }
82 const std::string& getMD5Sum();
83 const std::string& getDataType();
84 const std::string& getMessageDefinition();
87 bool verifyDatatype(
const std::string &datatype);
98 #endif // ROSCPP_SUBSCRIBER_LINK_H