I'm really close but I am having memory alignment issues. What I have so 
far:

const auto words = kj::heapArray<capnp::word>(bufferSize);
memcpy((void*)words.begin(), buffer, words.asBytes().size() / 
sizeof(capnp::word));

capnp::FlatArrayMessageReader input(words);

crl::sensors::IMUSample deserialized;

const auto reader = input.getRoot<IMUData>();




On Sunday, January 12, 2020 at 8:14:04 AM UTC-5, Erich Foster wrote:
>
> It looks as though the link below covers the portion where I was stuck. If 
> there are any caveats or extra details to get to the kj::VectorOutputStream 
> I would be happy to hear about that.
>
>
> https://stackoverflow.com/questions/49722870/capn-proto-de-serialize-struct-to-from-stdstring-for-storing-in-leveldb
>

-- 
You received this message because you are subscribed to the Google Groups 
"Cap'n Proto" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to capnproto+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/capnproto/2df1e7e3-66b1-4606-b969-d78981e1d336%40googlegroups.com.

Reply via email to