Goby Underwater Autonomy Project
Series: 1.1, revision: 163, released on 2013-02-06 14:23:27 -0500
|
Helpers for MOOS applications for serializing and parsed Google Protocol buffers messages. More...
#include "google/protobuf/io/printer.h"
#include <google/protobuf/io/tokenizer.h>
#include "goby/util/liblogger/flex_ostream.h"
#include "goby/util/string.h"
Go to the source code of this file.
Functions | |
void | serialize_for_moos (std::string *out, const google::protobuf::Message &msg) |
Converts the Google Protocol Buffers message `msg` into a suitable (human readable) string `out` for sending via MOOS. | |
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(). | |
void | from_moos_comma_equals_string_field (google::protobuf::Message *proto_msg, const google::protobuf::FieldDescriptor *field_desc, const std::vector< std::string > &values, int value_key=0) |
void | from_moos_comma_equals_string (google::protobuf::Message *proto_msg, const std::string &in) |
std::string | to_moos_comma_equals_string_field (const google::protobuf::Message &proto_msg, const google::protobuf::FieldDescriptor *field_desc, bool write_key=true) |
void | to_moos_comma_equals_string (const google::protobuf::Message &proto_msg, std::string *out) |
Helpers for MOOS applications for serializing and parsed Google Protocol buffers messages.
Definition in file moos_protobuf_helpers.h.
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().
in | std::string to parse |
msg | Google Protocol buffers message to store result |
Definition at line 44 of file moos_protobuf_helpers.h.
void serialize_for_moos | ( | std::string * | out, |
const google::protobuf::Message & | msg | ||
) | [inline] |
Converts the Google Protocol Buffers message `msg` into a suitable (human readable) string `out` for sending via MOOS.
out | pointer to std::string to store serialized result |
msg | Google Protocol buffers message to serialize |
Definition at line 32 of file moos_protobuf_helpers.h.