Go to the documentation of this file.
24 #ifndef GOBY_MIDDLEWARE_TRANSPORT_PUBLISHER_H
25 #define GOBY_MIDDLEWARE_TRANSPORT_PUBLISHER_H
39 template <
typename Data>
class Publisher
60 set_group_func_(set_group_func),
87 set_group_func_(data,
group);
The global namespace for the Goby project.
Publisher(const goby::middleware::protobuf::TransporterConfig &cfg=goby::middleware::protobuf::TransporterConfig(), set_group_func_type set_group_func=set_group_func_type(), acked_func_type acked_func=acked_func_type(), expired_func_type expired_func=expired_func_type())
Construct a Publisher with all available metadata and callbacks.
std::function< void(const intervehicle::protobuf::Subscription &, const intervehicle::protobuf::ExpireData &)> expired_func_type
goby::util::logger::GroupSetter group(std::string n)
Class that holds additional metadata and callback functions related to a publication (and is optional...
std::function< void(intervehicle::protobuf::Subscription &, const Group &)> set_group_func_type
acked_func_type acked_func() const
Returns the acked data callback (or an empty function if none is set)
void set_group(Data &data, const Group &group) const
Sets the group using the set_group_func. Only intended to be called by the various transporters.
const ::goby::middleware::intervehicle::protobuf::TransporterConfig & intervehicle() const
::goby::middleware::intervehicle::protobuf::TransporterConfig * mutable_intervehicle()
std::function< void(const intervehicle::protobuf::Subscription &, const intervehicle::protobuf::AckData &)> acked_func_type
const goby::middleware::protobuf::TransporterConfig & cfg() const
Returns the metadata configuration.
Publisher(const goby::middleware::protobuf::TransporterConfig &cfg, acked_func_type acked_func, expired_func_type expired_func=expired_func_type())
Construct a Publisher but without the set_group_func callback.
Class for grouping publications in the Goby middleware. Analogous to "topics" in ROS,...
bool has_ack_required() const
bool has_set_group_func() const
const ::goby::acomms::protobuf::DynamicBufferConfig & buffer() const
void set_ack_required(bool value)
expired_func_type expired_func() const
Returns the expired data callback (or an empty function if none is set)
::goby::acomms::protobuf::DynamicBufferConfig * mutable_buffer()