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

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

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

Public Attributes

goby::middleware::protobuf::TransporterConfig cfg {}
 Additional metadata for this subscribe.
 
group_func_type group_func {}
 Returns the group from the message (see the full constructor)
 
subscribed_func_type subscribed_func {}
 Called when a subscription request reaches a publisher.
 
subscribe_expired_func_type subscribe_expired_func {}
 Called when a subscription request expires without reaching any publishers.
 
set_link_data_func_type set_link_data_func {}
 Sets link data (e.g. the sender) in received messages.
 
bool group_in_message {true}
 

Detailed Description

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

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

goby::middleware::Subscriber<Nav> subscriber({.cfg = cfg, .group_func = nav_group});
Class that holds additional metadata and callback functions related to a subscription (and is optiona...
Definition subscriber.h:37
goby::middleware::protobuf::TransporterConfig cfg
Additional metadata for this subscribe.
Definition subscriber.h:85

Definition at line 82 of file subscriber.h.

Member Data Documentation

◆ cfg

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

Additional metadata for this subscribe.

Definition at line 85 of file subscriber.h.

◆ group_func

template<typename Data >
group_func_type goby::middleware::Subscriber< Data >::Options::group_func {}

Returns the group from the message (see the full constructor)

Definition at line 87 of file subscriber.h.

◆ group_in_message

template<typename Data >
bool goby::middleware::Subscriber< 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 group_func is needed for a non-broadcast group, and every received message of this type is taken to be in the subscribed group.

Definition at line 97 of file subscriber.h.

◆ set_link_data_func

template<typename Data >
set_link_data_func_type goby::middleware::Subscriber< Data >::Options::set_link_data_func {}

Sets link data (e.g. the sender) in received messages.

Definition at line 93 of file subscriber.h.

◆ subscribe_expired_func

template<typename Data >
subscribe_expired_func_type goby::middleware::Subscriber< Data >::Options::subscribe_expired_func {}

Called when a subscription request expires without reaching any publishers.

Definition at line 91 of file subscriber.h.

◆ subscribed_func

template<typename Data >
subscribed_func_type goby::middleware::Subscriber< Data >::Options::subscribed_func {}

Called when a subscription request reaches a publisher.

Definition at line 89 of file subscriber.h.


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