C implementation of the Keep-It-Simple-Stupid Terminal-Node-Controller (KISS-TNC) protocol
$ mkdir build
$ cd build
$ cmake ..
$ make
$ make test
There is an example that communicates two executables using the stdout
-> Named Pipe -> stdin
. After building, run the scripts/run_example.sh
kiss_init(&kiss);
uint8_t msg[] = "Keep It Simple Stupid (KISS)";
kiss_send(&kiss, CMD_DATA, msg, sizeof(msg));
kiss_init(&kiss);
while (!done) {
uint8_t byte = getc(stdin);
kiss_ingest_byte(&kiss, byte);
}
The main use-case for this library is communication via some sort of streaming serial interface, where there is no defined "frame". Be it simple UART or radio.
The original KISS protocol is an adaptation of the Serial Line Internet Protocol (SLIP), adding special commands to configure TNCs. This version, removes all predefined commands, but keeps the "command" field. So that you can still differentiate plain-old-data from a configuration command. What the configuration does is up to the user.