mirror of
https://github.com/intrepidcs/libicsneo.git
synced 2026-08-05 01:18:36 +02:00
Device: Add ExtendedCommand::GetAllMACAddresses
This commit is contained in:
committed by
Kyle Schwarz
parent
49e578a657
commit
3ab06199c3
@@ -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;
|
||||
|
||||
@@ -62,6 +62,9 @@ protected:
|
||||
return true;
|
||||
}
|
||||
|
||||
bool supportsGetAllMACAddresses() const override {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -26,6 +26,11 @@ public:
|
||||
return ProductID::neoOBD2Pro;
|
||||
}
|
||||
|
||||
protected:
|
||||
bool supportsGetAllMACAddresses() const override {
|
||||
return false;
|
||||
}
|
||||
|
||||
private:
|
||||
NeoOBD2PRO(neodevice_t neodevice, const driver_factory_t& makeDriver) : Device(neodevice) {
|
||||
initialize(makeDriver);
|
||||
|
||||
@@ -25,6 +25,12 @@ public:
|
||||
ProductID getProductID() const override {
|
||||
return ProductID::neoOBD2Sim;
|
||||
}
|
||||
|
||||
protected:
|
||||
bool supportsGetAllMACAddresses() const override {
|
||||
return false;
|
||||
}
|
||||
|
||||
private:
|
||||
NeoOBD2SIM(neodevice_t neodevice, const driver_factory_t& makeDriver) : Device(neodevice) {
|
||||
initialize(makeDriver);
|
||||
|
||||
@@ -93,7 +93,6 @@ protected:
|
||||
}
|
||||
|
||||
bool supportsGPTP() const override { return true; }
|
||||
|
||||
size_t getDiskCount() const override {
|
||||
return 2;
|
||||
}
|
||||
|
||||
@@ -60,6 +60,12 @@ public:
|
||||
ProductID getProductID() const override {
|
||||
return ProductID::neoVIFIRE;
|
||||
}
|
||||
|
||||
protected:
|
||||
bool supportsGetAllMACAddresses() const override {
|
||||
return false;
|
||||
}
|
||||
|
||||
private:
|
||||
NeoVIFIRE(neodevice_t neodevice, const driver_factory_t& makeDriver) : Device(neodevice) {
|
||||
initialize<NeoVIFIRESettings>(makeDriver);
|
||||
|
||||
@@ -109,7 +109,7 @@ protected:
|
||||
void setupSupportedTXNetworks(std::vector<Network>& txNetworks) override { setupSupportedRXNetworks(txNetworks); }
|
||||
|
||||
bool supportsWiVI() const override { return true; }
|
||||
|
||||
|
||||
bool supportsLiveData() const override { return true; }
|
||||
|
||||
std::optional<MemoryAddress> getCoreminiStartAddressFlash() const override {
|
||||
|
||||
@@ -92,6 +92,10 @@ protected:
|
||||
}
|
||||
|
||||
bool supportsWiVI() const override { return true; }
|
||||
|
||||
bool supportsGetAllMACAddresses() const override {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -79,6 +79,10 @@ protected:
|
||||
size_t getDiskCount() const override {
|
||||
return 1;
|
||||
}
|
||||
|
||||
bool supportsGetAllMACAddresses() const override {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -85,6 +85,10 @@ protected:
|
||||
size_t getDiskCount() const override {
|
||||
return 1;
|
||||
}
|
||||
|
||||
bool supportsGetAllMACAddresses() const override {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
}; // namespace icsneo
|
||||
|
||||
@@ -80,6 +80,10 @@ protected:
|
||||
bool supportsEraseMemory() const override {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool supportsGetAllMACAddresses() const override {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -60,6 +60,10 @@ protected:
|
||||
bool supportsEraseMemory() const override {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool supportsGetAllMACAddresses() const override {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -71,6 +71,10 @@ protected:
|
||||
std::optional<MemoryAddress> getCoreminiStartAddressSD() const override {
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool supportsGetAllMACAddresses() const override {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -25,6 +25,11 @@ public:
|
||||
ProductID getProductID() const override {
|
||||
return ProductID::ValueCAN3;
|
||||
}
|
||||
|
||||
protected:
|
||||
bool supportsGetAllMACAddresses() const override {
|
||||
return false;
|
||||
}
|
||||
private:
|
||||
ValueCAN3(neodevice_t neodevice, const driver_factory_t& makeDriver) : Device(neodevice) {
|
||||
initialize<ValueCAN3Settings>(makeDriver);
|
||||
|
||||
@@ -28,6 +28,10 @@ protected:
|
||||
std::optional<MemoryAddress> getCoreminiStartAddressSD() const override {
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool supportsGetAllMACAddresses() const override {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -68,6 +68,10 @@ protected:
|
||||
bool supportsEraseMemory() const override {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool supportsGetAllMACAddresses() const override {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user