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
+5 -2
View File
@@ -59,6 +59,7 @@
#include "icsneo/communication/message/versionmessage.h"
#include "icsneo/communication/message/gptpstatusmessage.h"
#include "icsneo/communication/message/networkmutexmessage.h"
#include "icsneo/communication/message/allmacaddressesmessage.h"
#define ICSNEO_FINDABLE_DEVICE_BASE(className, type) \
static constexpr DeviceType::Enum DEVICE_TYPE = type; \
@@ -183,7 +184,7 @@ public:
std::string getSerial() const { return data.serial; }
uint32_t getSerialNumber() const { return Device::SerialStringToNum(getSerial()); }
std::optional<std::vector<uint8_t>> getPCBSerial();
std::optional<std::vector<uint8_t>> getMACAddress();
std::unordered_map<Network::NetID, MACAddress> getMACAddresses();
const neodevice_t& getNeoDevice() const { return data; }
virtual std::string getProductName() const { return getType().getGenericProductName(); }
std::string describe() const;
@@ -858,7 +859,7 @@ public:
}
virtual bool supportsTC10() const { return false; }
virtual bool supportsGPTP() const { return false; }
bool requestTC10Wake(Network::NetID network);
@@ -998,6 +999,8 @@ protected:
bool supportsNetworkMutex = false;
virtual bool supportsGetAllMACAddresses() const { return true; }
private:
neodevice_t data;
std::shared_ptr<ResetStatusMessage> latestResetStatus;