From 1904dacea955032d88cebb33979bf783a12e9fa9 Mon Sep 17 00:00:00 2001 From: Kevin Matz Date: Thu, 9 Jun 2022 16:51:14 -0400 Subject: [PATCH] globally configurable Art-Net OEM value --- protocol/artnet/artnet.h | 7 ++++++- protocol/artnet/packet.h | 1 + protocol/config.h.in | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/protocol/artnet/artnet.h b/protocol/artnet/artnet.h index 8e836d9..eb7e688 100644 --- a/protocol/artnet/artnet.h +++ b/protocol/artnet/artnet.h @@ -204,8 +204,13 @@ struct TalkToMe { * Bit 15 high indicates extended features available. */ struct OEM { + /** + * @brief OEM + * @param value + */ + OEM(uint16_t value = oem_unknown) : word(value) {} union { - uint16_t word = oem_unknown; + uint16_t word; struct { uint16_t manufacturer : 15; bool extended_features : 1; diff --git a/protocol/artnet/packet.h b/protocol/artnet/packet.h index a653192..a640928 100644 --- a/protocol/artnet/packet.h +++ b/protocol/artnet/packet.h @@ -76,6 +76,7 @@ struct pollreply_data { pollreply_data() : udp_port(UDP_PORT) + , oem(MY_ARTNET_MANUFACTUER_ID) , esta_manufacturer(MY_ESTA_MANUFACTURER_ID) {}; diff --git a/protocol/config.h.in b/protocol/config.h.in index f70da1b..a1d3ed7 100644 --- a/protocol/config.h.in +++ b/protocol/config.h.in @@ -40,7 +40,7 @@ static constexpr char LIB_VERSION_LABEL [] = "0.1.1"; // THIS IS MINE! Use your own! static const uint16_t MY_ESTA_MANUFACTURER_ID = 0x0235; static constexpr char MY_ESTA_MANUFACTURER_LABEL [] = "Company 235, LLC"; - +static const uint16_t MY_ARTNET_MANUFACTUER_ID = 0x00ff; // OEM Unknown #if defined(__clang__) #if __has_feature(cxx_rtti)