mirror of
https://github.com/intrepidcs/libicsneo.git
synced 2026-08-05 09:28:40 +02:00
Add Keysight branding where applicable
Because there is now more than one "product name" per device type, we have a concept of a "generic product name" which singularly maps onto a device type. This change comes with a few small breaking changes within the C++ API: DeviceType::GetDeviceTypeString has been renamed to DeviceType::GetGenericProductName to denote that the returned value is not device specific and device->getProductName() is preferable. The member function DeviceType::toString has been renamed to DeviceType::getGenericProductName for the same reason. The DeviceType std::ostream& operator<< has been removed to avoid accidental use of the generic product name.
This commit is contained in:
@@ -15,6 +15,11 @@ public:
|
||||
static constexpr DeviceType::Enum DEVICE_TYPE = DeviceType::FIRE2;
|
||||
static constexpr const char* SERIAL_START = "CY";
|
||||
|
||||
enum class SKU {
|
||||
Standard,
|
||||
AP1200A, // Keysight Branding
|
||||
};
|
||||
|
||||
static const std::vector<Network>& GetSupportedNetworks() {
|
||||
static std::vector<Network> supportedNetworks = {
|
||||
Network::NetID::HSCAN,
|
||||
@@ -47,6 +52,24 @@ public:
|
||||
return supportedNetworks;
|
||||
}
|
||||
|
||||
SKU getSKU() const {
|
||||
switch(getSerial().back()) {
|
||||
case 'A':
|
||||
return SKU::AP1200A;
|
||||
default:
|
||||
return SKU::Standard;
|
||||
}
|
||||
}
|
||||
|
||||
std::string getProductName() const override {
|
||||
switch(getSKU()) {
|
||||
case SKU::Standard: break;
|
||||
case SKU::AP1200A:
|
||||
return "Keysight AP1200A";
|
||||
}
|
||||
return Device::getProductName();
|
||||
}
|
||||
|
||||
size_t getEthernetActivationLineCount() const override { return 1; }
|
||||
size_t getUSBHostPowerCount() const override { return 1; }
|
||||
bool getBackupPowerSupported() const override { return true; }
|
||||
|
||||
Reference in New Issue
Block a user