Goby v2
Public Member Functions | List of all members
goby::pb::StaticProtobufNode Class Reference
Inheritance diagram for goby::pb::StaticProtobufNode:
Inheritance graph
[legend]

Public Member Functions

 StaticProtobufNode (common::ZeroMQService *service)
 
template<typename ProtoBufMessage >
void subscribe (int socket_id, boost::function< void(const ProtoBufMessage &)> handler=boost::function< void(const ProtoBufMessage &)>(), const std::string &group="")
 Subscribe to a message (of any type derived from google::protobuf::Message) More...
 
template<typename ProtoBufMessage , class C >
void subscribe (int socket_id, void(C::*mem_func)(const ProtoBufMessage &), C *obj, const std::string &group="")
 
template<typename ProtoBufMessage >
void on_receipt (int socket_id, boost::function< void(const ProtoBufMessage &)> handler=boost::function< void(const ProtoBufMessage &)>(), const std::string &group="")
 
template<typename ProtoBufMessage , class C >
void on_receipt (int socket_id, void(C::*mem_func)(const ProtoBufMessage &), C *obj, const std::string &group="")
 
void send (const google::protobuf::Message &msg, int socket_id, const std::string &group="")
 
- Public Member Functions inherited from goby::common::NodeInterface< google::protobuf::Message >
ZeroMQServicezeromq_service ()
 

Additional Inherited Members

- Protected Member Functions inherited from goby::pb::ProtobufNode
 ProtobufNode (common::ZeroMQService *service)
 
void subscribe (const std::string &identifier, int socket_id)
 
void subscribe (const std::string &protobuf_type_name, int socket_id, const std::string &group)
 
- Protected Member Functions inherited from goby::common::NodeInterface< google::protobuf::Message >
 NodeInterface (ZeroMQService *service)
 

Detailed Description

Definition at line 63 of file protobuf_node.h.

Member Function Documentation

template<typename ProtoBufMessage >
void goby::pb::StaticProtobufNode::subscribe ( int  socket_id,
boost::function< void(const ProtoBufMessage &)>  handler = boost::function<void(const ProtoBufMessage&)>(),
const std::string &  group = "" 
)

Subscribe to a message (of any type derived from google::protobuf::Message)

Parameters
socket_idUnique id assigned to the SUBSCRIBE socket that you want to subscribe to
handlerFunction object to be called as soon as possible upon receipt of a message of this type. The signature of handler must match: void handler(const ProtoBufMessage& msg). if handler is omitted, no handler is called and only the newest message buffer is updated upon message receipt (for calls to newest<ProtoBufMessage>())

Definition at line 194 of file protobuf_node.h.


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