1
0
Fork 0

POD structure for PortAddress

This commit is contained in:
Kevin Matz 2023-05-20 13:19:17 -04:00
parent 9c1b14ac3e
commit 88c9cfa7c9
2 changed files with 1 additions and 13 deletions

View File

@ -38,18 +38,6 @@ namespace ARTNET {
///
/// > The Port-Address of each DMX512 Universe is encoded as a 15-bit number
struct PortAddress {
/**
* @brief PortAddress
* @param v
*/
PortAddress(uint16_t v = 0) : value(v) {};
/**
* @brief PortAddress
* @param n
* @param s
*/
PortAddress(uint8_t n, uint8_t s) : subuni(s), net(n) {}
union {
uint16_t value;
struct {

View File

@ -693,7 +693,7 @@ void todrequest_data::iStream(std::shared_ptr<bufferstream> stream)
return stream->setstate(std::ios_base::failbit);
uint8_t count = stream->get(); // 16
for (int i = 0; i < count; i++)
universes.emplace_back(net, stream->get()); // 17
universes.push_back(PortAddress{.net=net, .subuni=stream->readType<uint8_t>()}); // 17
}