Goby3 3.7.0
2026.11.12
Loading...
Searching...
No Matches
goby::middleware::detail Namespace Reference

Classes

struct  DataProtection
 
struct  DCCLSerializerParserHelperBase
 Wraps a dccl::Codec in a thread-safe way to make it usable by SerializerParserHelper. More...
 
struct  implementation_traits
 Maps an ImplementationTag to the portal that implements it, so that generic code can be written against a tag alone. More...
 
struct  implementation_traits< goby::udpm::detail::InterModuleTag >
 
struct  implementation_traits< goby::udpm::detail::InterProcessTag >
 
struct  implementation_traits< goby::zenoh::detail::InterModuleTag >
 
struct  implementation_traits< goby::zeromq::detail::InterModuleTag >
 
struct  primitive_type
 
struct  primitive_type< std::shared_ptr< const T > >
 
struct  primitive_type< std::shared_ptr< T > >
 
class  SubscriptionStore
 Storage class for a specific interthread subscription (and related data). Used by InterThreadTransporter. More...
 
class  SubscriptionStoreBase
 Base class for interthread subscription information. Non-template so it can be stored in a single container. Used by InterThreadTransporter. More...
 
struct  ThreadTypeSelector
 Selects which constructor to use based on whether the thread is launched with an index or not (that is, index == -1), and with a configuration object or not. Not directly called by user code. More...
 
struct  ThreadTypeSelector< ThreadType, ThreadConfig, false, false >
 ThreadTypeSelector instantiation for calling a constructor without an index parameter ora configuration value, e.g. "MyThread()". More...
 
struct  ThreadTypeSelector< ThreadType, ThreadConfig, false, true >
 ThreadTypeSelector instantiation for calling a constructor without an index parameter but with a configuration value, e.g. "MyThread(const MyConfig& cfg)". More...
 
struct  ThreadTypeSelector< ThreadType, ThreadConfig, true, false >
 ThreadTypeSelector instantiation for calling a constructor with an index parameter and without a configuration value, e.g. "MyThread(int index)". More...
 
struct  ThreadTypeSelector< ThreadType, ThreadConfig, true, true >
 ThreadTypeSelector instantiation for calling a constructor with an index parameter and a configuration value, e.g. "MyThread(const MyConfig& cfg, int index)". More...
 

Typedefs

template<typename T >
using first_argument = decltype(first_argument_helper(std::declval< T >()))
 

Functions

template<typename Config >
Config make_interprocess_config (Config cfg, std::string app_name)
 
void configure_simulation_time (const protobuf::AppConfig &app_cfg)
 Applies the simulation time settings from an application configuration to goby::time::SimulatorSettings.
 
void notify_poller (std::mutex &poll_mutex, std::condition_variable &cv)
 Wake a Poller's poll() loop after data has been made available to one of its _poll() implementations.
 
template<std::size_t N1, std::size_t N2>
constexpr auto concat (const char(&a)[N1], const char(&b)[N2])
 
template<typename Ret , typename Arg , typename... Rest>
Arg first_argument_helper (Ret(*)(Arg, Rest...))
 
template<typename Ret , typename F , typename Arg , typename... Rest>
Arg first_argument_helper (Ret(F::*)(Arg, Rest...))
 

Variables

template<typename F >
decltype(first_argument_helper(&F::operator())) first_argument_helper (F)
 

Typedef Documentation

◆ first_argument

template<typename T >
using goby::middleware::detail::first_argument = typedef decltype(first_argument_helper(std::declval<T>()))

Definition at line 46 of file type_helpers.h.

Function Documentation

◆ concat()

template<std::size_t N1, std::size_t N2>
constexpr auto goby::middleware::detail::concat ( const char(&)  a[N1],
const char(&)  b[N2] 
)
constexpr

Definition at line 35 of file static_group_names.h.

◆ configure_simulation_time()

void goby::middleware::detail::configure_simulation_time ( const protobuf::AppConfig &  app_cfg)
inline

Applies the simulation time settings from an application configuration to goby::time::SimulatorSettings.

This must be called before the Application is constructed. It is used by goby::run as well as by the language binding wrappers (e.g. Julia, Python), which set the application configuration up themselves rather than going through goby::run.

Parameters
app_cfgThe base application configuration (goby::middleware::protobuf::AppConfig)

Definition at line 45 of file simulation_time.h.

◆ first_argument_helper() [1/2]

template<typename Ret , typename Arg , typename... Rest>
Arg goby::middleware::detail::first_argument_helper ( Ret(*)(Arg, Rest...)  )

◆ first_argument_helper() [2/2]

template<typename Ret , typename F , typename Arg , typename... Rest>
Arg goby::middleware::detail::first_argument_helper ( Ret(F::*)(Arg, Rest...)  )

◆ make_interprocess_config()

template<typename Config >
Config goby::middleware::detail::make_interprocess_config ( Config  cfg,
std::string  app_name 
)
inline

Definition at line 33 of file interprocess_common.h.

◆ notify_poller()

void goby::middleware::detail::notify_poller ( std::mutex &  poll_mutex,
std::condition_variable &  cv 
)
inline

Wake a Poller's poll() loop after data has been made available to one of its _poll() implementations.

PollerInterface::_poll_all() holds poll_mutex from the poll that returned no items until cv.wait() atomically releases it. Notifying without first taking poll_mutex can therefore signal into that window, where there is no waiter yet and the wakeup is lost; with no timeout on the wait, the data then sits unread until some other event notifies.

This blocks until poll_mutex is free, so the caller must not be a thread that the polling thread can wait on while holding poll_mutex (the polling thread itself included), or the two deadlock.

Definition at line 46 of file poller_notify.h.

Variable Documentation

◆ first_argument_helper

template<typename F >
decltype(first_argument_helper(&F::operator())) goby::middleware::detail::first_argument_helper(F) ( F  )

Definition at line 43 of file type_helpers.h.