diff options
author | cbdev <cb@cbcdn.com> | 2017-06-07 18:24:16 +0200 |
---|---|---|
committer | cbdev <cb@cbcdn.com> | 2017-06-07 18:24:16 +0200 |
commit | 351167055885207b57a6054fd33bec38e8946e1b (patch) | |
tree | 508a3cceb5bc4630823d0df538f0ea4cb8652700 /artnet.h | |
parent | ebb683ae0f538e7842403d4ce28f4d8188f64373 (diff) | |
download | midimonster-351167055885207b57a6054fd33bec38e8946e1b.tar.gz midimonster-351167055885207b57a6054fd33bec38e8946e1b.tar.bz2 midimonster-351167055885207b57a6054fd33bec38e8946e1b.zip |
Implement artnet start function
Diffstat (limited to 'artnet.h')
-rw-r--r-- | artnet.h | 29 |
1 files changed, 20 insertions, 9 deletions
@@ -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; |