Skip to content

A transport agnostic single header C library for OSC over SLIP

License

Notifications You must be signed in to change notification settings

neonsoftware/kian

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status Build Status

Kian

A transport agnostic single header C library for OSC over SLIP(RFC 1055)

While most OSC libraries available thend to embed and assume the use of network transport (UDP), few of them can easily be used with other means of transport, such as USB.

Kian aims to provide a bring-your-own-transport approach to OSC messaging.

The SLIP protocol (RFC 1055) is a very simple encoding system that allows to encapsulate the OSC messages and bundles into entities of information simlare to UDP datagrams, which can then be send to the transport stack and received on the other end.

Kian is :
  • completely transport agnostic, works on local buffers (no logic for network, or serial, etc .. it is up to you)

  • written in portable C89

  • only 3 header files

  • througly internally documented

  • tested

Usage

This is an extract from the integrated test suite. (WIP)

	tosc_message *new_msg = NULL;

	EXPECT(kian_next_message() == NULL);

	EXPECT(kian_write_message("/ceo", "s", "ciao") != 0);
	EXPECT(kian_write_message("/pdg", "s", "bonjour") != 0);

	EXPECT(io_echo() == 0);

	new_msg = kian_next_message();
	EXPECT(new_msg != NULL);
	EXPECT(strcmp("/ceo", tosc_getAddress(new_msg)) == 0);
	EXPECT(strcmp("ciao", tosc_getNextString(new_msg)) == 0);

	new_msg = kian_next_message();
	EXPECT(new_msg != NULL);
	EXPECT(strcmp("/pdg", tosc_getAddress(new_msg)) == 0);
	EXPECT(strcmp("bonjour", tosc_getNextString(new_msg)) == 0);

	EXPECT(kian_next_message() == NULL);
	EXPECT(kian_next_message() == NULL);
	EXPECT(kian_next_message() == NULL);

About

A transport agnostic single header C library for OSC over SLIP

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published