OSSIA
Open Scenario System for Interactive Application
dmx_buffer.hpp
1 #pragma once
2 #include <ossia/detail/config.hpp>
3 
4 #include <cstdint>
5 
6 #define DMX_CHANNEL_COUNT 512
7 
8 namespace ossia::net
9 {
10 
11 struct dmx_config
12 {
13  uint32_t frequency{};
14  uint16_t universe{};
15  enum
16  {
17  no_auto,
18  channel_index, // "Channel-123"
19  just_index // "123"
20  } autocreate{no_auto};
21  bool multicast{true};
22  enum
23  {
24  source, // ossia sends DX
25  sink // ossia receives DMX
26  } mode{source};
27 };
28 
29 struct dmx_buffer
30 {
31  dmx_buffer();
32  ~dmx_buffer();
33 
34  // Some data is reserved for the case where the last parameter
35  // has a bit depth of 255.. and some padding for safety
36  uint8_t data[DMX_CHANNEL_COUNT + 256 + 16];
37  bool dirty{};
38 };
39 
40 }