From 325f6d4ffa2e1d2cd8c89be415d0ad0dd0b62358 Mon Sep 17 00:00:00 2001 From: Kevin Matz Date: Sat, 20 May 2023 13:36:23 -0400 Subject: [PATCH] determine if an ArtNzs is really an ArtVlc --- protocol/artistic/artnet/packet.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/protocol/artistic/artnet/packet.h b/protocol/artistic/artnet/packet.h index af277f1..9be15e0 100644 --- a/protocol/artistic/artnet/packet.h +++ b/protocol/artistic/artnet/packet.h @@ -727,6 +727,18 @@ struct ArtNzs ArtNzs() : Packet(OpNzs, std::make_shared()) {} + + /** + * @brief ArtNzs and ArtVlc share the same OpCode. + * @return + */ + bool isVLC() const + { + if (!_data) + return false; + auto data = std::static_pointer_cast(_data); + return data->data[0] == VLC::START_CODE; + }; };