class Subscriber
Declaration
template <typename T>
class Subscriber : public SubscriberBase { /* full declaration omitted */ };Description
Deserializes messages of type T received on a topic and passes them to a callback. Created by Communication::subscribe().
Declared at: robot_comm/include/robot_comm/Subscriber.h:14
Inherits from: SubscriberBase
Templates
- T
Member Variables
- private std::shared_ptr<ISerializer> serializer_
- private robot_comm::Subscriber::Callback callback_
Method Overview
- public Subscriber<T>(const std::string & topic, const std::shared_ptr<ISerializer> & serializer, const robot_comm::Subscriber::Callback & cb)
- public void receive(const robot_comm::ByteBuffer & payload)
Inherited from SubscriberBase:
Methods
¶Subscriber<T>(
const std::string& topic,
const std::shared_ptr<ISerializer>&
serializer,
const robot_comm::Subscriber::Callback& cb)
Subscriber<T>(
const std::string& topic,
const std::shared_ptr<ISerializer>&
serializer,
const robot_comm::Subscriber::Callback& cb)Declared at: robot_comm/include/robot_comm/Subscriber.h:20
Parameters
- const std::string& topic
- const std::shared_ptr<ISerializer>& serializer
- const robot_comm::Subscriber::Callback& cb
¶void receive(
const robot_comm::ByteBuffer& payload)
void receive(
const robot_comm::ByteBuffer& payload)Declared at: robot_comm/include/robot_comm/Subscriber.h:25
Parameters
- const robot_comm::ByteBuffer& payload