aboutsummaryrefslogtreecommitdiffhomepage
path: root/artnet.h
diff options
context:
space:
mode:
authorcbdev <cb@cbcdn.com>2017-07-11 16:00:57 +0200
committercbdev <cb@cbcdn.com>2017-07-11 16:00:57 +0200
commitabc1700eee53bd6dfd3e1d70736256bb02c0a115 (patch)
treef3ce0ac26ab5f221f3f4bf3ea4dbfba908569b10 /artnet.h
parent90d3983b164bf37e08dd143ce343a28e756ebf46 (diff)
downloadmidimonster-abc1700eee53bd6dfd3e1d70736256bb02c0a115.tar.gz
midimonster-abc1700eee53bd6dfd3e1d70736256bb02c0a115.tar.bz2
midimonster-abc1700eee53bd6dfd3e1d70736256bb02c0a115.zip
Implement ArtNet wide (16bit) channel support (Fixes #4)
Diffstat (limited to 'artnet.h')
-rw-r--r--artnet.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/artnet.h b/artnet.h
index 3633e81..6b4dee4 100644
--- a/artnet.h
+++ b/artnet.h
@@ -16,11 +16,21 @@ static int artnet_shutdown();
#define ARTNET_RECV_BUF 4096
#define ARTNET_KEEPALIVE_INTERVAL 15e5
+#define MAP_COARSE 0x0200
+#define MAP_FINE 0x0400
+#define MAP_SINGLE 0x0800
+#define MAP_MARK 0x1000
+#define MAPPED_CHANNEL(a) ((a) & 0x01FF)
+#define IS_ACTIVE(a) ((a) & 0xFE00)
+#define IS_WIDE(a) ((a) & 0x0600)
+#define IS_SINGLE(a) ((a) & MAP_SINGLE)
+
typedef struct /*_artnet_universe_model*/ {
uint8_t last_frame;
uint8_t seq;
uint8_t in[512];
uint8_t out[512];
+ uint16_t map[512];
} artnet_universe;
typedef struct /*_artnet_instance_model*/ {