DCCL v4
quick.py
1 import os, dccl, navreport_pb2
2 
3 dccl.addProtoIncludePath(os.path.abspath("."))
4 dccl.addProtoIncludePath(os.path.abspath("../../../include"))
5 
6 dccl.loadProtoFile(os.path.abspath("./navreport.proto"))
7 
8 codec = dccl.Codec()
9 codec.load("NavigationReport")
10 
11 # SENDER
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)
14 
15 # send encoded_bytes across your link
16 
17 # RECEIVER
18 decoded_msg = codec.decode(encoded_bytes)
19 print decoded_msg
dccl::Codec
The Dynamic CCL enCODer/DECoder. This is the main class you will use to load, encode and decode DCCL ...
Definition: codec.h:62