4 #include "ProviderUdp.h" 21 #define E131_DEFAULT_PORT 5568 24 #define E131_ROOT_PREAMBLE_SIZE 0 25 #define E131_ROOT_POSTAMBLE_SIZE 2 26 #define E131_ROOT_ID 4 27 #define E131_ROOT_FLENGTH 16 28 #define E131_ROOT_VECTOR 18 29 #define E131_ROOT_CID 22 31 #define E131_FRAME_FLENGTH 38 32 #define E131_FRAME_VECTOR 40 33 #define E131_FRAME_SOURCE 44 34 #define E131_FRAME_PRIORITY 108 35 #define E131_FRAME_RESERVED 109 36 #define E131_FRAME_SEQ 111 37 #define E131_FRAME_OPT 112 38 #define E131_FRAME_UNIVERSE 113 40 #define E131_DMP_FLENGTH 115 41 #define E131_DMP_VECTOR 117 42 #define E131_DMP_TYPE 118 43 #define E131_DMP_ADDR_FIRST 119 44 #define E131_DMP_ADDR_INC 121 45 #define E131_DMP_COUNT 123 46 #define E131_DMP_DATA 125 54 uint16_t preamble_size;
55 uint16_t postamble_size;
57 uint16_t root_flength;
62 uint16_t frame_flength;
63 uint32_t frame_vector;
67 uint8_t sequence_number;
75 uint16_t first_address;
76 uint16_t address_increment;
77 uint16_t property_value_count;
78 uint8_t property_values[513];
79 } __attribute__((packed));
85 #define VECTOR_ROOT_E131_DATA 0x00000004 86 #define VECTOR_ROOT_E131_EXTENDED 0x00000008 87 #define VECTOR_DMP_SET_PROPERTY 0x02 88 #define VECTOR_E131_DATA_PACKET 0x00000002 89 #define VECTOR_E131_EXTENDED_SYNCHRONIZATION 0x00000001 90 #define VECTOR_E131_EXTENDED_DISCOVERY 0x00000002 91 #define VECTOR_UNIVERSE_DISCOVERY_UNIVERSE_LIST 0x00000001 92 #define E131_E131_UNIVERSE_DISCOVERY_INTERVAL 10 // seconds 93 #define E131_NETWORK_DATA_LOSS_TIMEOUT 2500 // milli econds 94 #define E131_DISCOVERY_UNIVERSE 64214 95 #define DMX_MAX 512 // 512 usable slots 115 bool init(
const QJsonObject &deviceConfig);
128 virtual int write(
const std::vector<ColorRgb> &ledValues);
130 void prepare(
const unsigned this_universe,
const unsigned this_dmxChannelCount);
133 uint8_t _e131_seq = 0;
134 uint8_t _e131_universe = 1;
135 uint8_t _acn_id[12] = {0x41, 0x53, 0x43, 0x2d, 0x45, 0x31, 0x2e, 0x31, 0x37, 0x00, 0x00, 0x00 };
136 QString _e131_source_name;
The ProviderUdp implements an abstract base-class for LedDevices using UDP packets.
Definition: ProviderUdp.h:15
Interface (pure virtual base class) for LedDevices.
Definition: LedDevice.h:32
Definition: LedDeviceUdpE131.h:49
static LedDevice * construct(const QJsonObject &deviceConfig)
constructs leddevice
Definition: LedDeviceUdpE131.cpp:33
LedDeviceUdpE131(const QJsonObject &deviceConfig)
Constructs specific LedDevice.
Definition: LedDeviceUdpE131.cpp:7
Implementation of the LedDevice interface for sending led colors via udp/E1.31 packets.
Definition: LedDeviceUdpE131.h:100
bool init(const QJsonObject &deviceConfig)
Sets configuration.
Definition: LedDeviceUdpE131.cpp:13