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.
Encoding and Decoding is currently implemented in Go using the C-code with CGO.
Encoder and Decoder in other languages are implementable 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 TCOBSv2 with Go execute go get github.com/rokath/tcobs/TCOBSv2
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.
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.