1 import os, dccl, navreport_pb2
3 dccl.addProtoIncludePath(os.path.abspath(
"."))
4 dccl.addProtoIncludePath(os.path.abspath(
"../../../include"))
6 dccl.loadProtoFile(os.path.abspath(
"./navreport.proto"))
9 codec.load(
"NavigationReport")
12 r_out = navreport_pb2.NavigationReport(x=450, y=550, z=-100, veh_class=navreport_pb2.NavigationReport.AUV, battery_ok=
True)
13 encoded_bytes = codec.encode(r_out)
18 decoded_msg = codec.decode(encoded_bytes)