Code Monkey home page Code Monkey logo

kian's Introduction

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);

kian's People

Contributors

neonsoftware avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.