diff options
author | cbdev <cb@cbcdn.com> | 2020-03-10 20:44:38 +0100 |
---|---|---|
committer | cbdev <cb@cbcdn.com> | 2020-03-10 20:44:38 +0100 |
commit | e48583db0e02336381a1626af814549bf12b1214 (patch) | |
tree | 96434326528c8c224cdd779cb0fc8d7db17de63f | |
parent | 377556e3407b107d6033be246ba6f41e0681f690 (diff) | |
download | midimonster-e48583db0e02336381a1626af814549bf12b1214.tar.gz midimonster-e48583db0e02336381a1626af814549bf12b1214.tar.bz2 midimonster-e48583db0e02336381a1626af814549bf12b1214.zip |
Check ArtNet/sACN channel direction at map time
-rw-r--r-- | backends/artnet.c | 5 | ||||
-rw-r--r-- | backends/artnet.h | 2 | ||||
-rw-r--r-- | backends/sacn.c | 5 | ||||
-rw-r--r-- | backends/sacn.h | 2 |
4 files changed, 12 insertions, 2 deletions
diff --git a/backends/artnet.c b/backends/artnet.c index 9fac332..0a1ed11 100644 --- a/backends/artnet.c +++ b/backends/artnet.c @@ -164,6 +164,11 @@ static channel* artnet_channel(instance* inst, char* spec, uint8_t flags){ } chan_a--; + //check output capabilities + if((flags & mmchannel_output) && !data->dest_len){ + LOGPF("Channel %s.%s mapped for output, but instance is not configured for output (missing destination)", inst->name, spec); + } + //secondary channel setup if(*spec_next == '+'){ chan_b = strtoul(spec_next + 1, NULL, 10); diff --git a/backends/artnet.h b/backends/artnet.h index d83999d..ac69b3d 100644 --- a/backends/artnet.h +++ b/backends/artnet.h @@ -20,7 +20,7 @@ static int artnet_shutdown(size_t n, instance** inst); #define ARTNET_KEEPALIVE_INTERVAL 1000 //limit transmit rate to at most 44 packets per second (1000/44 ~= 22) -#define ARTNET_FRAME_TIMEOUT 15 +#define ARTNET_FRAME_TIMEOUT 20 #define ARTNET_SYNTHESIZE_MARGIN 10 #define MAP_COARSE 0x0200 diff --git a/backends/sacn.c b/backends/sacn.c index 79ffb46..9c7f890 100644 --- a/backends/sacn.c +++ b/backends/sacn.c @@ -231,6 +231,11 @@ static channel* sacn_channel(instance* inst, char* spec, uint8_t flags){ } chan_a--; + //check output capabilities + if((flags & mmchannel_output) && !data->xmit_prio){ + LOGPF("Channel %s.%s mapped for output, but instance is not configured for output (no priority set)", inst->name, spec); + } + //if wide channel, mark fine if(*spec_next == '+'){ chan_b = strtoul(spec_next + 1, NULL, 10); diff --git a/backends/sacn.h b/backends/sacn.h index 4642e59..f2cd49f 100644 --- a/backends/sacn.h +++ b/backends/sacn.h @@ -16,7 +16,7 @@ static int sacn_shutdown(size_t n, instance** inst); //spec 6.6.2.1 #define SACN_KEEPALIVE_INTERVAL 1000 //spec 6.6.1 -#define SACN_FRAME_TIMEOUT 15 +#define SACN_FRAME_TIMEOUT 20 #define SACN_SYNTHESIZE_MARGIN 10 #define SACN_DISCOVERY_TIMEOUT 9000 #define SACN_PDU_MAGIC "ASC-E1.17\0\0\0" |