Posts

Showing posts from February, 2014

Protocol buffers

I went looking for a library to parse network messages in my robot, so that I could control it using JSON RPC from a browser. I wanted something that would translate directly to and from C data structures. Nothing like this exists. I briefly contemplated writing something, and started looking for a starting point. What I found was protobuf-c . Then I thought: forget it, lets use protocol buffers, it'll be more efficient anyway. I already have a bridge between the browser and the device, perhaps it can do translation. As it turns out, I won't have to write that either: protobuf-json . So far so promising. My newline based framing won't work for protocol buffers, so I'll replace it with SLIP framing which is almost as simple. There are some limited instructions for cross compiling protobuf-c . They lead me to compile from source, to make sure I get a consistent version. I've downloaded and extracted 0.15. On Debian/Ubuntu you will need to install the develope