Goby3  3.1.5a
2024.05.23
goby::acomms::DCCLCodec Class Reference

#include <goby/acomms/dccl/dccl.h>

Public Member Functions

std::shared_ptr< dccl::Codec > codec ()
 Return the underlying dccl::Codec that is used by this wrapper. More...
 
void set_cfg (const protobuf::DCCLConfig &cfg)
 
void merge_cfg (const protobuf::DCCLConfig &cfg)
 
void load_shared_library_codecs (void *dl_handle)
 
template<typename ProtobufMessage >
void validate ()
 
template<typename ProtobufMessage >
void info (std::ostream *os) const
 
void info_all (std::ostream *os) const
 
template<typename ProtobufMessage >
unsigned id () const
 
unsigned size (const google::protobuf::Message &msg)
 
void encode (std::string *bytes, const google::protobuf::Message &msg, bool header_only=false)
 
void decode (const std::string &bytes, google::protobuf::Message *msg, bool header_only=false)
 
unsigned id_from_encoded (const std::string &bytes)
 
void validate (const google::protobuf::Descriptor *desc)
 
void validate_repeated (const std::list< const google::protobuf::Descriptor * > &descs)
 
void info (const google::protobuf::Descriptor *desc, std::ostream *os) const
 
void info_repeated (const std::list< const google::protobuf::Descriptor * > &desc, std::ostream *os) const
 
unsigned id (const google::protobuf::Descriptor *desc) const
 
template<typename GoogleProtobufMessagePointer >
unsigned size_repeated (const std::list< GoogleProtobufMessagePointer > &msgs)
 
template<typename GoogleProtobufMessagePointer >
GoogleProtobufMessagePointer decode (const std::string &bytes, bool header_only=false)
 
template<typename GoogleProtobufMessagePointer >
std::string encode_repeated (const std::list< GoogleProtobufMessagePointer > &msgs)
 
template<typename GoogleProtobufMessagePointer >
std::list< GoogleProtobufMessagePointer > decode_repeated (const std::string &orig_bytes)
 
template<typename DCCLTypedFieldCodecUint32 >
void add_id_codec (const std::string &identifier)
 
void set_id_codec (const std::string &identifier)
 
void reset_id_codec ()
 

Static Public Member Functions

static DCCLCodecget ()
 DCCLCodec is a singleton class; use this to get a pointer to the class. More...
 
static const std::string & glog_encode_group ()
 
static const std::string & glog_decode_group ()
 

Detailed Description

Definition at line 128 of file dccl.h.

Member Function Documentation

◆ add_id_codec()

template<typename DCCLTypedFieldCodecUint32 >
void goby::acomms::DCCLCodec::add_id_codec ( const std::string &  identifier)
inline

Definition at line 278 of file dccl.h.

◆ codec()

std::shared_ptr<dccl::Codec> goby::acomms::DCCLCodec::codec ( )
inline

Return the underlying dccl::Codec that is used by this wrapper.

Definition at line 139 of file dccl.h.

◆ decode() [1/2]

template<typename GoogleProtobufMessagePointer >
GoogleProtobufMessagePointer goby::acomms::DCCLCodec::decode ( const std::string &  bytes,
bool  header_only = false 
)
inline

Definition at line 228 of file dccl.h.

◆ decode() [2/2]

void goby::acomms::DCCLCodec::decode ( const std::string &  bytes,
google::protobuf::Message msg,
bool  header_only = false 
)
inline

Definition at line 185 of file dccl.h.

◆ decode_repeated()

template<typename GoogleProtobufMessagePointer >
std::list<GoogleProtobufMessagePointer> goby::acomms::DCCLCodec::decode_repeated ( const std::string &  orig_bytes)
inline

Definition at line 248 of file dccl.h.

◆ encode()

void goby::acomms::DCCLCodec::encode ( std::string *  bytes,
const google::protobuf::Message msg,
bool  header_only = false 
)
inline

Definition at line 179 of file dccl.h.

◆ encode_repeated()

template<typename GoogleProtobufMessagePointer >
std::string goby::acomms::DCCLCodec::encode_repeated ( const std::list< GoogleProtobufMessagePointer > &  msgs)
inline

Definition at line 234 of file dccl.h.

◆ get()

static DCCLCodec* goby::acomms::DCCLCodec::get ( )
inlinestatic

DCCLCodec is a singleton class; use this to get a pointer to the class.

Definition at line 132 of file dccl.h.

◆ glog_decode_group()

static const std::string& goby::acomms::DCCLCodec::glog_decode_group ( )
inlinestatic

Definition at line 177 of file dccl.h.

◆ glog_encode_group()

static const std::string& goby::acomms::DCCLCodec::glog_encode_group ( )
inlinestatic

Definition at line 176 of file dccl.h.

◆ id() [1/2]

template<typename ProtobufMessage >
unsigned goby::acomms::DCCLCodec::id ( ) const
inline

Definition at line 169 of file dccl.h.

◆ id() [2/2]

unsigned goby::acomms::DCCLCodec::id ( const google::protobuf::Descriptor *  desc) const
inline

Definition at line 214 of file dccl.h.

◆ id_from_encoded()

unsigned goby::acomms::DCCLCodec::id_from_encoded ( const std::string &  bytes)
inline

Definition at line 190 of file dccl.h.

◆ info() [1/2]

void goby::acomms::DCCLCodec::info ( const google::protobuf::Descriptor *  desc,
std::ostream *  os 
) const
inline

Definition at line 203 of file dccl.h.

◆ info() [2/2]

template<typename ProtobufMessage >
void goby::acomms::DCCLCodec::info ( std::ostream *  os) const
inline

Definition at line 162 of file dccl.h.

◆ info_all()

void goby::acomms::DCCLCodec::info_all ( std::ostream *  os) const
inline

Definition at line 167 of file dccl.h.

◆ info_repeated()

void goby::acomms::DCCLCodec::info_repeated ( const std::list< const google::protobuf::Descriptor * > &  desc,
std::ostream *  os 
) const
inline

Definition at line 208 of file dccl.h.

◆ load_shared_library_codecs()

void goby::acomms::DCCLCodec::load_shared_library_codecs ( void *  dl_handle)
inline

Definition at line 154 of file dccl.h.

◆ merge_cfg()

void goby::acomms::DCCLCodec::merge_cfg ( const protobuf::DCCLConfig cfg)
inline

Definition at line 147 of file dccl.h.

◆ reset_id_codec()

void goby::acomms::DCCLCodec::reset_id_codec ( )
inline

Definition at line 308 of file dccl.h.

◆ set_cfg()

void goby::acomms::DCCLCodec::set_cfg ( const protobuf::DCCLConfig cfg)
inline

Definition at line 141 of file dccl.h.

◆ set_id_codec()

void goby::acomms::DCCLCodec::set_id_codec ( const std::string &  identifier)
inline

Definition at line 287 of file dccl.h.

◆ size()

unsigned goby::acomms::DCCLCodec::size ( const google::protobuf::Message msg)
inline

Definition at line 174 of file dccl.h.

◆ size_repeated()

template<typename GoogleProtobufMessagePointer >
unsigned goby::acomms::DCCLCodec::size_repeated ( const std::list< GoogleProtobufMessagePointer > &  msgs)
inline

Definition at line 220 of file dccl.h.

◆ validate() [1/2]

template<typename ProtobufMessage >
void goby::acomms::DCCLCodec::validate ( )
inline

Definition at line 160 of file dccl.h.

◆ validate() [2/2]

void goby::acomms::DCCLCodec::validate ( const google::protobuf::Descriptor *  desc)
inline

Definition at line 192 of file dccl.h.

◆ validate_repeated()

void goby::acomms::DCCLCodec::validate_repeated ( const std::list< const google::protobuf::Descriptor * > &  descs)
inline

Definition at line 198 of file dccl.h.


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