DCCL v4
Loading...
Searching...
No Matches
quick.py
1import os, dccl, navreport_pb2
2
3dccl.addProtoIncludePath(os.path.abspath("."))
4dccl.addProtoIncludePath(os.path.abspath("../../../include"))
5
6dccl.loadProtoFile(os.path.abspath("./navreport.proto"))
7
8codec = dccl.Codec()
9codec.load("NavigationReport")
10
11# SENDER
12r_out = navreport_pb2.NavigationReport(x=450, y=550, z=-100, veh_class=navreport_pb2.NavigationReport.AUV, battery_ok=True)
13encoded_bytes = codec.encode(r_out)
14
15# send encoded_bytes across your link
16
17# RECEIVER
18decoded_msg = codec.decode(encoded_bytes)
19print decoded_msg
The Dynamic CCL enCODer/DECoder. This is the main class you will use to load, encode and decode DCCL ...
Definition codec.h:63