Goby3 3.7.0
2026.11.12
Loading...
Searching...
No Matches
goby::middleware::Publisher< Data >::Options Struct Reference

Everything a Publisher can be given, named, so that it can be initialized with C++20 designated initializers, e.g. More...

#include <goby/middleware/transport/publisher.h>

Public Attributes

goby::middleware::protobuf::TransporterConfig cfg {}
 Additional metadata for all publish calls for which this Publisher is provided.
 
set_group_func_type set_group_func {}
 Sets the group in the message (see the full constructor)
 
acked_func_type acked_func {}
 Called when data are acknowledged by subscribers (sets ack_required)
 
expired_func_type expired_func {}
 Called when data expire without reaching any subscribers.
 
bool group_in_message {true}
 

Detailed Description

template<typename Data>
struct goby::middleware::Publisher< Data >::Options

Everything a Publisher can be given, named, so that it can be initialized with C++20 designated initializers, e.g.

goby::middleware::Publisher<Nav> publisher({.cfg = cfg, .acked_func = on_ack});
Class that holds additional metadata and callback functions related to a publication (and is optional...
Definition publisher.h:40
goby::middleware::protobuf::TransporterConfig cfg
Additional metadata for all publish calls for which this Publisher is provided.
Definition publisher.h:86

Definition at line 83 of file publisher.h.

Member Data Documentation

◆ acked_func

template<typename Data >
acked_func_type goby::middleware::Publisher< Data >::Options::acked_func {}

Called when data are acknowledged by subscribers (sets ack_required)

Definition at line 90 of file publisher.h.

◆ cfg

template<typename Data >
goby::middleware::protobuf::TransporterConfig goby::middleware::Publisher< Data >::Options::cfg {}

Additional metadata for all publish calls for which this Publisher is provided.

Definition at line 86 of file publisher.h.

◆ expired_func

template<typename Data >
expired_func_type goby::middleware::Publisher< Data >::Options::expired_func {}

Called when data expire without reaching any subscribers.

Definition at line 92 of file publisher.h.

◆ group_in_message

template<typename Data >
bool goby::middleware::Publisher< Data >::Options::group_in_message {true}

False when the group isn't stored in the message, e.g. when every message of this type uses the same group. Then no set_group_func is needed for a non-broadcast group.

Definition at line 95 of file publisher.h.

◆ set_group_func

template<typename Data >
set_group_func_type goby::middleware::Publisher< Data >::Options::set_group_func {}

Sets the group in the message (see the full constructor)

Definition at line 88 of file publisher.h.


The documentation for this struct was generated from the following file: