22 #include "goby/moos/transitional/dccl_transitional.h" 23 #include "goby/util/dynamic_protobuf_manager.h" 25 int main(
int argc,
char* argv[])
28 std::string proto_folder =
"";
32 case 3: xml_file = argv[1]; proto_folder = argv[2];
34 case 2: xml_file = argv[1];
break;
37 std::cerr <<
"usage: dccl_xml_to_dccl_proto message_xml_file.xml [directory for " 38 "generated .proto (default = pwd (.)]" 45 std::cerr <<
"creating DCCLTransitionalCodec using xml file: [" << xml_file <<
"]" << std::endl;
49 goby::util::DynamicProtobufManager::enable_compilation();
52 cfg.mutable_transitional_cfg()->add_message_file()->set_path(xml_file);
53 cfg.mutable_transitional_cfg()->set_generated_proto_dir(proto_folder);
54 dccl.convert_to_v2_representation(&cfg);
56 std::cout <<
"received: " << cfg.DebugString();
58 std::cerr <<
"wrote proto files" << std::endl;
provides an API to the Transitional Dynamic CCL Codec (looks like DCCLv1, but calls DCCLv2)...
common::FlexOstream glog
Access the Goby logger through this object.
void add_stream(logger::Verbosity verbosity=logger::VERBOSE, std::ostream *os=0)
Attach a stream object (e.g. std::cout, std::ofstream, ...) to the logger with desired verbosity...