Added array to retrieve package-type names from enum

This commit is contained in:
Ruakij 2021-11-22 15:23:13 +01:00
parent a0ae919614
commit 1ed9c84802

View File

@ -15,6 +15,18 @@ enum PacketType {
NoData,
Unknown
};
const std::array<const char*, 10> PACKET_TYPE_NAMES({{
"Beacon",
"Probe Request",
"Probe Response",
"Data",
"Request to send",
"Clear to send",
"Acknowledgment",
"BlockAcknowledgment",
"NoData",
"Unknown"
}});
struct Packet {
uint64_t timestampMicros;