From 1ed9c848028ea15039c388bc9dc35b470a1d9712 Mon Sep 17 00:00:00 2001 From: Ruakij Date: Mon, 22 Nov 2021 15:23:13 +0100 Subject: [PATCH] Added array to retrieve package-type names from enum --- DTO/packet.hpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/DTO/packet.hpp b/DTO/packet.hpp index ba263fb..2e20f1d 100644 --- a/DTO/packet.hpp +++ b/DTO/packet.hpp @@ -15,6 +15,18 @@ enum PacketType { NoData, Unknown }; +const std::array PACKET_TYPE_NAMES({{ + "Beacon", + "Probe Request", + "Probe Response", + "Data", + "Request to send", + "Clear to send", + "Acknowledgment", + "BlockAcknowledgment", + "NoData", + "Unknown" +}}); struct Packet { uint64_t timestampMicros;