OpenLightingProject / libartnet

An Open Source implementation of the ArtNet protocol
https://www.openlighting.org/libartnet-main/
GNU Lesser General Public License v2.1
124 stars 56 forks source link

can't change address/universe #18

Open ebkgne opened 2 years ago

ebkgne commented 2 years ago

Hi there, thanks for the lib !

I've tryed replacing homemade solution with libartnet in on one of my project but I'm struggling on something.

I simply try to send some DMX to a universes( subnet+address am I right ?),

after setting up eveything , only the subnet has effect, address doesn't,

as in wireshark I see universe 0 when subnet is 0 and 16 with subnet 1, but changing address doesnt change a thing ...

here is my code , I'm running on windows but I don't see how my config could be responsible .

in advance thanks ;)

` std::vector data = {127,255};

artnet_node artnet = artnet_new("2.0.0.222", 1);

artnet_set_short_name(artnet, "Test"); artnet_set_long_name(artnet, "TEST"); artnet_set_node_type(artnet, ARTNET_SRV);

artnet_set_subnet_addr(artnet, 0);

artnet_set_port_type(artnet, 0, ARTNET_ENABLE_OUTPUT, ARTNET_PORT_DMX); artnet_set_port_addr(artnet, 0, ARTNET_OUTPUT_PORT, 1);

artnet_dump_config(artnet);

if (artnet_start(artnet) != 0) std::cout << artnet_strerror() << std::endl;

artnet_send_dmx(artnet, 0, data.size(), &data[0]);

artnet_stop(artnet); artnet_destroy(artnet);`