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

Wraps a dccl::Codec in a thread-safe way to make it usable by SerializerParserHelper. More...

#include <goby/middleware/marshalling/detail/dccl_serializer_parser.h>

Inheritance diagram for goby::middleware::detail::DCCLSerializerParserHelperBase:
goby::middleware::SerializerParserHelper< DataType, MarshallingScheme::DCCL > goby::middleware::SerializerParserHelper< google::protobuf::Message, MarshallingScheme::DCCL >

Classes

struct  Loader
 
struct  LoaderBase
 
struct  LoaderDynamic
 

Public Member Functions

 DCCLSerializerParserHelperBase ()=default
 
virtual ~DCCLSerializerParserHelperBase ()=default
 

Static Public Member Functions

template<typename CharIterator >
static unsigned id (CharIterator begin, CharIterator end)
 
static unsigned id (const std::string &full_name)
 
static void load_metadata (const goby::middleware::protobuf::SerializerProtobufMetadata &meta)
 
static goby::middleware::intervehicle::protobuf::DCCLForwardedData unpack (const std::string &bytes)
 
static void load_library (const std::string &library)
 Load DCCL field codecs ("plugins") and compiled Protobuf messages from one or more shared libraries.
 
static void load_library (void *dl_handle)
 Load DCCL field codecs ("plugins") and compiled Protobuf messages from an already opened shared library handle (e.g. the result of dlopen()).
 
static void setup_dlog ()
 Enable dlog output to glog using same verbosity settings as glog.
 
static void set_crypto_passphrase (const std::string &passphrase, const std::set< dccl::int32 > &do_not_encrypt_ids=std::set< dccl::int32 >())
 

Static Public Attributes

static constexpr int INVALID_DCCL_ID {0}
 

Static Protected Member Functions

template<typename DataType >
static void check_load ()
 
static void check_load (const google::protobuf::Descriptor *desc)
 
static dccl::Codec & codec ()
 
static dccl::Codec & set_codec (dccl::Codec *new_codec)
 

Static Protected Attributes

static std::mutex dccl_mutex_
 
static std::unordered_map< const google::protobuf::Descriptor *, std::unique_ptr< LoaderBase > > loader_map_
 
static std::set< std::string > loaded_proto_files_
 

Detailed Description

Wraps a dccl::Codec in a thread-safe way to make it usable by SerializerParserHelper.

Definition at line 62 of file dccl_serializer_parser.h.

Constructor & Destructor Documentation

◆ DCCLSerializerParserHelperBase()

goby::middleware::detail::DCCLSerializerParserHelperBase::DCCLSerializerParserHelperBase ( )
default

◆ ~DCCLSerializerParserHelperBase()

virtual goby::middleware::detail::DCCLSerializerParserHelperBase::~DCCLSerializerParserHelperBase ( )
virtualdefault

Member Function Documentation

◆ check_load() [1/2]

template<typename DataType >
static void goby::middleware::detail::DCCLSerializerParserHelperBase::check_load ( )
inlinestaticprotected

Definition at line 100 of file dccl_serializer_parser.h.

◆ check_load() [2/2]

static void goby::middleware::detail::DCCLSerializerParserHelperBase::check_load ( const google::protobuf::Descriptor *  desc)
inlinestaticprotected

Definition at line 108 of file dccl_serializer_parser.h.

◆ codec()

static dccl::Codec & goby::middleware::detail::DCCLSerializerParserHelperBase::codec ( )
inlinestaticprotected

Definition at line 115 of file dccl_serializer_parser.h.

◆ id() [1/2]

template<typename CharIterator >
static unsigned goby::middleware::detail::DCCLSerializerParserHelperBase::id ( CharIterator  begin,
CharIterator  end 
)
inlinestatic

Definition at line 142 of file dccl_serializer_parser.h.

◆ id() [2/2]

static unsigned goby::middleware::detail::DCCLSerializerParserHelperBase::id ( const std::string &  full_name)
inlinestatic

Definition at line 148 of file dccl_serializer_parser.h.

◆ load_library() [1/2]

static void goby::middleware::detail::DCCLSerializerParserHelperBase::load_library ( const std::string &  library)
static

Load DCCL field codecs ("plugins") and compiled Protobuf messages from one or more shared libraries.

Parameters
libraryPath (or name resolvable by ld.so) of the shared library to load, e.g. "libdccl_arithmetic.so". Several libraries may be given in a single string separated by ':', ';' or ','.
Exceptions
goby::Exceptionif any of the given libraries could not be opened

◆ load_library() [2/2]

static void goby::middleware::detail::DCCLSerializerParserHelperBase::load_library ( void *  dl_handle)
static

Load DCCL field codecs ("plugins") and compiled Protobuf messages from an already opened shared library handle (e.g. the result of dlopen()).

◆ load_metadata()

static void goby::middleware::detail::DCCLSerializerParserHelperBase::load_metadata ( const goby::middleware::protobuf::SerializerProtobufMetadata &  meta)
static

◆ set_codec()

static dccl::Codec & goby::middleware::detail::DCCLSerializerParserHelperBase::set_codec ( dccl::Codec *  new_codec)
inlinestaticprotected

Definition at line 126 of file dccl_serializer_parser.h.

◆ set_crypto_passphrase()

static void goby::middleware::detail::DCCLSerializerParserHelperBase::set_crypto_passphrase ( const std::string &  passphrase,
const std::set< dccl::int32 > &  do_not_encrypt_ids = std::set<dccl::int32>() 
)
inlinestatic

Definition at line 185 of file dccl_serializer_parser.h.

◆ setup_dlog()

static void goby::middleware::detail::DCCLSerializerParserHelperBase::setup_dlog ( )
static

Enable dlog output to glog using same verbosity settings as glog.

◆ unpack()

static goby::middleware::intervehicle::protobuf::DCCLForwardedData goby::middleware::detail::DCCLSerializerParserHelperBase::unpack ( const std::string &  bytes)
static

Member Data Documentation

◆ dccl_mutex_

std::mutex goby::middleware::detail::DCCLSerializerParserHelperBase::dccl_mutex_
staticprotected

Definition at line 69 of file dccl_serializer_parser.h.

◆ INVALID_DCCL_ID

constexpr int goby::middleware::detail::DCCLSerializerParserHelperBase::INVALID_DCCL_ID {0}
staticconstexpr

Definition at line 140 of file dccl_serializer_parser.h.

◆ loaded_proto_files_

std::set<std::string> goby::middleware::detail::DCCLSerializerParserHelperBase::loaded_proto_files_
staticprotected

Definition at line 98 of file dccl_serializer_parser.h.

◆ loader_map_

std::unordered_map<const google::protobuf::Descriptor*, std::unique_ptr<LoaderBase> > goby::middleware::detail::DCCLSerializerParserHelperBase::loader_map_
staticprotected

Definition at line 96 of file dccl_serializer_parser.h.


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