Add ./tcobsEncode.c and/or ./tcobsDecode.c to your embedded project and use function TCOBSEncode and/or TCOBSDecode to convert a buffer to/from TCOBS format.
After transmitting one (or more) TCOBS package(s) transmit a 0-delimiter byte.
Decoding is implemented also in Go.
Encoder and Decoder in other languages are easy to implement using the TCOBS specification and the given C- and Go-code.
Contributions are appreciated.
3.1. Prerequisites
Just a C compiler and, for testing, a Go installation.
3.2. Installation
To use TCOBSv1 with Go execute go get github.com/rokath/tcobs/TCOBSv1
3.3. Usage in Go
For example usage check the tests.
3.3.1. Decoding
The function tcobs.CDecode is usable standalone.
Also it is possible to create a Decoder instance and use the Read method.
The function tcobs.Decode is usable standalone.
3.3.2. Encoding
The function tcobs.CEncode is usable standalone.
Also it is possible to create an Encoder instance and use the Write method.