66 #if !defined(WIN32_LEAN_AND_MEAN)
67 #define WIN32_LEAN_AND_MEAN
76 #include <ossia_export.h>
77 #if defined(__cplusplus)
80 struct ossia_protocol;
86 typedef struct ossia_protocol* ossia_protocol_t;
87 typedef struct ossia_device* ossia_device_t;
88 typedef struct ossia_domain* ossia_domain_t;
89 typedef struct ossia_value* ossia_value_t;
90 typedef struct ossia_logger* ossia_logger_t;
91 typedef void* ossia_node_t;
92 typedef void* ossia_parameter_t;
94 typedef void (*ossia_node_callback_t)(
void* ctx, ossia_node_t);
95 struct ossia_node_callback_index;
96 typedef struct ossia_node_callback_index* ossia_node_callback_idx_t;
98 typedef void (*ossia_parameter_callback_t)(
void* ctx, ossia_parameter_t);
99 struct ossia_parameter_callback_index;
100 typedef struct ossia_parameter_callback_index* ossia_parameter_callback_idx_t;
102 typedef void (*ossia_value_callback_t)(
void* ctx, ossia_value_t);
103 struct ossia_value_callback_index;
104 typedef struct ossia_value_callback_index* ossia_value_callback_idx_t;
173 const char* local_name,
const char* ip,
int remote_port,
int local_port);
291 ossia_device_t device, ossia_node_callback_t callback,
void* ctx);
304 ossia_device_t device, ossia_node_callback_idx_t index);
319 ossia_device_t device, ossia_node_callback_t callback,
void* ctx);
331 ossia_device_t device, ossia_node_callback_idx_t index);
346 ossia_device_t device, ossia_parameter_callback_t callback,
void* ctx);
358 ossia_device_t device, ossia_parameter_callback_idx_t index);
519 ossia_parameter_t param,
int repetition_filter);
619 ossia_parameter_t val_in, ossia_value_t** out,
size_t* size);
691 ossia_parameter_t param,
float v1,
float v2,
float v3,
float v4);
736 ossia_parameter_t param,
const ossia_value_t* value,
size_t sz);
767 ossia_parameter_t param, ossia_value_callback_t callback,
void* ctx);
781 ossia_parameter_t param, ossia_value_callback_t callback,
void* ctx);
793 ossia_parameter_t param, ossia_value_callback_idx_t index);
822 OSSIA_EXPORT ossia_node_t
ossia_node_find(ossia_node_t root,
const char* path);
845 ossia_node_t root,
const char* pattern, ossia_node_t** data,
size_t* size);
865 OSSIA_EXPORT ossia_node_t
ossia_node_create(ossia_node_t root,
const char* path);
888 ossia_node_t root,
const char* pattern, ossia_node_t** data,
size_t* size);
1012 ossia_node_t node, ossia_node_callback_t callback,
void* ctx);
1024 ossia_node_t node, ossia_node_callback_idx_t index);
1279 ossia_domain_t domain,
const ossia_value_t* values,
size_t n);
1624 void ossia_string_free(
char*);
1706 typedef void* ossia_mq_t;
1737 int ossia_mq_pop(ossia_mq_t mq, ossia_parameter_t* param, ossia_value_t* val);
1775 typedef void* ossia_network_context_t;
1796 #if defined(__cplusplus)
OSSIA_EXPORT ossia_node_callback_idx_t ossia_device_add_node_created_callback(ossia_device_t device, ossia_node_callback_t callback, void *ctx)
Add a callback called when a node is created in a device.
Definition: ossia_device.cpp:129
OSSIA_EXPORT ossia_device_t ossia_device_create(ossia_protocol_t protocol, const char *name)
Create a device.
Definition: ossia_device.cpp:19
OSSIA_EXPORT void ossia_device_reset_static()
Free the global device table.
Definition: ossia_device.cpp:91
OSSIA_EXPORT void ossia_device_remove_node_created_callback(ossia_device_t device, ossia_node_callback_idx_t index)
Remove a callback added with ossia_device_add_node_created_callback.
Definition: ossia_device.cpp:151
OSSIA_EXPORT void ossia_device_free(ossia_device_t device)
Free a device instance.
Definition: ossia_device.cpp:73
OSSIA_EXPORT int ossia_device_update_namespace(ossia_device_t device)
Request the nodes of a server if the protocol handles it.
Definition: ossia_device.cpp:103
OSSIA_EXPORT ossia_node_t ossia_device_get_root_node(ossia_device_t device)
Get the root node of a device.
Definition: ossia_device.cpp:118
OSSIA_EXPORT ossia_node_callback_idx_t ossia_device_add_node_removing_callback(ossia_device_t device, ossia_node_callback_t callback, void *ctx)
Add a callback called when a node is removed in a device.
Definition: ossia_device.cpp:172
OSSIA_EXPORT ossia_parameter_callback_idx_t ossia_device_add_parameter_deleting_callback(ossia_device_t device, ossia_parameter_callback_t callback, void *ctx)
Add a callback called when a parameter is removed in a device.
OSSIA_EXPORT void ossia_device_remove_parameter_deleting_callback(ossia_device_t device, ossia_parameter_callback_idx_t index)
Remove a callback added with ossia_device_add_parameter_deleting_callback.
Definition: ossia_device.cpp:237
OSSIA_EXPORT void ossia_device_remove_node_removing_callback(ossia_device_t device, ossia_node_callback_idx_t index)
Remove a callback added with ossia_device_add_node_removing_callback.
Definition: ossia_device.cpp:194
OSSIA_EXPORT const char * ossia_device_get_name(ossia_device_t device)
Get the name of a device.
Definition: ossia_device.cpp:55
OSSIA_EXPORT ossia_domain_t ossia_domain_create(void)
ossia_domain_create Create a domain
Definition: ossia_domain.cpp:11
OSSIA_EXPORT void ossia_domain_set_values(ossia_domain_t domain, const ossia_value_t *values, size_t n)
Set the values of a domain.
Definition: ossia_domain.cpp:147
OSSIA_EXPORT void ossia_domain_set_min(ossia_domain_t domain, ossia_value_t value)
Set the min of a domain.
Definition: ossia_domain.cpp:40
OSSIA_EXPORT ossia_value_t ossia_domain_get_min(ossia_domain_t domain)
Get the min of a domain.
Definition: ossia_domain.cpp:30
OSSIA_EXPORT ossia_domain_t ossia_domain_make_int_set(const int *values, size_t n)
Create a domain from a set of ints.
Definition: ossia_domain.cpp:81
OSSIA_EXPORT void ossia_domain_free(ossia_domain_t domain)
Free a domain.
Definition: ossia_domain.cpp:166
OSSIA_EXPORT ossia_domain_t ossia_domain_make_min_max(ossia_value_t min, ossia_value_t max)
Create a domain from two values.
Definition: ossia_domain.cpp:17
OSSIA_EXPORT void ossia_domain_get_values(ossia_domain_t domain, ossia_value_t **values, size_t *n)
Get the values of a domain.
Definition: ossia_domain.cpp:116
OSSIA_EXPORT ossia_domain_t ossia_domain_make_string_set(const char **strings, size_t n)
Create a domain from a set of strings.
Definition: ossia_domain.cpp:74
OSSIA_EXPORT ossia_value_t ossia_domain_get_max(ossia_domain_t domain)
Get the max of a domain.
Definition: ossia_domain.cpp:52
OSSIA_EXPORT void ossia_domain_set_max(ossia_domain_t domain, ossia_value_t value)
Set the max of a domain.
Definition: ossia_domain.cpp:62
OSSIA_EXPORT ossia_domain_t ossia_domain_make_value_set(const ossia_value_t *values, size_t n)
Create a domain from a set of values.
Definition: ossia_domain.cpp:105
OSSIA_EXPORT ossia_domain_t ossia_domain_make_float_set(const float *values, size_t n)
Create a domain from a set of floats.
Definition: ossia_domain.cpp:93
OSSIA_EXPORT void ossia_logger_free(ossia_logger_t log)
Free a logger instance.
Definition: ossia_log.cpp:89
OSSIA_EXPORT ossia_logger_t ossia_logger_create(const char *host, const char *app)
Create a logger instance.
Definition: ossia_log.cpp:47
OSSIA_EXPORT void ossia_logger_set_level(ossia_logger_t log, enum log_level lvl)
Change the current log level.
Definition: ossia_log.cpp:57
OSSIA_EXPORT void ossia_logger_init_heartbeat(ossia_logger_t log, int pid, const char *cmdline)
Start sending logger heartbeats.
Definition: ossia_log.cpp:52
log_level
Definition: ossia-c.h:1637
OSSIA_EXPORT void ossia_log(ossia_logger_t log, enum log_level lvl, const char *message)
Log a message.
Definition: ossia_log.cpp:62
OSSIA_EXPORT void ossia_mq_register(ossia_mq_t, ossia_parameter_t)
Register a parameter into a message queue.
Definition: ossia_parameter.cpp:816
OSSIA_EXPORT int ossia_mq_pop(ossia_mq_t mq, ossia_parameter_t *param, ossia_value_t *val)
Get the head of the message queue if any.
Definition: ossia_parameter.cpp:826
OSSIA_EXPORT void ossia_mq_unregister(ossia_mq_t, ossia_parameter_t)
Unregister a parameter from a message queue.
Definition: ossia_parameter.cpp:821
OSSIA_EXPORT ossia_mq_t ossia_mq_create(ossia_device_t)
Create a message queue for a given device.
Definition: ossia_parameter.cpp:811
OSSIA_EXPORT void ossia_mq_free(ossia_mq_t)
Remove a message queue.
Definition: ossia_parameter.cpp:840
OSSIA_EXPORT void ossia_network_context_poll(ossia_network_context_t)
Process the network events currently pending.
Definition: ossia_network_context.cpp:20
OSSIA_EXPORT ossia_network_context_t ossia_network_context_create()
Create a new network context.
Definition: ossia_network_context.cpp:9
OSSIA_EXPORT void ossia_network_context_free(ossia_network_context_t)
Free a network context.
Definition: ossia_network_context.cpp:14
OSSIA_EXPORT ossia_node_t ossia_node_get_child(ossia_node_t node, int child_n)
Get a specific direct child of a node.
Definition: ossia_node.cpp:182
OSSIA_EXPORT void ossia_node_create_pattern(ossia_node_t root, const char *pattern, ossia_node_t **data, size_t *size)
Create nodes matching a brace expansion pattern.
Definition: ossia_node.cpp:127
OSSIA_EXPORT void ossia_node_set_priority(ossia_node_t node, float priority)
Definition: ossia_node.cpp:486
OSSIA_EXPORT void ossia_node_array_free(ossia_node_t *)
Free an array of nodes allocated with ossia_node_find_pattern or ossia_node_create_pattern.
Definition: ossia_node.cpp:108
OSSIA_EXPORT void ossia_node_unset_instance_bounds(ossia_node_t node)
Definition: ossia_node.cpp:652
OSSIA_EXPORT void ossia_node_remove_parameter(ossia_node_t node)
Remove the address contained in a node if any.
Definition: ossia_node.cpp:271
OSSIA_EXPORT void ossia_node_get_instance_bounds(ossia_node_t node, int *min, int *max, int *ok)
Definition: ossia_node.cpp:664
OSSIA_EXPORT int ossia_node_child_size(ossia_node_t node)
Get the number of children of a node.
Definition: ossia_node.cpp:168
OSSIA_EXPORT void ossia_node_set_tags(ossia_node_t node, const char **tags, size_t sz)
Definition: ossia_node.cpp:393
OSSIA_EXPORT void ossia_node_set_description(ossia_node_t node, const char *description)
Definition: ossia_node.cpp:328
OSSIA_EXPORT void ossia_node_get_tags(ossia_node_t node, char ***tags, size_t *sz)
Definition: ossia_node.cpp:420
OSSIA_EXPORT const char * ossia_node_get_extended_type(ossia_node_t node)
Definition: ossia_node.cpp:375
OSSIA_EXPORT ossia_device_t ossia_node_get_device(ossia_node_t node)
Get the root device of a node.
Definition: ossia_node.cpp:48
OSSIA_EXPORT void ossia_tags_free(char **tags, size_t sz)
Free tags allocated with ossia_node_get_tags.
Definition: ossia_node.cpp:453
OSSIA_EXPORT float ossia_node_get_priority(ossia_node_t node, int *ok)
Definition: ossia_node.cpp:510
OSSIA_EXPORT int ossia_node_get_refresh_rate(ossia_node_t node, int *ok)
Definition: ossia_node.cpp:561
OSSIA_EXPORT ossia_node_t ossia_node_find(ossia_node_t root, const char *path)
Find a child node.
Definition: ossia_node.cpp:66
OSSIA_EXPORT ossia_parameter_t ossia_node_create_parameter(ossia_node_t node, ossia_type type)
Create a parameter in a node.
Definition: ossia_node.cpp:218
OSSIA_EXPORT ossia_node_t ossia_node_add_child(ossia_node_t node, const char *name)
Create a direct child node.
Definition: ossia_node.cpp:154
OSSIA_EXPORT double ossia_node_get_value_step_size(ossia_node_t node, int *ok)
Definition: ossia_node.cpp:612
OSSIA_EXPORT ossia_value_t ossia_node_get_default_value(ossia_node_t node)
Definition: ossia_node.cpp:709
OSSIA_EXPORT ossia_node_t ossia_node_find_child(ossia_node_t node, const char *name)
Find a direct child of a node by name.
Definition: ossia_node.cpp:199
OSSIA_EXPORT const char * ossia_node_get_description(ossia_node_t node)
Definition: ossia_node.cpp:341
OSSIA_EXPORT void ossia_node_set_instance_bounds(ossia_node_t node, int min, int max)
Definition: ossia_node.cpp:639
OSSIA_EXPORT void ossia_node_set_default_value(ossia_node_t node, ossia_value_t default_value)
Definition: ossia_node.cpp:693
OSSIA_EXPORT ossia_node_callback_idx_t ossia_node_add_deleting_callback(ossia_node_t node, ossia_node_callback_t callback, void *ctx)
Add a callback called when a node is about to be removed.
Definition: ossia_node.cpp:285
OSSIA_EXPORT void ossia_node_find_pattern(ossia_node_t root, const char *pattern, ossia_node_t **data, size_t *size)
Find nodes matching a wildcard pattern.
Definition: ossia_node.cpp:80
OSSIA_EXPORT void ossia_node_set_refresh_rate(ossia_node_t node, int refresh_rate)
Definition: ossia_node.cpp:537
OSSIA_EXPORT ossia_node_t ossia_node_create(ossia_node_t root, const char *path)
Create a child node.
Definition: ossia_node.cpp:113
OSSIA_EXPORT void ossia_node_unset_value_step_size(ossia_node_t node)
Definition: ossia_node.cpp:600
OSSIA_EXPORT void ossia_node_set_extended_type(ossia_node_t node, const char *extended_type)
Definition: ossia_node.cpp:358
OSSIA_EXPORT int ossia_node_get_hidden(ossia_node_t node)
Definition: ossia_node.cpp:473
OSSIA_EXPORT void ossia_node_unset_refresh_rate(ossia_node_t node)
Definition: ossia_node.cpp:549
OSSIA_EXPORT const char * ossia_node_get_name(ossia_node_t node)
Get the name of a node.
Definition: ossia_node.cpp:33
OSSIA_EXPORT void ossia_node_remove_child(ossia_node_t node, ossia_node_t name)
Removes a direct child node.
Definition: ossia_node.cpp:13
OSSIA_EXPORT void ossia_node_unset_priority(ossia_node_t node)
Definition: ossia_node.cpp:498
OSSIA_EXPORT void ossia_node_set_value_step_size(ossia_node_t node, double value_step_size)
Definition: ossia_node.cpp:588
OSSIA_EXPORT ossia_parameter_t ossia_node_get_parameter(ossia_node_t node)
Get the address contained in a node if any.
Definition: ossia_node.cpp:257
OSSIA_EXPORT void ossia_node_remove_deleting_callback(ossia_node_t node, ossia_node_callback_idx_t index)
Remove a callback added with ossia_node_add_deleting_callback.
Definition: ossia_node.cpp:307
OSSIA_EXPORT ossia_parameter_t ossia_create_parameter(ossia_node_t node, const char *name, const char *type)
Create a child parameter.
Definition: ossia_node.cpp:233
OSSIA_EXPORT void ossia_node_set_hidden(ossia_node_t node, int hidden)
Definition: ossia_node.cpp:460
OSSIA_EXPORT void ossia_parameter_push_s(ossia_parameter_t param, const char *value)
Definition: ossia_parameter.cpp:470
OSSIA_EXPORT struct ossia_vec4f ossia_parameter_to_4f(ossia_parameter_t val)
Get the value if it is a vec4f.
Definition: ossia_parameter.cpp:196
OSSIA_EXPORT void ossia_parameter_push_c(ossia_parameter_t param, char value)
Definition: ossia_parameter.cpp:458
OSSIA_EXPORT void ossia_parameter_push_i(ossia_parameter_t param, int value)
Definition: ossia_parameter.cpp:385
OSSIA_EXPORT void ossia_parameter_push_fn(ossia_parameter_t param, const float *value, size_t sz)
Push an array of floats.
Definition: ossia_parameter.cpp:509
OSSIA_EXPORT void ossia_parameter_set_listening(ossia_parameter_t param, int listening)
Enable or disable remote updates for a given address.
Definition: ossia_parameter.cpp:587
OSSIA_EXPORT void ossia_parameter_push_list(ossia_parameter_t param, const ossia_value_t *value, size_t sz)
Push an array of values.
Definition: ossia_parameter.cpp:550
OSSIA_EXPORT ossia_domain_t ossia_parameter_get_domain(ossia_parameter_t param)
Definition: ossia_parameter.cpp:98
OSSIA_EXPORT struct ossia_vec2f ossia_parameter_to_2f(ossia_parameter_t val)
Get the value if it is a vec2f.
Definition: ossia_parameter.cpp:168
OSSIA_EXPORT void ossia_parameter_push_2f(ossia_parameter_t param, float v1, float v2)
Definition: ossia_parameter.cpp:421
OSSIA_EXPORT void ossia_parameter_push_impulse(ossia_parameter_t param)
Definition: ossia_parameter.cpp:373
OSSIA_EXPORT void ossia_parameter_set_unit(ossia_parameter_t param, const char *unit)
Definition: ossia_parameter.cpp:680
OSSIA_EXPORT const char * ossia_parameter_get_unit(ossia_parameter_t param)
Definition: ossia_parameter.cpp:694
OSSIA_EXPORT int ossia_parameter_get_disabled(ossia_parameter_t param)
Definition: ossia_parameter.cpp:720
OSSIA_EXPORT void ossia_parameter_set_bounding_mode(ossia_parameter_t param, ossia_bounding_mode bm)
Definition: ossia_parameter.cpp:54
OSSIA_EXPORT void ossia_parameter_push_3f(ossia_parameter_t param, float v1, float v2, float v3)
Definition: ossia_parameter.cpp:433
OSSIA_EXPORT int ossia_parameter_to_int(ossia_parameter_t val)
Get the value if it is an int.
Definition: ossia_parameter.cpp:142
OSSIA_EXPORT void ossia_parameter_push_value(ossia_parameter_t param, ossia_value_t value)
Definition: ossia_parameter.cpp:355
OSSIA_EXPORT const char * ossia_parameter_to_string(ossia_parameter_t val)
Get the value if it is a null-terminated string.
Definition: ossia_parameter.cpp:245
OSSIA_EXPORT ossia_value_callback_idx_t ossia_parameter_add_callback(ossia_parameter_t param, ossia_value_callback_t callback, void *ctx)
Add a callback called when the value of a parameter changes.
Definition: ossia_parameter.cpp:615
OSSIA_EXPORT void ossia_parameter_push_callback(ossia_parameter_t param, ossia_value_callback_t callback, void *ctx)
Add a callback called when the value of a parameter changes.
Definition: ossia_parameter.cpp:635
OSSIA_EXPORT void ossia_parameter_set_repetition_filter(ossia_parameter_t param, int repetition_filter)
Definition: ossia_parameter.cpp:783
OSSIA_EXPORT float ossia_parameter_to_float(ossia_parameter_t val)
Get the value if it is an float.
Definition: ossia_parameter.cpp:155
OSSIA_EXPORT void ossia_parameter_set_domain(ossia_parameter_t param, ossia_domain_t domain)
Definition: ossia_parameter.cpp:80
OSSIA_EXPORT void ossia_parameter_to_list(ossia_parameter_t val_in, ossia_value_t **out, size_t *size)
Get the value if it is a list.
Definition: ossia_parameter.cpp:262
ossia_bounding_mode
Definition: ossia-c.h:403
OSSIA_EXPORT ossia_access_mode ossia_parameter_get_access_mode(ossia_parameter_t param)
Definition: ossia_parameter.cpp:41
OSSIA_EXPORT ossia_value_t ossia_parameter_get_value(ossia_parameter_t param)
Definition: ossia_parameter.cpp:129
OSSIA_EXPORT int ossia_parameter_get_muted(ossia_parameter_t param)
Definition: ossia_parameter.cpp:745
OSSIA_EXPORT ossia_value_t ossia_parameter_fetch_value(ossia_parameter_t param)
Fetch the value of a parameter.
Definition: ossia_parameter.cpp:574
OSSIA_EXPORT void ossia_parameter_free_callback_idx(ossia_value_callback_idx_t)
Free a callback index.
Definition: ossia_parameter.cpp:655
OSSIA_EXPORT void ossia_parameter_to_in(ossia_parameter_t val_in, int **out, size_t *size)
Get the value if it is a list of ints.
Definition: ossia_parameter.cpp:325
ossia_type
Definition: ossia-c.h:376
OSSIA_EXPORT void ossia_parameter_to_fn(ossia_parameter_t val_in, float **out, size_t *size)
Get the value if it is a list of floats.
Definition: ossia_parameter.cpp:294
OSSIA_EXPORT void ossia_parameter_set_access_mode(ossia_parameter_t param, ossia_access_mode am)
Definition: ossia_parameter.cpp:28
OSSIA_EXPORT ossia_bounding_mode ossia_parameter_get_bounding_mode(ossia_parameter_t param)
Definition: ossia_parameter.cpp:67
OSSIA_EXPORT void ossia_parameter_to_byte_array(ossia_parameter_t val, char **str, size_t *sz)
Get the value if it is a byte array.
Definition: ossia_parameter.cpp:223
OSSIA_EXPORT struct ossia_vec3f ossia_parameter_to_3f(ossia_parameter_t val)
Get the value if it is a vec3f.
Definition: ossia_parameter.cpp:182
OSSIA_EXPORT void ossia_parameter_push_f(ossia_parameter_t param, float value)
Definition: ossia_parameter.cpp:409
OSSIA_EXPORT void ossia_parameter_set_muted(ossia_parameter_t param, int muted)
Definition: ossia_parameter.cpp:732
OSSIA_EXPORT void ossia_parameter_push_b(ossia_parameter_t param, int b)
Definition: ossia_parameter.cpp:397
OSSIA_EXPORT void ossia_parameter_push_4f(ossia_parameter_t param, float v1, float v2, float v3, float v4)
Definition: ossia_parameter.cpp:445
OSSIA_EXPORT int ossia_parameter_get_critical(ossia_parameter_t param)
Definition: ossia_parameter.cpp:770
OSSIA_EXPORT void ossia_parameter_push_cn(ossia_parameter_t param, const char *value, size_t sz)
Push a string with known length.
Definition: ossia_parameter.cpp:532
OSSIA_EXPORT int ossia_parameter_to_bool(ossia_parameter_t val)
Get the value if it is a bool.
Definition: ossia_parameter.cpp:210
ossia_access_mode
Definition: ossia-c.h:393
OSSIA_EXPORT ossia_node_t ossia_parameter_get_node(ossia_parameter_t param)
Return the node a parameter is part of.
Definition: ossia_parameter.cpp:15
OSSIA_EXPORT void ossia_parameter_remove_callback(ossia_parameter_t param, ossia_value_callback_idx_t index)
Remove a callback added with ossia_parameter_add_callback.
Definition: ossia_parameter.cpp:660
OSSIA_EXPORT void ossia_parameter_set_value(ossia_parameter_t param, ossia_value_t value)
Definition: ossia_parameter.cpp:111
OSSIA_EXPORT void ossia_parameter_push_in(ossia_parameter_t param, const int *value, size_t sz)
Push an array of integers.
Definition: ossia_parameter.cpp:486
OSSIA_EXPORT void ossia_parameter_set_critical(ossia_parameter_t param, int critical)
Definition: ossia_parameter.cpp:757
OSSIA_EXPORT void ossia_parameter_set_disabled(ossia_parameter_t param, int disabled)
Definition: ossia_parameter.cpp:707
OSSIA_EXPORT int ossia_parameter_get_repetition_filter(ossia_parameter_t param)
Definition: ossia_parameter.cpp:797
OSSIA_EXPORT ossia_protocol_t ossia_protocol_osc_create(const char *ip, int remote_port, int local_port)
Instantiate a raw OSC protocol.
Definition: ossia_protocol.cpp:47
OSSIA_EXPORT ossia_protocol_t ossia_protocol_oscquery_mirror_create(const char *host)
Instantiate an OSCQuery client.
Definition: ossia_protocol.cpp:83
OSSIA_EXPORT void ossia_protocol_multiplex_expose_to(ossia_protocol_t local, ossia_protocol_t other)
Adds a protocol to the set of protocols managed by the multiplexer.
Definition: ossia_protocol.cpp:25
OSSIA_EXPORT ossia_protocol_t ossia_protocol_multiplex_create()
Instantiate a multiplexer protocol.
Definition: ossia_protocol.cpp:19
OSSIA_EXPORT ossia_protocol_t ossia_protocol_oscquery_server_create(int osc_port, int ws_port)
Instantiate an OSCQuery server.
Definition: ossia_protocol.cpp:71
OSSIA_EXPORT ossia_protocol_t ossia_protocol_minuit_create(const char *local_name, const char *ip, int remote_port, int local_port)
Instantiate a Minuit protocol.
Definition: ossia_protocol.cpp:58
OSSIA_EXPORT void ossia_protocol_free(ossia_protocol_t)
Free the memory associated to a protocol.
Definition: ossia_protocol.cpp:94
OSSIA_EXPORT ossia_value_t ossia_value_create_2f(float v1, float v2)
Create a value of type vec2f.
Definition: ossia_value.cpp:52
OSSIA_EXPORT int ossia_value_convert_bool(ossia_value_t val)
Get the value as a bool.
Definition: ossia_value.cpp:294
OSSIA_EXPORT void ossia_value_to_fn(ossia_value_t val_in, float **out, size_t *size)
Get the value if it is a list of floats.
Definition: ossia_value.cpp:223
OSSIA_EXPORT ossia_type ossia_value_get_type(ossia_value_t type)
Get the type of a value.
Definition: ossia_value.cpp:122
OSSIA_EXPORT ossia_value_t ossia_value_create_in(const int *values, size_t size)
Create a value of type list with only ints.
Definition: ossia_value.cpp:106
OSSIA_EXPORT ossia_value_t ossia_value_create_4f(float v1, float v2, float v3, float v4)
Create a value of type vec4f.
Definition: ossia_value.cpp:60
OSSIA_EXPORT ossia_value_t ossia_value_create_int(int value)
Create a value of type int.
Definition: ossia_value.cpp:42
OSSIA_EXPORT struct ossia_vec2f ossia_value_to_2f(ossia_value_t val)
Get the value if it is a vec2f.
Definition: ossia_value.cpp:143
OSSIA_EXPORT int ossia_value_to_int(ossia_value_t val)
Get the value if it is an int.
Definition: ossia_value.cpp:133
OSSIA_EXPORT void ossia_value_free(ossia_value_t value)
Free the value.
Definition: ossia_value.cpp:117
OSSIA_EXPORT struct ossia_vec3f ossia_value_to_3f(ossia_value_t val)
Get the value if it is a vec3f.
Definition: ossia_value.cpp:148
OSSIA_EXPORT struct ossia_vec4f ossia_value_to_4f(ossia_value_t val)
Get the value if it is a vec4f.
Definition: ossia_value.cpp:153
OSSIA_EXPORT void ossia_value_convert_list(ossia_value_t val_in, ossia_value_t **out, size_t *size)
Get the value as a list.
Definition: ossia_value.cpp:331
OSSIA_EXPORT float ossia_value_convert_float(ossia_value_t val)
Get the value as a float.
Definition: ossia_value.cpp:286
OSSIA_EXPORT char ossia_value_convert_char(ossia_value_t val)
Get the value as a char.
Definition: ossia_value.cpp:290
OSSIA_EXPORT void ossia_value_to_in(ossia_value_t val_in, int **out, size_t *size)
Get the value if it is a list of ints.
Definition: ossia_value.cpp:252
OSSIA_EXPORT float ossia_value_to_float(ossia_value_t val)
Get the value if it is an float.
Definition: ossia_value.cpp:138
OSSIA_EXPORT ossia_value_t ossia_value_create_byte_array(const char *value, size_t size)
Create a value of type string.
Definition: ossia_value.cpp:79
OSSIA_EXPORT ossia_value_t ossia_value_create_list(const ossia_value_t *values, size_t size)
Create a value of type list.
Definition: ossia_value.cpp:84
OSSIA_EXPORT ossia_value_t ossia_value_create_impulse()
Create a value of type Impulse.
Definition: ossia_value.cpp:37
OSSIA_EXPORT ossia_value_t ossia_value_create_char(char value)
Create a value of type char.
Definition: ossia_value.cpp:70
OSSIA_EXPORT ossia_value_t ossia_value_create_bool(int value)
Create a value of type bool.
Definition: ossia_value.cpp:65
OSSIA_EXPORT void ossia_value_convert_byte_array(ossia_value_t val, char **str, size_t *sz)
Get the value as a byte array.
Definition: ossia_value.cpp:314
OSSIA_EXPORT ossia_value_t ossia_value_create_string(const char *value)
Create a value of type string.
Definition: ossia_value.cpp:75
OSSIA_EXPORT void ossia_value_to_list(ossia_value_t val_in, ossia_value_t **out, size_t *size)
Get the value if it is a list.
Definition: ossia_value.cpp:194
OSSIA_EXPORT void ossia_value_free_list(ossia_value_t *out)
Free an array of values.
Definition: ossia_value.cpp:218
OSSIA_EXPORT struct ossia_vec2f ossia_value_convert_2f(ossia_value_t val)
Get the value as a vec2f.
Definition: ossia_value.cpp:298
OSSIA_EXPORT ossia_value_t ossia_value_create_fn(const float *values, size_t size)
Create a value of type list with only floats.
Definition: ossia_value.cpp:95
OSSIA_EXPORT void ossia_value_free_in(int *out)
Free an array of int.
Definition: ossia_value.cpp:277
OSSIA_EXPORT struct ossia_vec3f ossia_value_convert_3f(ossia_value_t val)
Get the value as a vec3f.
Definition: ossia_value.cpp:303
OSSIA_EXPORT ossia_value_t ossia_value_create_float(float value)
Create a value of type float.
Definition: ossia_value.cpp:47
OSSIA_EXPORT ossia_value_t ossia_value_create_3f(float v1, float v2, float v3)
Create a value of type vec3f.
Definition: ossia_value.cpp:56
OSSIA_EXPORT void ossia_value_free_fn(float *out)
Free an array of float.
Definition: ossia_value.cpp:247
OSSIA_EXPORT const char * ossia_value_to_string(ossia_value_t val)
Get the value if it is a null-terminated string.
Definition: ossia_value.cpp:182
OSSIA_EXPORT int ossia_value_to_bool(ossia_value_t val)
Get the value if it is an bool.
Definition: ossia_value.cpp:159
OSSIA_EXPORT void ossia_value_to_byte_array(ossia_value_t val, char **str, size_t *sz)
Get the value if it is a byte array.
Definition: ossia_value.cpp:164
OSSIA_EXPORT struct ossia_vec4f ossia_value_convert_4f(ossia_value_t val)
Get the value as a vec4f.
Definition: ossia_value.cpp:308
OSSIA_EXPORT int ossia_value_convert_int(ossia_value_t val)
Get the value as an int.
Definition: ossia_value.cpp:282
constexpr OSSIA_INLINE auto min(const T a, const U b) noexcept -> typename std::conditional<(sizeof(T) > sizeof(U)), T, U >::type
min function tailored for values
Definition: math.hpp:125
constexpr OSSIA_INLINE auto max(const T a, const U b) noexcept -> typename std::conditional<(sizeof(T) > sizeof(U)), T, U >::type
max function tailored for values
Definition: math.hpp:96