OSSIA
Open Scenario System for Interactive Application
C API

Detailed Description

C bindings of libossia. Covers networking and presets.

API core concepts and ideas:

The API can be used to declare or interact with a tree of parameters.

There are multiple namespaces :

Multithreading notes:

Most functions are safe when called with different devices. When working on the same device, however, one has to take care to lock. e.g. the following cases are unsafe:

Thread 1 Thread 2
ossia_node_find(my_dev, "/foo"); ossia_node_create(my_dev, "/bar");
ossia_device_free(my_dev); ossia_device_get_root_node(my_dev);

While the following cases are safe:

Thread 1 Thread 2
ossia_node_find(my_dev, "/foo"); ossia_node_create(other, "/bar");
ossia_parameter_push_i(addr, 123); ossia_parameter_get_value(addr);

Only functions marked as data-safe can be called in parallel on the same device, and no function with weaker guarantees shall be called on the device at the same time in another thread.

Modules

 Protocol
 Instantiation of various protocols such as OSC, Minuit, OSCQuery...
 
 Device
 Device tree management.
 
 Parameter
 Parameter creation, and attributes.
 
 Node
 Node creation, removal, finding.
 
 Domain
 Parameter min / max.
 
 Value
 Tools to create various kinds of values.
 
 Logging
 Log various messages in JSON to a websocket server, and send heartbeats.
 
 Message queue
 When threads cannot be used from the client side.
 
 Network context
 Event loop to process messages.
 

Files

file  ossia-c.h
 

Typedefs

typedef struct ossia_protocol * ossia_protocol_t
 
typedef struct ossia_device * ossia_device_t
 
typedef struct ossia_domain * ossia_domain_t
 
typedef struct ossia_value * ossia_value_t
 
typedef struct ossia_logger * ossia_logger_t
 
typedef void * ossia_node_t
 
typedef void * ossia_parameter_t
 
typedef void(* ossia_node_callback_t) (void *ctx, ossia_node_t)
 
typedef struct ossia_node_callback_index * ossia_node_callback_idx_t
 
typedef void(* ossia_parameter_callback_t) (void *ctx, ossia_parameter_t)
 
typedef struct ossia_parameter_callback_index * ossia_parameter_callback_idx_t
 
typedef void(* ossia_value_callback_t) (void *ctx, ossia_value_t)
 
typedef struct ossia_value_callback_index * ossia_value_callback_idx_t