diff options
author | Daniel Friesel <derf@finalrewind.org> | 2018-11-21 08:29:03 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2018-11-21 08:29:03 +0100 |
commit | 9bdf87a6ee56b893483e56854d6f66899c82b73d (patch) | |
tree | 68733dbb0697f3f9a77f28c33d83e53d2405407b | |
parent | 5846344fab742ef97c4c0e22e530afab5a6aa219 (diff) |
capnp_c list test
-rw-r--r-- | src/app/prototest/capnp_c_bench.capnp | 17 | ||||
-rw-r--r-- | src/app/prototest/main.cc | 7 |
2 files changed, 24 insertions, 0 deletions
diff --git a/src/app/prototest/capnp_c_bench.capnp b/src/app/prototest/capnp_c_bench.capnp new file mode 100644 index 0000000..54e0252 --- /dev/null +++ b/src/app/prototest/capnp_c_bench.capnp @@ -0,0 +1,17 @@ +@0xad5b236043de2389; + +struct Benchmark { +# data @0 :List(Float64); +# nesting @1 :Nesting; + sensor @0 :Text; + time @1 :Int64; + +# struct Nesting { +# foo @0 :Foo; +# +# struct Foo { +# hurr @0 :Text; +# qwop @1 :Int64; +# } +# } +} diff --git a/src/app/prototest/main.cc b/src/app/prototest/main.cc index ee907ab..84322ac 100644 --- a/src/app/prototest/main.cc +++ b/src/app/prototest/main.cc @@ -123,6 +123,13 @@ kout << "}" << endl; //struct Benchmark_Nesting_Foo benchmark_nesting_foo; benchmark.time = ts + 1; + capn_text sensor_text; + sensor_text.len = 3; + sensor_text.str = "gps"; + sensor_text.seg = NULL; + + benchmark.sensor = sensor_text; + //benchmark.nesting = new_Benchmark_Nesting(cs); //benchmark_nesting.foo = new_Benchmark_Nesting_Foo(cs); |