25 #include "navreport.pb.h"
30 std::string encoded_bytes;
32 codec.load<NavigationReport>();
35 NavigationReport r_out;
39 r_out.set_veh_class(NavigationReport::AUV);
40 r_out.set_battery_ok(
true);
42 codec.encode(&encoded_bytes, r_out);
47 if (codec.id(encoded_bytes) == codec.id<NavigationReport>())
49 NavigationReport r_in;
50 codec.decode(encoded_bytes, &r_in);
51 std::cout << r_in.ShortDebugString() << std::endl;