Goby v2
Classes | Namespaces | Functions | Variables
moos_protobuf_helpers.h File Reference

Helpers for MOOS applications for serializing and parsed Google Protocol buffers messages. More...

#include <limits>
#include <boost/format.hpp>
#include <boost/regex.hpp>
#include <google/protobuf/io/printer.h>
#include <google/protobuf/io/tokenizer.h>
#include "goby/common/logger.h"
#include "goby/moos/moos_string.h"
#include "goby/util/as.h"
#include "goby/util/binary.h"
#include "goby/util/dynamic_protobuf_manager.h"
#include "goby/util/primitive_types.h"
#include "goby/moos/transitional/message_algorithms.h"
#include "goby/moos/transitional/message_val.h"
#include "goby/moos/protobuf/translator.pb.h"
Include dependency graph for moos_protobuf_helpers.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  goby::moos::MOOSTranslation< technique >
 
class  goby::moos::MOOSTranslation< protobuf::TranslatorEntry::TECHNIQUE_PROTOBUF_TEXT_FORMAT >
 
class  goby::moos::MOOSTranslation< protobuf::TranslatorEntry::TECHNIQUE_PROTOBUF_NATIVE_ENCODED >
 
class  goby::moos::MOOSTranslation< protobuf::TranslatorEntry::TECHNIQUE_PROTOBUF_NATIVE_HEX >
 
class  goby::moos::MOOSPrefixTranslation< prefix_technique, base_technique >
 
class  goby::moos::MOOSTranslation< protobuf::TranslatorEntry::TECHNIQUE_PREFIXED_PROTOBUF_TEXT_FORMAT >
 
class  goby::moos::MOOSTranslation< protobuf::TranslatorEntry::TECHNIQUE_PREFIXED_PROTOBUF_NATIVE_ENCODED >
 
class  goby::moos::MOOSTranslation< protobuf::TranslatorEntry::TECHNIQUE_PREFIXED_PROTOBUF_NATIVE_HEX >
 
class  goby::moos::MOOSTranslation< protobuf::TranslatorEntry::TECHNIQUE_COMMA_SEPARATED_KEY_EQUALS_VALUE_PAIRS >
 
class  goby::moos::MOOSTranslation< protobuf::TranslatorEntry::TECHNIQUE_FORMAT >
 
struct  goby::moos::MOOSTranslation< protobuf::TranslatorEntry::TECHNIQUE_FORMAT >::RepeatedFieldKey
 

Namespaces

 goby
 The global namespace for the Goby project.
 

Functions

std::map< int, std::string > goby::moos::run_serialize_algorithms (const google::protobuf::Message &in, const google::protobuf::RepeatedPtrField< protobuf::TranslatorEntry::PublishSerializer::Algorithm > &algorithms)
 
std::string goby::moos::strip_name_from_enum (const std::string &enum_value, const std::string &field_name)
 
std::string goby::moos::add_name_to_enum (const std::string &enum_value, const std::string &field_name)
 
bool serialize_for_moos (std::string *out, const google::protobuf::Message &msg)
 
void parse_for_moos (const std::string &in, google::protobuf::Message *msg)
 Parses the string in to Google Protocol Buffers message msg. All errors are written to the goby::util::glogger(). More...
 
boost::shared_ptr< google::protobuf::Messagedynamic_parse_for_moos (const std::string &in)
 

Variables

const std::string goby::moos::MAGIC_PROTOBUF_HEADER = "@PB"
 
goby::moos::protobuf::TranslatorEntry::ParserSerializerTechnique goby::moos::moos_technique
 

Detailed Description

Helpers for MOOS applications for serializing and parsed Google Protocol buffers messages.

Definition in file moos_protobuf_helpers.h.

Function Documentation

void parse_for_moos ( const std::string &  in,
google::protobuf::Message msg 
)
inline

Parses the string in to Google Protocol Buffers message msg. All errors are written to the goby::util::glogger().

Parameters
instd::string to parse
msgGoogle Protocol buffers message to store result

Definition at line 1562 of file moos_protobuf_helpers.h.

Variable Documentation

goby::moos::protobuf::TranslatorEntry::ParserSerializerTechnique goby::moos::moos_technique
Initial value:
=
goby::moos::protobuf::TranslatorEntry::TECHNIQUE_PREFIXED_PROTOBUF_TEXT_FORMAT

Definition at line 25 of file moos_protobuf_helpers.cpp.