23 #include "navreport.pb.h"
28 std::string encoded_bytes;
30 codec.load<NavigationReport>();
33 NavigationReport r_out;
37 r_out.set_veh_class(NavigationReport::AUV);
38 r_out.set_battery_ok(
true);
40 codec.encode(&encoded_bytes, r_out);
45 if(codec.id(encoded_bytes) == codec.id<NavigationReport>())
47 NavigationReport r_in;
48 codec.decode(encoded_bytes, &r_in);
49 std::cout << r_in.ShortDebugString() << std::endl;