Device: Add ExtendedCommand::GetAllMACAddresses

This commit is contained in:
Thomas Stoddard
2026-05-22 11:40:44 -04:00
committed by Kyle Schwarz
parent 49e578a657
commit 3ab06199c3
36 changed files with 424 additions and 36 deletions
+1
View File
@@ -64,6 +64,7 @@ enum class ExtendedCommand : uint16_t {
RequestTC10Wake = 0x003D,
RequestTC10Sleep = 0x003E,
GetTC10Status = 0x003F,
GetAllMACAddresses = 0x0040,
ProtobufAPI = 0x0041,
TransmitMessage = 0x0042,
};
@@ -0,0 +1,35 @@
#ifndef __ALLMACADDRESSESMESSAGE_H_
#define __ALLMACADDRESSESMESSAGE_H_
#define ICSNEO_MAC_ADDRESS_LEN 6
#define ICSNEO_MAX_MAC_COUNT 32
#ifdef __cplusplus
#include "icsneo/communication/message/message.h"
#include <memory>
#include <vector>
#include <unordered_map>
#include <array>
namespace icsneo {
static constexpr uint16_t MaxMACAddressCount = ICSNEO_MAX_MAC_COUNT;
static constexpr uint8_t MACAddressLength = ICSNEO_MAC_ADDRESS_LEN;
using MACAddress = std::array<uint8_t, MACAddressLength>;
class AllMACAddressesMessage : public Message {
public:
static std::shared_ptr<AllMACAddressesMessage> DecodeToMessage(const std::vector<uint8_t>& bytestream);
AllMACAddressesMessage() : Message(Type::AllMACAddresses) {}
std::unordered_map<Network::NetID, MACAddress> addresses;
};
} // namespace icsneo
#endif // __cplusplus
#endif // __ALLMACADDRESSESMESSAGE_H_
@@ -47,6 +47,7 @@ public:
LogData = 0x8015,
NetworkMutex = 0x8016,
ClientId = 0x8017,
AllMACAddresses = 0x8018,
};
Message(Type t) : type(t) {}