From 351167055885207b57a6054fd33bec38e8946e1b Mon Sep 17 00:00:00 2001 From: cbdev Date: Wed, 7 Jun 2017 18:24:16 +0200 Subject: Implement artnet start function --- artnet.h | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) (limited to 'artnet.h') diff --git a/artnet.h b/artnet.h index 806d125..eb60115 100644 --- a/artnet.h +++ b/artnet.h @@ -1,5 +1,11 @@ #include "midimonster.h" +/* + * TODO + * bind per instance + * destination per instance + */ + int artnet_init(); static int artnet_configure(char* option, char* value); static int artnet_configure_instance(instance* instance, char* option, char* value); @@ -10,23 +16,28 @@ static int artnet_handle(size_t num, managed_fd* fds); static int artnet_start(); static int artnet_shutdown(); +typedef struct /*_artnet_universe_model*/ { + uint8_t last_frame; + uint8_t data[512]; +} artnet_universe; + typedef struct /*_artnet_instance_model*/ { uint8_t net; uint8_t uni; uint8_t mode; char* dest; + artnet_universe data; } artnet_instance_data; +typedef union /*_artnet_instance_id*/ { + struct { + uint8_t net; + uint8_t uni; + } fields; + uint64_t label; +} artnet_instance_id; + enum { output = 1, mark = 2 }; - -typedef struct /*_artnet_universe_model*/ { - uint8_t net; - uint8_t uni; - uint8_t flags; - uint8_t last_frame; - uint8_t data[512]; - uint8_t mask[512]; -} artnet_universe; -- cgit v1.2.3