diff --git a/api/icsneoc/icsneoc.cpp b/api/icsneoc/icsneoc.cpp index 91b4bdb..8975224 100644 --- a/api/icsneoc/icsneoc.cpp +++ b/api/icsneoc/icsneoc.cpp @@ -306,7 +306,7 @@ bool icsneo_getProductName(const neodevice_t* device, char* str, size_t* maxLeng return true; } -bool icsneo_getProductNameForType(devicetype_t type, char* str, size_t* maxLength) { +bool icsneo_getProductNameForType(icsneo_devicetype_t type, char* str, size_t* maxLength) { // TAG String copy function if(maxLength == nullptr) { EventManager::GetInstance().add(APIEvent::Type::RequiredParameterNull, APIEvent::Severity::Error); @@ -608,7 +608,7 @@ size_t icsneo_getEventLimit(void) { return icsneo::GetEventLimit(); } -bool icsneo_getSupportedDevices(devicetype_t* devices, size_t* count) { +bool icsneo_getSupportedDevices(icsneo_devicetype_t* devices, size_t* count) { if(count == nullptr) { EventManager::GetInstance().add(APIEvent::Type::RequiredParameterNull, APIEvent::Severity::Error); return false; diff --git a/bindings/python/icsneopy/device/devicetype.cpp b/bindings/python/icsneopy/device/devicetype.cpp index 931aa7f..659b3d4 100644 --- a/bindings/python/icsneopy/device/devicetype.cpp +++ b/bindings/python/icsneopy/device/devicetype.cpp @@ -2,73 +2,73 @@ #include #include -#include "icsneo/device/devicetype.h" +#include namespace icsneo { void init_devicetype(pybind11::module_& m) { pybind11::class_ deviceType(m, "DeviceType"); - pybind11::enum_(deviceType, "Enum") - .value("Unknown", DeviceType::Enum::Unknown) - .value("BLUE", DeviceType::Enum::BLUE) - .value("ECU_AVB", DeviceType::Enum::ECU_AVB) - .value("RADSupermoon", DeviceType::Enum::RADSupermoon) - .value("DW_VCAN", DeviceType::Enum::DW_VCAN) - .value("RADMoon2", DeviceType::Enum::RADMoon2) - .value("RADMars", DeviceType::Enum::RADMars) - .value("VCAN4_1", DeviceType::Enum::VCAN4_1) - .value("FIRE", DeviceType::Enum::FIRE) - .value("RADPluto", DeviceType::Enum::RADPluto) - .value("VCAN4_2EL", DeviceType::Enum::VCAN4_2EL) - .value("RADIO_CANHUB", DeviceType::Enum::RADIO_CANHUB) - .value("NEOECU12", DeviceType::Enum::NEOECU12) - .value("OBD2_LCBADGE", DeviceType::Enum::OBD2_LCBADGE) - .value("RADMoonDuo", DeviceType::Enum::RADMoonDuo) - .value("FIRE3", DeviceType::Enum::FIRE3) - .value("VCAN3", DeviceType::Enum::VCAN3) - .value("RADJupiter", DeviceType::Enum::RADJupiter) - .value("VCAN4_IND", DeviceType::Enum::VCAN4_IND) - .value("RADGigastar", DeviceType::Enum::RADGigastar) - .value("RED2", DeviceType::Enum::RED2) - .value("EtherBADGE", DeviceType::Enum::EtherBADGE) - .value("RAD_A2B", DeviceType::Enum::RAD_A2B) - .value("RADEpsilon", DeviceType::Enum::RADEpsilon) - .value("RADMoon3", DeviceType::Enum::RADMoon3) - .value("RADComet", DeviceType::Enum::RADComet) - .value("FIRE3_FlexRay", DeviceType::Enum::FIRE3_FlexRay) - .value("Connect", DeviceType::Enum::Connect) - .value("RADComet3", DeviceType::Enum::RADComet3) - .value("RADMoonT1S", DeviceType::Enum::RADMoonT1S) - .value("RADGigastar2", DeviceType::Enum::RADGigastar2) - .value("RED", DeviceType::Enum::RED) - .value("ECU", DeviceType::Enum::ECU) - .value("IEVB", DeviceType::Enum::IEVB) - .value("Pendant", DeviceType::Enum::Pendant) - .value("OBD2_PRO", DeviceType::Enum::OBD2_PRO) - .value("ECUChip_UART", DeviceType::Enum::ECUChip_UART) - .value("PLASMA", DeviceType::Enum::PLASMA) - .value("DONT_REUSE0", DeviceType::Enum::DONT_REUSE0) - .value("NEOAnalog", DeviceType::Enum::NEOAnalog) - .value("CT_OBD", DeviceType::Enum::CT_OBD) - .value("DONT_REUSE1", DeviceType::Enum::DONT_REUSE1) - .value("DONT_REUSE2", DeviceType::Enum::DONT_REUSE2) - .value("ION", DeviceType::Enum::ION) - .value("RADStar", DeviceType::Enum::RADStar) - .value("DONT_REUSE3", DeviceType::Enum::DONT_REUSE3) - .value("VCAN4_4", DeviceType::Enum::VCAN4_4) - .value("VCAN4_2", DeviceType::Enum::VCAN4_2) - .value("CMProbe", DeviceType::Enum::CMProbe) - .value("EEVB", DeviceType::Enum::EEVB) - .value("VCANrf", DeviceType::Enum::VCANrf) - .value("FIRE2", DeviceType::Enum::FIRE2) - .value("Flex", DeviceType::Enum::Flex) - .value("RADGalaxy", DeviceType::Enum::RADGalaxy) - .value("RADStar2", DeviceType::Enum::RADStar2) - .value("VividCAN", DeviceType::Enum::VividCAN) - .value("OBD2_SIM", DeviceType::Enum::OBD2_SIM); - deviceType.def(pybind11::init()); - deviceType.def("get_device_type", &DeviceType::getDeviceType); - deviceType.def("get_generic_product_name", &DeviceType::getGenericProductName); + pybind11::enum_(deviceType, "Enum") + .value("Unknown", _icsneo_devicetype_t::Unknown) + .value("BLUE", _icsneo_devicetype_t::BLUE) + .value("ECU_AVB", _icsneo_devicetype_t::ECU_AVB) + .value("RADSupermoon", _icsneo_devicetype_t::RADSupermoon) + .value("DW_VCAN", _icsneo_devicetype_t::DW_VCAN) + .value("RADMoon2", _icsneo_devicetype_t::RADMoon2) + .value("RADMars", _icsneo_devicetype_t::RADMars) + .value("VCAN4_1", _icsneo_devicetype_t::VCAN4_1) + .value("FIRE", _icsneo_devicetype_t::FIRE) + .value("RADPluto", _icsneo_devicetype_t::RADPluto) + .value("VCAN4_2EL", _icsneo_devicetype_t::VCAN4_2EL) + .value("RADIO_CANHUB", _icsneo_devicetype_t::RADIO_CANHUB) + .value("NEOECU12", _icsneo_devicetype_t::NEOECU12) + .value("OBD2_LCBADGE", _icsneo_devicetype_t::OBD2_LCBADGE) + .value("RADMoonDuo", _icsneo_devicetype_t::RADMoonDuo) + .value("FIRE3", _icsneo_devicetype_t::FIRE3) + .value("VCAN3", _icsneo_devicetype_t::VCAN3) + .value("RADJupiter", _icsneo_devicetype_t::RADJupiter) + .value("VCAN4_IND", _icsneo_devicetype_t::VCAN4_IND) + .value("RADGigastar", _icsneo_devicetype_t::RADGigastar) + .value("RED2", _icsneo_devicetype_t::RED2) + .value("EtherBADGE", _icsneo_devicetype_t::EtherBADGE) + .value("RAD_A2B", _icsneo_devicetype_t::RAD_A2B) + .value("RADEpsilon", _icsneo_devicetype_t::RADEpsilon) + .value("RADMoon3", _icsneo_devicetype_t::RADMoon3) + .value("RADComet", _icsneo_devicetype_t::RADComet) + .value("FIRE3_FlexRay", _icsneo_devicetype_t::FIRE3_FlexRay) + .value("Connect", _icsneo_devicetype_t::Connect) + .value("RADComet3", _icsneo_devicetype_t::RADComet3) + .value("RADMoonT1S", _icsneo_devicetype_t::RADMoonT1S) + .value("RADGigastar2", _icsneo_devicetype_t::RADGigastar2) + .value("RED", _icsneo_devicetype_t::RED) + .value("ECU", _icsneo_devicetype_t::ECU) + .value("IEVB", _icsneo_devicetype_t::IEVB) + .value("Pendant", _icsneo_devicetype_t::Pendant) + .value("OBD2_PRO", _icsneo_devicetype_t::OBD2_PRO) + .value("ECUChip_UART", _icsneo_devicetype_t::ECUChip_UART) + .value("PLASMA", _icsneo_devicetype_t::PLASMA) + .value("DONT_REUSE0", _icsneo_devicetype_t::DONT_REUSE0) + .value("NEOAnalog", _icsneo_devicetype_t::NEOAnalog) + .value("CT_OBD", _icsneo_devicetype_t::CT_OBD) + .value("DONT_REUSE1", _icsneo_devicetype_t::DONT_REUSE1) + .value("DONT_REUSE2", _icsneo_devicetype_t::DONT_REUSE2) + .value("ION", _icsneo_devicetype_t::ION) + .value("RADStar", _icsneo_devicetype_t::RADStar) + .value("DONT_REUSE3", _icsneo_devicetype_t::DONT_REUSE3) + .value("VCAN4_4", _icsneo_devicetype_t::VCAN4_4) + .value("VCAN4_2", _icsneo_devicetype_t::VCAN4_2) + .value("CMProbe", _icsneo_devicetype_t::CMProbe) + .value("EEVB", _icsneo_devicetype_t::EEVB) + .value("VCANrf", _icsneo_devicetype_t::VCANrf) + .value("FIRE2", _icsneo_devicetype_t::FIRE2) + .value("Flex", _icsneo_devicetype_t::Flex) + .value("RADGalaxy", _icsneo_devicetype_t::RADGalaxy) + .value("RADStar2", _icsneo_devicetype_t::RADStar2) + .value("VividCAN", _icsneo_devicetype_t::VividCAN) + .value("OBD2_SIM", _icsneo_devicetype_t::OBD2_SIM); + deviceType.def(pybind11::init()); + deviceType.def("get_device_type", &_icsneo_devicetype_t::getDeviceType); + deviceType.def("get_generic_product_name", &_icsneo_devicetype_t::getGenericProductName); } } // namespace icsneo diff --git a/device/neodevice.cpp b/device/neodevice.cpp index 0376330..7d66394 100644 --- a/device/neodevice.cpp +++ b/device/neodevice.cpp @@ -6,7 +6,7 @@ neodevice_t::neodevice_t() : device(nullptr), handle(0), type(0) { memset(serial, 0, sizeof(serial)); } -neodevice_t::neodevice_t(const icsneo::FoundDevice& found, devicetype_t inType) +neodevice_t::neodevice_t(const icsneo::FoundDevice& found, icsneo_devicetype_t inType) : device(nullptr), handle(found.handle), type(inType) { static_assert(sizeof(found.serial) == sizeof(serial), "Serial sizes should match!"); memcpy(serial, found.serial, sizeof(serial)); diff --git a/include/icsneo/device/device.h b/include/icsneo/device/device.h index 84856ea..34f3b60 100644 --- a/include/icsneo/device/device.h +++ b/include/icsneo/device/device.h @@ -53,7 +53,7 @@ #define ICSNEO_FINDABLE_DEVICE_BASE(className, type) \ - static constexpr DeviceType::Enum DEVICE_TYPE = type; \ + static constexpr icsneo_devicetype_t DEVICE_TYPE = type; \ className(const FoundDevice& dev) : className(neodevice_t(dev, DEVICE_TYPE), dev.makeDriver) {} // Devices which are discernable by the first two characters of their serial diff --git a/include/icsneo/device/devicetype.h b/include/icsneo/device/devicetype.h index c6d377e..b19800d 100644 --- a/include/icsneo/device/devicetype.h +++ b/include/icsneo/device/devicetype.h @@ -1,87 +1,19 @@ -#ifndef __DEVICETYPE_H_ -#define __DEVICETYPE_H_ +#pragma once // Hold the length of the longest name, so that C applications can allocate memory accordingly // Currently the longest is "Intrepid Ethernet Evaluation Board" #define ICSNEO_DEVICETYPE_LONGEST_NAME (35 + 1) // Add 1 so that if someone forgets, they still have space for null terminator #define ICSNEO_DEVICETYPE_LONGEST_DESCRIPTION (ICSNEO_DEVICETYPE_LONGEST_NAME + 7) // 6 character serial, plus space -#ifndef __cplusplus -#include - -typedef uint32_t devicetype_t; -#else #include #include +#include -typedef uint32_t devicetype_t; namespace icsneo { class DeviceType { public: - // This enum used to be a bitfield, but has since become an enum as we have more than 32 devices - // Adding something? Make sure you update the type string and C-compatible defines below! - enum Enum : devicetype_t { - Unknown = (0x00000000), - BLUE = (0x00000001), - ECU_AVB = (0x00000002), - RADSupermoon = (0x00000003), - DW_VCAN = (0x00000004), - RADMoon2 = (0x00000005), - RADMars = (0x00000006), - VCAN4_1 = (0x00000007), - FIRE = (0x00000008), - RADPluto = (0x00000009), - VCAN4_2EL = (0x0000000a), - RADIO_CANHUB = (0x0000000b), - NEOECU12 = (0x0000000c), - OBD2_LCBADGE = (0x0000000d), - RADMoonDuo = (0x0000000e), - FIRE3 = (0x0000000f), - VCAN3 = (0x00000010), - RADJupiter = (0x00000011), - VCAN4_IND = (0x00000012), - RADGigastar = (0x00000013), - RED2 = (0x00000014), - EtherBADGE = (0x00000016), - RAD_A2B = (0x00000017), - RADEpsilon = (0x00000018), - RADMoon3 = (0x00000023), - RADComet = (0x00000024), - FIRE3_FlexRay = (0x00000025), - Connect = (0x00000026), - RADComet3 = (0x00000027), - RADMoonT1S = (0x00000028), - RADGigastar2 = (0x00000029), - RED = (0x00000040), - ECU = (0x00000080), - IEVB = (0x00000100), - Pendant = (0x00000200), - OBD2_PRO = (0x00000400), - ECUChip_UART = (0x00000800), - PLASMA = (0x00001000), - DONT_REUSE0 = (0x00002000), // Previously FIRE_VNET - NEOAnalog = (0x00004000), - CT_OBD = (0x00008000), - DONT_REUSE1 = (0x00010000), // Previously PLASMA_1_12 - DONT_REUSE2 = (0x00020000), // Previously PLASMA_1_13 - ION = (0x00040000), - RADStar = (0x00080000), - DONT_REUSE3 = (0x00100000), // Previously ION3 - VCAN4_4 = (0x00200000), - VCAN4_2 = (0x00400000), - CMProbe = (0x00800000), - EEVB = (0x01000000), - VCANrf = (0x02000000), - FIRE2 = (0x04000000), - Flex = (0x08000000), - RADGalaxy = (0x10000000), - RADStar2 = (0x20000000), - VividCAN = (0x40000000), - OBD2_SIM = (0x80000000) - }; - /** * Get the generic product name for this device type. * @@ -89,9 +21,9 @@ public: * as the product name may change based on device-specific factors, such as serial * number. */ - static const char* GetGenericProductName(DeviceType::Enum type) { + static const char* GetGenericProductName(_icsneo_devicetype_t t) { // Adding something? Make sure you update DEVICE_TYPE_LONGEST_NAME at the top! - switch(type) { + switch(t) { case Unknown: return "Unknown"; case BLUE: @@ -208,79 +140,12 @@ public: return "Unknown neoVI"; } - DeviceType() { value = DeviceType::Enum::Unknown; } - DeviceType(devicetype_t netid) { value = (DeviceType::Enum)netid; } - DeviceType(DeviceType::Enum netid) { value = netid; } - DeviceType::Enum getDeviceType() const { return value; } + DeviceType() { value = _icsneo_devicetype_t::Unknown; } + DeviceType(icsneo_devicetype_t device_type) { value = device_type; } + icsneo_devicetype_t getDeviceType() const { return value; } std::string getGenericProductName() const { return GetGenericProductName(getDeviceType()); } - operator devicetype_t() const { return getDeviceType(); } + operator icsneo_devicetype_t() const { return getDeviceType(); } private: - DeviceType::Enum value; + icsneo_devicetype_t value; }; - -} - -#endif // __cplusplus - -#ifdef __ICSNEOC_H_ // We are using the C API, so we want C-compatible defines -#define ICSNEO_DEVICETYPE_UNKNOWN ((devicetype_t)0x00000000) -#define ICSNEO_DEVICETYPE_BLUE ((devicetype_t)0x00000001) -#define ICSNEO_DEVICETYPE_ECU_AVB ((devicetype_t)0x00000002) -#define ICSNEO_DEVICETYPE_RADSUPERMOON ((devicetype_t)0x00000003) -#define ICSNEO_DEVICETYPE_DW_VCAN ((devicetype_t)0x00000004) -#define ICSNEO_DEVICETYPE_RADMOON2 ((devicetype_t)0x00000005) -#define ICSNEO_DEVICETYPE_RADMARS ((devicetype_t)0x00000006) -#define ICSNEO_DEVICETYPE_VCAN4_1 ((devicetype_t)0x00000007) -#define ICSNEO_DEVICETYPE_FIRE ((devicetype_t)0x00000008) -#define ICSNEO_DEVICETYPE_RADPLUTO ((devicetype_t)0x00000009) -#define ICSNEO_DEVICETYPE_VCAN4_2EL ((devicetype_t)0x0000000a) -#define ICSNEO_DEVICETYPE_RADIO_CANHUB ((devicetype_t)0x0000000b) -#define ICSNEO_DEVICETYPE_NEOECU12 ((devicetype_t)0x0000000c) -#define ICSNEO_DEVICETYPE_OBD2_LCBADGE ((devicetype_t)0x0000000d) -#define ICSNEO_DEVICETYPE_RADMOONDUO ((devicetype_t)0x0000000e) -#define ICSNEO_DEVICETYPE_FIRE3 ((devicetype_t)0x0000000f) -#define ICSNEO_DEVICETYPE_VCAN3 ((devicetype_t)0x00000010) -#define ICSNEO_DEVICETYPE_RADJUPITER ((devicetype_t)0x00000011) -#define ICSNEO_DEVICETYPE_VCAN4_IND ((devicetype_t)0x00000012) -#define ICSNEO_DEVICETYPE_RADGIGASTAR ((devicetype_t)0x00000013) -#define ICSNEO_DEVICETYPE_RED2 ((devicetype_t)0x00000014) -#define ICSNEO_DEVICETYPE_ETHERBADGE ((devicetype_t)0x00000016) -#define ICSNEO_DEVICETYPE_RAD_A2B ((devicetype_t)0x00000017) -#define ICSNEO_DEVICETYPE_RADEPSILON ((devicetype_t)0x00000018) -#define ICSNEO_DEVICETYPE_RADMoon3 ((devicetype_t)0x00000023) -#define ICSNEO_DEVICETYPE_RADCOMET ((devicetype_t)0x00000024) -#define ICSNEO_DEVICETYPE_FIRE3FLEXRAY ((devicetype_t)0x00000025) -#define ICSNEO_DEVICETYPE_CONNECT ((devicetype_t)0x00000026) -#define ICSNEO_DEVICETYPE_RADCOMET3 ((devicetype_t)0x00000027) -#define ICSNEO_DEVICETYPE_RADMOONT1S ((devicetype_t)0x00000028) -#define ICSNEO_DEVICETYPE_RADGIGASTAR2 ((devicetype_t)0x00000029) -#define ICSNEO_DEVICETYPE_RED ((devicetype_t)0x00000040) -#define ICSNEO_DEVICETYPE_ECU ((devicetype_t)0x00000080) -#define ICSNEO_DEVICETYPE_IEVB ((devicetype_t)0x00000100) -#define ICSNEO_DEVICETYPE_PENDANT ((devicetype_t)0x00000200) -#define ICSNEO_DEVICETYPE_OBD2_PRO ((devicetype_t)0x00000400) -#define ICSNEO_DEVICETYPE_ECUCHIP_UART ((devicetype_t)0x00000800) -#define ICSNEO_DEVICETYPE_PLASMA ((devicetype_t)0x00001000) -#define ICSNEO_DEVICETYPE_DONT_REUSE0 ((devicetype_t)0x00002000) // Previously FIRE_VNET -#define ICSNEO_DEVICETYPE_NEOANALOG ((devicetype_t)0x00004000) -#define ICSNEO_DEVICETYPE_CT_OBD ((devicetype_t)0x00008000) -#define ICSNEO_DEVICETYPE_DONT_REUSE1 ((devicetype_t)0x00010000) // Previously PLASMA_1_12 -#define ICSNEO_DEVICETYPE_DONT_REUSE2 ((devicetype_t)0x00020000) // Previously PLASMA_1_13 -#define ICSNEO_DEVICETYPE_ION ((devicetype_t)0x00040000) -#define ICSNEO_DEVICETYPE_RADSTAR ((devicetype_t)0x00080000) -#define ICSNEO_DEVICETYPE_DONT_REUSE3 ((devicetype_t)0x00100000) // Previously ION3 -#define ICSNEO_DEVICETYPE_VCAN4_4 ((devicetype_t)0x00200000) -#define ICSNEO_DEVICETYPE_VCAN4_2 ((devicetype_t)0x00400000) -#define ICSNEO_DEVICETYPE_CMPROBE ((devicetype_t)0x00800000) -#define ICSNEO_DEVICETYPE_EEVB ((devicetype_t)0x01000000) -#define ICSNEO_DEVICETYPE_VCANRF ((devicetype_t)0x02000000) -#define ICSNEO_DEVICETYPE_FIRE2 ((devicetype_t)0x04000000) -#define ICSNEO_DEVICETYPE_FLEX ((devicetype_t)0x08000000) -#define ICSNEO_DEVICETYPE_RADGALAXY ((devicetype_t)0x10000000) -#define ICSNEO_DEVICETYPE_RADSTAR2 ((devicetype_t)0x20000000) -#define ICSNEO_DEVICETYPE_VIVIDCAN ((devicetype_t)0x40000000) -#define ICSNEO_DEVICETYPE_OBD2_SIM ((devicetype_t)0x80000000) -#endif - -#endif diff --git a/include/icsneo/device/neodevice.h b/include/icsneo/device/neodevice.h index 94395fb..d3c9924 100644 --- a/include/icsneo/device/neodevice.h +++ b/include/icsneo/device/neodevice.h @@ -24,13 +24,13 @@ typedef int32_t neodevice_handle_t; #ifdef __cplusplus typedef struct neodevice_t { neodevice_t(); - neodevice_t(const icsneo::FoundDevice& found, devicetype_t inType); + neodevice_t(const icsneo::FoundDevice& found, icsneo_devicetype_t inType); #else typedef struct { #endif devicehandle_t device; // Pointer back to the C++ device object neodevice_handle_t handle; // Handle for use by the underlying driver - devicetype_t type; + icsneo_devicetype_t type; char serial[7]; } neodevice_t; diff --git a/include/icsneo/device/tree/etherbadge/etherbadge.h b/include/icsneo/device/tree/etherbadge/etherbadge.h index ed3acab..9b1f733 100644 --- a/include/icsneo/device/tree/etherbadge/etherbadge.h +++ b/include/icsneo/device/tree/etherbadge/etherbadge.h @@ -15,7 +15,7 @@ class EtherBADGE : public Device { public: // Serial numbers start with EB // USB PID is 0x1107, standard driver is CDCACM - ICSNEO_FINDABLE_DEVICE(EtherBADGE, DeviceType::EtherBADGE, "EB"); + ICSNEO_FINDABLE_DEVICE(EtherBADGE, _icsneo_devicetype_t::EtherBADGE, "EB"); static const std::vector& GetSupportedNetworks() { static std::vector supportedNetworks = { diff --git a/include/icsneo/device/tree/neoobd2pro/neoobd2pro.h b/include/icsneo/device/tree/neoobd2pro/neoobd2pro.h index 3b36901..56509c0 100644 --- a/include/icsneo/device/tree/neoobd2pro/neoobd2pro.h +++ b/include/icsneo/device/tree/neoobd2pro/neoobd2pro.h @@ -12,7 +12,7 @@ class NeoOBD2PRO : public Device { public: // Serial numbers start with NP // USB PID is 0x1103, standard driver is CDCACM - ICSNEO_FINDABLE_DEVICE(NeoOBD2PRO, DeviceType::OBD2_PRO, "NP"); + ICSNEO_FINDABLE_DEVICE(NeoOBD2PRO, _icsneo_devicetype_t::OBD2_PRO, "NP"); static const std::vector& GetSupportedNetworks() { static std::vector supportedNetworks = { diff --git a/include/icsneo/device/tree/neoobd2sim/neoobd2sim.h b/include/icsneo/device/tree/neoobd2sim/neoobd2sim.h index ac8f48c..393a633 100644 --- a/include/icsneo/device/tree/neoobd2sim/neoobd2sim.h +++ b/include/icsneo/device/tree/neoobd2sim/neoobd2sim.h @@ -12,7 +12,7 @@ class NeoOBD2SIM : public Device { public: // Serial numbers start with OS // USB PID is 0x1100, standard driver is CDCACM - ICSNEO_FINDABLE_DEVICE(NeoOBD2SIM, DeviceType::OBD2_SIM, "OS"); + ICSNEO_FINDABLE_DEVICE(NeoOBD2SIM, _icsneo_devicetype_t::OBD2_SIM, "OS"); static const std::vector& GetSupportedNetworks() { static std::vector supportedNetworks = { diff --git a/include/icsneo/device/tree/neoviconnect/neoviconnect.h b/include/icsneo/device/tree/neoviconnect/neoviconnect.h index eeae143..912fd91 100644 --- a/include/icsneo/device/tree/neoviconnect/neoviconnect.h +++ b/include/icsneo/device/tree/neoviconnect/neoviconnect.h @@ -13,7 +13,7 @@ class NeoVIConnect : public Device { public: // Serial numbers start with DM // Ethernet MAC allocation is 0x1F, standard driver is Raw - ICSNEO_FINDABLE_DEVICE(NeoVIConnect, DeviceType::Connect, "DM"); + ICSNEO_FINDABLE_DEVICE(NeoVIConnect, _icsneo_devicetype_t::Connect, "DM"); static const std::vector& GetSupportedNetworks() { static std::vector supportedNetworks = { diff --git a/include/icsneo/device/tree/neovifire/neovifire.h b/include/icsneo/device/tree/neovifire/neovifire.h index 37fed45..0f8ea93 100644 --- a/include/icsneo/device/tree/neovifire/neovifire.h +++ b/include/icsneo/device/tree/neovifire/neovifire.h @@ -12,7 +12,7 @@ namespace icsneo { class NeoVIFIRE : public Device { public: // USB PID is 0x0701, standard driver is FTDI - ICSNEO_FINDABLE_DEVICE_BY_PID(NeoVIFIRE, DeviceType::FIRE, 0x0701); + ICSNEO_FINDABLE_DEVICE_BY_PID(NeoVIFIRE, _icsneo_devicetype_t::FIRE, 0x0701); static const std::vector& GetSupportedNetworks() { static std::vector supportedNetworks = { diff --git a/include/icsneo/device/tree/neovifire2/neovifire2.h b/include/icsneo/device/tree/neovifire2/neovifire2.h index eaaac6e..7772c57 100644 --- a/include/icsneo/device/tree/neovifire2/neovifire2.h +++ b/include/icsneo/device/tree/neovifire2/neovifire2.h @@ -14,7 +14,7 @@ public: // Serial numbers start with CY // USB PID is 0x1000, standard driver is FTDI // Ethernet MAC allocation is 0x04, standard driver is Raw - ICSNEO_FINDABLE_DEVICE(NeoVIFIRE2, DeviceType::FIRE2, "CY"); + ICSNEO_FINDABLE_DEVICE(NeoVIFIRE2, _icsneo_devicetype_t::FIRE2, "CY"); enum class SKU { Standard, diff --git a/include/icsneo/device/tree/neovifire3/neovifire3.h b/include/icsneo/device/tree/neovifire3/neovifire3.h index 9c0c702..dd9c711 100644 --- a/include/icsneo/device/tree/neovifire3/neovifire3.h +++ b/include/icsneo/device/tree/neovifire3/neovifire3.h @@ -13,7 +13,7 @@ class NeoVIFIRE3 : public Device { public: // Serial numbers start with ON // Ethernet MAC allocation is 0x0E, standard driver is Raw - ICSNEO_FINDABLE_DEVICE(NeoVIFIRE3, DeviceType::FIRE3, "ON"); + ICSNEO_FINDABLE_DEVICE(NeoVIFIRE3, _icsneo_devicetype_t::FIRE3, "ON"); static const std::vector& GetSupportedNetworks() { static std::vector supportedNetworks = { diff --git a/include/icsneo/device/tree/neovifire3flexray/neovifire3flexray.h b/include/icsneo/device/tree/neovifire3flexray/neovifire3flexray.h index d97f45a..f62fe16 100644 --- a/include/icsneo/device/tree/neovifire3flexray/neovifire3flexray.h +++ b/include/icsneo/device/tree/neovifire3flexray/neovifire3flexray.h @@ -13,7 +13,7 @@ class NeoVIFIRE3FlexRay : public Device { public: // Serial numbers start with FF // Ethernet MAC allocation is 1F, standard driver is Raw - ICSNEO_FINDABLE_DEVICE(NeoVIFIRE3FlexRay, DeviceType::FIRE3_FlexRay, "FF"); + ICSNEO_FINDABLE_DEVICE(NeoVIFIRE3FlexRay, _icsneo_devicetype_t::FIRE3_FlexRay, "FF"); static const std::vector& GetSupportedNetworks() { static std::vector supportedNetworks = { diff --git a/include/icsneo/device/tree/neovired2/neovired2.h b/include/icsneo/device/tree/neovired2/neovired2.h index e4ba909..7a778b5 100644 --- a/include/icsneo/device/tree/neovired2/neovired2.h +++ b/include/icsneo/device/tree/neovired2/neovired2.h @@ -13,7 +13,7 @@ class NeoVIRED2 : public Device { public: // Serial numbers start with D2 // Ethernet MAC allocation is 0x0E, standard driver is Raw - ICSNEO_FINDABLE_DEVICE(NeoVIRED2, DeviceType::RED2, "D2"); + ICSNEO_FINDABLE_DEVICE(NeoVIRED2, _icsneo_devicetype_t::RED2, "D2"); static const std::vector& GetSupportedNetworks() { static std::vector supportedNetworks = { diff --git a/include/icsneo/device/tree/plasion/neoviion.h b/include/icsneo/device/tree/plasion/neoviion.h index b1c2ccb..220730d 100644 --- a/include/icsneo/device/tree/plasion/neoviion.h +++ b/include/icsneo/device/tree/plasion/neoviion.h @@ -13,7 +13,7 @@ namespace icsneo { class NeoVIION : public Plasion { public: // USB PID is 0x0901, standard driver is FTDI - ICSNEO_FINDABLE_DEVICE_BY_PID(NeoVIION, DeviceType::ION, 0x0901); + ICSNEO_FINDABLE_DEVICE_BY_PID(NeoVIION, _icsneo_devicetype_t::ION, 0x0901); bool supportsComponentVersions() const override { return true; } diff --git a/include/icsneo/device/tree/plasion/neoviplasma.h b/include/icsneo/device/tree/plasion/neoviplasma.h index 3f8f629..4b7f113 100644 --- a/include/icsneo/device/tree/plasion/neoviplasma.h +++ b/include/icsneo/device/tree/plasion/neoviplasma.h @@ -11,7 +11,7 @@ namespace icsneo { class NeoVIPLASMA : public Plasion { public: // USB PID is 0x0801, standard driver is FTDI - ICSNEO_FINDABLE_DEVICE_BY_PID(NeoVIPLASMA, DeviceType::PLASMA, 0x0801); + ICSNEO_FINDABLE_DEVICE_BY_PID(NeoVIPLASMA, _icsneo_devicetype_t::PLASMA, 0x0801); private: NeoVIPLASMA(neodevice_t neodevice, const driver_factory_t& makeDriver) : Plasion(neodevice) { diff --git a/include/icsneo/device/tree/rada2b/rada2b.h b/include/icsneo/device/tree/rada2b/rada2b.h index 8a39ac0..338b0f8 100644 --- a/include/icsneo/device/tree/rada2b/rada2b.h +++ b/include/icsneo/device/tree/rada2b/rada2b.h @@ -17,7 +17,7 @@ public: // Serial numbers start with AB // USB PID is 0x0006, standard driver is FTDI // Ethernet MAC allocation is 0x18, standard driver is Raw - ICSNEO_FINDABLE_DEVICE(RADA2B, DeviceType::RAD_A2B, "AB"); + ICSNEO_FINDABLE_DEVICE(RADA2B, _icsneo_devicetype_t::RAD_A2B, "AB"); static const std::vector& GetSupportedNetworks() { static std::vector supportedNetworks = { diff --git a/include/icsneo/device/tree/radcomet/radcomet.h b/include/icsneo/device/tree/radcomet/radcomet.h index 4a15086..ace6d1c 100644 --- a/include/icsneo/device/tree/radcomet/radcomet.h +++ b/include/icsneo/device/tree/radcomet/radcomet.h @@ -14,7 +14,7 @@ public: // Serial numbers start with RC // USB PID is 0x1207, standard driver is FTDI3 // Ethernet MAC allocation is 0x1D, standard driver is Raw - ICSNEO_FINDABLE_DEVICE_BY_SERIAL_RANGE(RADComet, DeviceType::RADComet, "RC0000", "RC0299"); + ICSNEO_FINDABLE_DEVICE_BY_SERIAL_RANGE(RADComet, _icsneo_devicetype_t::RADComet, "RC0000", "RC0299"); std::string getProductName() const override { return "RAD-Comet"; diff --git a/include/icsneo/device/tree/radcomet/radcomet2.h b/include/icsneo/device/tree/radcomet/radcomet2.h index 8b6b0da..778741a 100644 --- a/include/icsneo/device/tree/radcomet/radcomet2.h +++ b/include/icsneo/device/tree/radcomet/radcomet2.h @@ -14,7 +14,7 @@ public: // Serial numbers start with RC, Comet2 starts at RC0300 // USB PID is 0x1207, standard driver is FTDI3 // Ethernet MAC allocation is 0x1D, standard driver is Raw - ICSNEO_FINDABLE_DEVICE_BY_SERIAL_RANGE(RADComet2, DeviceType::RADComet, "RC0300", "RCZZZZ"); + ICSNEO_FINDABLE_DEVICE_BY_SERIAL_RANGE(RADComet2, _icsneo_devicetype_t::RADComet, "RC0300", "RCZZZZ"); std::string getProductName() const override { return "RAD-Comet 2"; diff --git a/include/icsneo/device/tree/radcomet3/radcomet3.h b/include/icsneo/device/tree/radcomet3/radcomet3.h index 476d8f2..3abf24f 100644 --- a/include/icsneo/device/tree/radcomet3/radcomet3.h +++ b/include/icsneo/device/tree/radcomet3/radcomet3.h @@ -14,7 +14,7 @@ public: // Serial numbers start with C3 // USB PID is 0x1208, standard driver is FTDI3 // Ethernet MAC allocation is 0x20, standard driver is Raw - ICSNEO_FINDABLE_DEVICE(RADComet3, DeviceType::RADComet3, "C3"); + ICSNEO_FINDABLE_DEVICE(RADComet3, _icsneo_devicetype_t::RADComet3, "C3"); static const std::vector& GetSupportedNetworks() { static std::vector supportedNetworks = { diff --git a/include/icsneo/device/tree/radepsilon/radepsilon.h b/include/icsneo/device/tree/radepsilon/radepsilon.h index 3b51a8a..c2c0ea1 100644 --- a/include/icsneo/device/tree/radepsilon/radepsilon.h +++ b/include/icsneo/device/tree/radepsilon/radepsilon.h @@ -10,7 +10,7 @@ class RADEpsilon : public Device { public: // Serial numbers start with RE // USB PID is 0x1109, standard driver is CDCACM - ICSNEO_FINDABLE_DEVICE(RADEpsilon, DeviceType::RADEpsilon, "RE"); + ICSNEO_FINDABLE_DEVICE(RADEpsilon, _icsneo_devicetype_t::RADEpsilon, "RE"); static const std::vector& GetSupportedNetworks() { static std::vector supportedNetworks = { diff --git a/include/icsneo/device/tree/radgalaxy/radgalaxy.h b/include/icsneo/device/tree/radgalaxy/radgalaxy.h index 887740c..e34667f 100644 --- a/include/icsneo/device/tree/radgalaxy/radgalaxy.h +++ b/include/icsneo/device/tree/radgalaxy/radgalaxy.h @@ -17,7 +17,7 @@ class RADGalaxy : public Device { public: // Serial numbers start with RG // Ethernet MAC allocation is 0x03, standard driver is Raw - ICSNEO_FINDABLE_DEVICE(RADGalaxy, DeviceType::RADGalaxy, "RG"); + ICSNEO_FINDABLE_DEVICE(RADGalaxy, _icsneo_devicetype_t::RADGalaxy, "RG"); static const std::vector& GetSupportedNetworks() { static std::vector supportedNetworks = { diff --git a/include/icsneo/device/tree/radgigastar/radgigastar.h b/include/icsneo/device/tree/radgigastar/radgigastar.h index debed94..777d91f 100644 --- a/include/icsneo/device/tree/radgigastar/radgigastar.h +++ b/include/icsneo/device/tree/radgigastar/radgigastar.h @@ -16,7 +16,7 @@ public: // Serial numbers start with GS // USB PID is 0x1204, standard driver is FTDI3 // Ethernet MAC allocation is 0x0F, standard driver is Raw - ICSNEO_FINDABLE_DEVICE(RADGigastar, DeviceType::RADGigastar, "GS"); + ICSNEO_FINDABLE_DEVICE(RADGigastar, _icsneo_devicetype_t::RADGigastar, "GS"); size_t getEthernetActivationLineCount() const override { return 1; } diff --git a/include/icsneo/device/tree/radgigastar2/radgigastar2.h b/include/icsneo/device/tree/radgigastar2/radgigastar2.h index 700e168..4b67b2a 100644 --- a/include/icsneo/device/tree/radgigastar2/radgigastar2.h +++ b/include/icsneo/device/tree/radgigastar2/radgigastar2.h @@ -18,7 +18,7 @@ namespace icsneo // Serial numbers start with GT // USB PID is 0x1210, standard driver is FTDI3 // Ethernet MAC allocation is 0x22, standard driver is Raw - ICSNEO_FINDABLE_DEVICE(RADGigastar2, DeviceType::RADGigastar2, "GT"); + ICSNEO_FINDABLE_DEVICE(RADGigastar2, _icsneo_devicetype_t::RADGigastar2, "GT"); static const std::vector &GetSupportedNetworks() { diff --git a/include/icsneo/device/tree/radjupiter/radjupiter.h b/include/icsneo/device/tree/radjupiter/radjupiter.h index 9050237..f1fa27e 100644 --- a/include/icsneo/device/tree/radjupiter/radjupiter.h +++ b/include/icsneo/device/tree/radjupiter/radjupiter.h @@ -13,7 +13,7 @@ class RADJupiter : public Device { public: // Serial numbers start with RJ // USB PID is 1105, standard driver is CDCACM - ICSNEO_FINDABLE_DEVICE(RADJupiter, DeviceType::RADJupiter, "RJ"); + ICSNEO_FINDABLE_DEVICE(RADJupiter, _icsneo_devicetype_t::RADJupiter, "RJ"); static const std::vector& GetSupportedNetworks() { static std::vector supportedNetworks = { diff --git a/include/icsneo/device/tree/radmars/radmars.h b/include/icsneo/device/tree/radmars/radmars.h index e122789..506dc26 100644 --- a/include/icsneo/device/tree/radmars/radmars.h +++ b/include/icsneo/device/tree/radmars/radmars.h @@ -16,7 +16,7 @@ public: // Serial numbers start with GL (previously, RAD-Gigalog) // USB PID is 0x1203, standard driver is FTDI3 // Ethernet MAC allocation is 0x0A, standard driver is Raw - ICSNEO_FINDABLE_DEVICE(RADMars, DeviceType::RADMars, "GL"); + ICSNEO_FINDABLE_DEVICE(RADMars, _icsneo_devicetype_t::RADMars, "GL"); size_t getEthernetActivationLineCount() const override { return 1; } diff --git a/include/icsneo/device/tree/radmoon2/radmoon2.h b/include/icsneo/device/tree/radmoon2/radmoon2.h index 7f7919b..325b032 100644 --- a/include/icsneo/device/tree/radmoon2/radmoon2.h +++ b/include/icsneo/device/tree/radmoon2/radmoon2.h @@ -12,7 +12,7 @@ class RADMoon2 : public RADMoon2Base { public: // Serial numbers start with RM // USB PID is 0x1202, standard driver is FTDI3 - ICSNEO_FINDABLE_DEVICE(RADMoon2, DeviceType::RADMoon2, "RM"); + ICSNEO_FINDABLE_DEVICE(RADMoon2, _icsneo_devicetype_t::RADMoon2, "RM"); uint8_t getPhyAddrOrPort() const override { return 6; }; diff --git a/include/icsneo/device/tree/radmoon2/radmoon2zl.h b/include/icsneo/device/tree/radmoon2/radmoon2zl.h index f441c70..8851f00 100644 --- a/include/icsneo/device/tree/radmoon2/radmoon2zl.h +++ b/include/icsneo/device/tree/radmoon2/radmoon2zl.h @@ -12,7 +12,7 @@ class RADMoon2ZL : public RADMoon2Base { public: // Serial numbers start with RN // USB PID is 0x110C, standard driver is CDCACM - ICSNEO_FINDABLE_DEVICE(RADMoon2ZL, DeviceType::RADMoon2, "RN"); + ICSNEO_FINDABLE_DEVICE(RADMoon2ZL, _icsneo_devicetype_t::RADMoon2, "RN"); uint8_t getPhyAddrOrPort() const override { return 1; } diff --git a/include/icsneo/device/tree/radmoon3/radmoon3.h b/include/icsneo/device/tree/radmoon3/radmoon3.h index 4d3e7e6..a386d6d 100644 --- a/include/icsneo/device/tree/radmoon3/radmoon3.h +++ b/include/icsneo/device/tree/radmoon3/radmoon3.h @@ -13,7 +13,7 @@ class RADMoon3 : public Device { public: // Serial numbers start with R3 // USB PID is 0x110D, standard driver is CDCACM - ICSNEO_FINDABLE_DEVICE(RADMoon3, DeviceType::RADMoon3, "R3"); + ICSNEO_FINDABLE_DEVICE(RADMoon3, _icsneo_devicetype_t::RADMoon3, "R3"); static const std::vector& GetSupportedNetworks() { static std::vector supportedNetworks = { diff --git a/include/icsneo/device/tree/radmoonduo/radmoonduo.h b/include/icsneo/device/tree/radmoonduo/radmoonduo.h index e8f5347..66c0ed5 100644 --- a/include/icsneo/device/tree/radmoonduo/radmoonduo.h +++ b/include/icsneo/device/tree/radmoonduo/radmoonduo.h @@ -13,7 +13,7 @@ class RADMoonDuo : public Device { public: // Serial numbers start with MD // USB PID is 1106, standard driver is CDCACM - ICSNEO_FINDABLE_DEVICE(RADMoonDuo, DeviceType::RADMoonDuo, "MD"); + ICSNEO_FINDABLE_DEVICE(RADMoonDuo, _icsneo_devicetype_t::RADMoonDuo, "MD"); static const std::vector& GetSupportedNetworks() { // If Converter1 Target is set to USB/CM, OP_Ethernet2 will be exposed to the PC diff --git a/include/icsneo/device/tree/radmoont1s/radmoont1s.h b/include/icsneo/device/tree/radmoont1s/radmoont1s.h index cf17294..d92e073 100644 --- a/include/icsneo/device/tree/radmoont1s/radmoont1s.h +++ b/include/icsneo/device/tree/radmoont1s/radmoont1s.h @@ -14,7 +14,7 @@ public: // Serial numbers start with MS // USB PID is 0x1209, standard driver is FTDI3 // Ethernet MAC allocation is 0x21, standard driver is Raw - ICSNEO_FINDABLE_DEVICE(RADMoonT1S, DeviceType::RADMoonT1S, "MS"); + ICSNEO_FINDABLE_DEVICE(RADMoonT1S, _icsneo_devicetype_t::RADMoonT1S, "MS"); static const std::vector& GetSupportedNetworks() { static std::vector supportedNetworks = { diff --git a/include/icsneo/device/tree/radpluto/radpluto.h b/include/icsneo/device/tree/radpluto/radpluto.h index c7f4190..e087e9a 100644 --- a/include/icsneo/device/tree/radpluto/radpluto.h +++ b/include/icsneo/device/tree/radpluto/radpluto.h @@ -13,7 +13,7 @@ class RADPluto : public Device { public: // Serial numbers start with PL // USB PID is 1104, standard driver is CDCACM - ICSNEO_FINDABLE_DEVICE(RADPluto, DeviceType::RADPluto, "PL"); + ICSNEO_FINDABLE_DEVICE(RADPluto, _icsneo_devicetype_t::RADPluto, "PL"); static const std::vector& GetSupportedNetworks() { static std::vector supportedNetworks = { diff --git a/include/icsneo/device/tree/radstar2/radstar2.h b/include/icsneo/device/tree/radstar2/radstar2.h index 3081fd3..af910cf 100644 --- a/include/icsneo/device/tree/radstar2/radstar2.h +++ b/include/icsneo/device/tree/radstar2/radstar2.h @@ -14,7 +14,7 @@ public: // Serial numbers start with RS // USB PID is 0x0005, standard driver is FTDI // Ethernet MAC allocation is 0x05, standard driver is Raw - ICSNEO_FINDABLE_DEVICE(RADStar2, DeviceType::RADStar2, "RS"); + ICSNEO_FINDABLE_DEVICE(RADStar2, _icsneo_devicetype_t::RADStar2, "RS"); static const std::vector& GetSupportedNetworks() { static std::vector supportedNetworks = { diff --git a/include/icsneo/device/tree/radsupermoon/radsupermoon.h b/include/icsneo/device/tree/radsupermoon/radsupermoon.h index cb03134..466e4d4 100644 --- a/include/icsneo/device/tree/radsupermoon/radsupermoon.h +++ b/include/icsneo/device/tree/radsupermoon/radsupermoon.h @@ -13,7 +13,7 @@ class RADSupermoon : public Device { public: // Serial numbers start with SM // USB PID is 0x1201, standard driver is FTDI3 - ICSNEO_FINDABLE_DEVICE(RADSupermoon, DeviceType::RADSupermoon, "SM"); + ICSNEO_FINDABLE_DEVICE(RADSupermoon, _icsneo_devicetype_t::RADSupermoon, "SM"); enum class SKU { Standard, diff --git a/include/icsneo/device/tree/valuecan3/valuecan3.h b/include/icsneo/device/tree/valuecan3/valuecan3.h index d534041..df2d3fe 100644 --- a/include/icsneo/device/tree/valuecan3/valuecan3.h +++ b/include/icsneo/device/tree/valuecan3/valuecan3.h @@ -12,7 +12,7 @@ namespace icsneo { class ValueCAN3 : public Device { public: // USB PID is 0x0601, standard driver is FTDI - ICSNEO_FINDABLE_DEVICE_BY_PID(ValueCAN3, DeviceType::VCAN3, 0x0601); + ICSNEO_FINDABLE_DEVICE_BY_PID(ValueCAN3, _icsneo_devicetype_t::VCAN3, 0x0601); static const std::vector& GetSupportedNetworks() { static std::vector supportedNetworks = { diff --git a/include/icsneo/device/tree/valuecan4/valuecan4-1.h b/include/icsneo/device/tree/valuecan4/valuecan4-1.h index 713e391..7680073 100644 --- a/include/icsneo/device/tree/valuecan4/valuecan4-1.h +++ b/include/icsneo/device/tree/valuecan4/valuecan4-1.h @@ -12,7 +12,7 @@ class ValueCAN4_1 : public ValueCAN4 { public: // Serial numbers start with V1 for 4-1 // USB PID is 0x1101 (shared by all ValueCAN 4s), standard driver is CDCACM - ICSNEO_FINDABLE_DEVICE(ValueCAN4_1, DeviceType::VCAN4_1, "V1"); + ICSNEO_FINDABLE_DEVICE(ValueCAN4_1, _icsneo_devicetype_t::VCAN4_1, "V1"); static const std::vector& GetSupportedNetworks() { static std::vector supportedNetworks = { diff --git a/include/icsneo/device/tree/valuecan4/valuecan4-2.h b/include/icsneo/device/tree/valuecan4/valuecan4-2.h index 5fa9090..cdf87ef 100644 --- a/include/icsneo/device/tree/valuecan4/valuecan4-2.h +++ b/include/icsneo/device/tree/valuecan4/valuecan4-2.h @@ -12,7 +12,7 @@ class ValueCAN4_2 : public ValueCAN4 { public: // Serial numbers start with V2 for 4-2 // USB PID is 0x1101 (shared by all ValueCAN 4s), standard driver is CDCACM - ICSNEO_FINDABLE_DEVICE(ValueCAN4_2, DeviceType::VCAN4_2, "V2"); + ICSNEO_FINDABLE_DEVICE(ValueCAN4_2, _icsneo_devicetype_t::VCAN4_2, "V2"); enum class SKU { Standard, diff --git a/include/icsneo/device/tree/valuecan4/valuecan4-2el.h b/include/icsneo/device/tree/valuecan4/valuecan4-2el.h index 7797e2b..3587503 100644 --- a/include/icsneo/device/tree/valuecan4/valuecan4-2el.h +++ b/include/icsneo/device/tree/valuecan4/valuecan4-2el.h @@ -13,7 +13,7 @@ public: // Serial numbers start with VE for 4-2EL // USB PID is 0x1101 (shared by all ValueCAN 4s), standard driver is CDCACM // Ethernet MAC allocation is 0x0B, standard driver is Raw - ICSNEO_FINDABLE_DEVICE(ValueCAN4_2EL, DeviceType::VCAN4_2EL, "VE"); + ICSNEO_FINDABLE_DEVICE(ValueCAN4_2EL, _icsneo_devicetype_t::VCAN4_2EL, "VE"); enum class SKU { Standard, diff --git a/include/icsneo/device/tree/valuecan4/valuecan4-4.h b/include/icsneo/device/tree/valuecan4/valuecan4-4.h index c2caf6e..3693538 100644 --- a/include/icsneo/device/tree/valuecan4/valuecan4-4.h +++ b/include/icsneo/device/tree/valuecan4/valuecan4-4.h @@ -12,7 +12,7 @@ class ValueCAN4_4 : public ValueCAN4 { public: // Serial numbers start with V4 for 4-4 // USB PID is 0x1101 (shared by all ValueCAN 4s), standard driver is CDCACM - ICSNEO_FINDABLE_DEVICE(ValueCAN4_4, DeviceType::VCAN4_4, "V4"); + ICSNEO_FINDABLE_DEVICE(ValueCAN4_4, _icsneo_devicetype_t::VCAN4_4, "V4"); enum class SKU { Standard, diff --git a/include/icsneo/device/tree/valuecan4/valuecan4industrial.h b/include/icsneo/device/tree/valuecan4/valuecan4industrial.h index ac0741d..837cd95 100644 --- a/include/icsneo/device/tree/valuecan4/valuecan4industrial.h +++ b/include/icsneo/device/tree/valuecan4/valuecan4industrial.h @@ -13,7 +13,7 @@ public: // Serial numbers start with IV for Industrial // USB PID is 0x1101 (shared by all ValueCAN 4s), standard driver is CDCACM // Ethernet MAC allocation is 0x12, standard driver is Raw - ICSNEO_FINDABLE_DEVICE(ValueCAN4Industrial, DeviceType::VCAN4_IND, "IV"); + ICSNEO_FINDABLE_DEVICE(ValueCAN4Industrial, _icsneo_devicetype_t::VCAN4_IND, "IV"); static const std::vector& GetSupportedNetworks() { static std::vector supportedNetworks = { diff --git a/include/icsneo/device/tree/vividcan/vividcan.h b/include/icsneo/device/tree/vividcan/vividcan.h index aedeefc..1cba5c9 100644 --- a/include/icsneo/device/tree/vividcan/vividcan.h +++ b/include/icsneo/device/tree/vividcan/vividcan.h @@ -14,7 +14,7 @@ class VividCAN : public Device { public: // Serial numbers start with VV // USB PID is 0x1102, standard driver is CDCACM - ICSNEO_FINDABLE_DEVICE(VividCAN, DeviceType::VividCAN, "VV"); + ICSNEO_FINDABLE_DEVICE(VividCAN, _icsneo_devicetype_t::VividCAN, "VV"); // VividCAN does not go online, you can only set settings bool goOnline() override { diff --git a/include/icsneo/icsneo.h b/include/icsneo/icsneo.h index 7222e74..b339c61 100644 --- a/include/icsneo/icsneo.h +++ b/include/icsneo/icsneo.h @@ -2,6 +2,8 @@ #include +#include + #ifdef __cplusplus extern "C" { #endif @@ -46,16 +48,7 @@ typedef enum _icsneo_error_t { typedef uint32_t icsneo_error_t; -typedef enum _icsneo_open_options_t { - icsneo_open_options_none = 0x0, - icsneo_open_options_go_online = 0x1, - icsneo_open_options_enable_message_polling = 0x2, - icsneo_open_options_sync_rtc = 0x4, - icsneo_open_options_enable_auto_update = 0x8, - icsneo_open_options_force_update = 0x10, -} _icsneo_open_options_t; -typedef uint32_t icsneo_open_options_t; /** @brief Find all hardware attached to the system. * diff --git a/include/icsneo/icsneoc.h b/include/icsneo/icsneoc.h index 74ceaef..f371110 100644 --- a/include/icsneo/icsneoc.h +++ b/include/icsneo/icsneoc.h @@ -364,7 +364,7 @@ extern bool DLLExport icsneo_getProductName(const neodevice_t* device, char* str * An icsneo::APIEvent::OutputTruncatedError will be available in icsneo_getLastError() in this case. * True will still be returned. */ -extern bool DLLExport icsneo_getProductNameForType(devicetype_t type, char* str, size_t* maxLength); +extern bool DLLExport icsneo_getProductNameForType(icsneo_devicetype_t type, char* str, size_t* maxLength); /** * \brief Trigger a refresh of the settings structure for a specified device. @@ -704,11 +704,11 @@ extern size_t DLLExport icsneo_getEventLimit(void); /** * \brief Get the devices supported by the current version of the API - * \param[out] devices A pointer to a buffer of devicetype_t structures which will be written to. + * \param[out] devices A pointer to a buffer of icsneo_devicetype_t structures which will be written to. * NULL can be passed, which will write the current supported device count to count. * \param[inout] count A pointer to a size_t which, prior to the call, - * holds the maximum number of devicetype_t structures to be written, - * and after the call holds the number of devicetype_t structures written. + * holds the maximum number of icsneo_devicetype_t structures to be written, + * and after the call holds the number of icsneo_devicetype_t structures written. * \returns True if devices was written to * * See icsneo_getProductNameForType() to get textual descriptions of each device. @@ -719,7 +719,7 @@ extern size_t DLLExport icsneo_getEventLimit(void); * An icsneo::APIEvent::OutputTruncatedError will be available in icsneo_getLastError() in this case. * True will still be returned. */ -extern bool DLLExport icsneo_getSupportedDevices(devicetype_t* devices, size_t* count); +extern bool DLLExport icsneo_getSupportedDevices(icsneo_devicetype_t* devices, size_t* count); /** * \brief Get the timestamp resolution for the given device @@ -992,7 +992,7 @@ fn_icsneo_setEventLimit icsneo_setEventLimit; typedef size_t(*fn_icsneo_getEventLimit)(void); fn_icsneo_getEventLimit icsneo_getEventLimit; -typedef bool(*fn_icsneo_getSupportedDevices)(devicetype_t* devices, size_t* count); +typedef bool(*fn_icsneo_getSupportedDevices)(icsneo_devicetype_t* devices, size_t* count); fn_icsneo_getSupportedDevices icsneo_getSupportedDevices; typedef bool(*fn_icsneo_getTimestampResolution)(const neodevice_t* device, uint16_t* resolution); diff --git a/include/icsneo/icsneotypes.h b/include/icsneo/icsneotypes.h new file mode 100644 index 0000000..b3accb8 --- /dev/null +++ b/include/icsneo/icsneotypes.h @@ -0,0 +1,88 @@ +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +typedef enum _icsneo_open_options_t { + icsneo_open_options_none = 0x0, + icsneo_open_options_go_online = 0x1, + icsneo_open_options_enable_message_polling = 0x2, + icsneo_open_options_sync_rtc = 0x4, + icsneo_open_options_enable_auto_update = 0x8, + icsneo_open_options_force_update = 0x10, +} _icsneo_open_options_t; + +typedef uint32_t icsneo_open_options_t; + + + +// This enum used to be a bitfield, but has since become an enum as we have more than 32 devices +// Adding something? Make sure you update the type string and C-compatible defines below! +typedef enum _icsneo_devicetype_t { + Unknown = (0x00000000), + BLUE = (0x00000001), + ECU_AVB = (0x00000002), + RADSupermoon = (0x00000003), + DW_VCAN = (0x00000004), + RADMoon2 = (0x00000005), + RADMars = (0x00000006), + VCAN4_1 = (0x00000007), + FIRE = (0x00000008), + RADPluto = (0x00000009), + VCAN4_2EL = (0x0000000a), + RADIO_CANHUB = (0x0000000b), + NEOECU12 = (0x0000000c), + OBD2_LCBADGE = (0x0000000d), + RADMoonDuo = (0x0000000e), + FIRE3 = (0x0000000f), + VCAN3 = (0x00000010), + RADJupiter = (0x00000011), + VCAN4_IND = (0x00000012), + RADGigastar = (0x00000013), + RED2 = (0x00000014), + EtherBADGE = (0x00000016), + RAD_A2B = (0x00000017), + RADEpsilon = (0x00000018), + RADMoon3 = (0x00000023), + RADComet = (0x00000024), + FIRE3_FlexRay = (0x00000025), + Connect = (0x00000026), + RADComet3 = (0x00000027), + RADMoonT1S = (0x00000028), + RADGigastar2 = (0x00000029), + RED = (0x00000040), + ECU = (0x00000080), + IEVB = (0x00000100), + Pendant = (0x00000200), + OBD2_PRO = (0x00000400), + ECUChip_UART = (0x00000800), + PLASMA = (0x00001000), + DONT_REUSE0 = (0x00002000), // Previously FIRE_VNET + NEOAnalog = (0x00004000), + CT_OBD = (0x00008000), + DONT_REUSE1 = (0x00010000), // Previously PLASMA_1_12 + DONT_REUSE2 = (0x00020000), // Previously PLASMA_1_13 + ION = (0x00040000), + RADStar = (0x00080000), + DONT_REUSE3 = (0x00100000), // Previously ION3 + VCAN4_4 = (0x00200000), + VCAN4_2 = (0x00400000), + CMProbe = (0x00800000), + EEVB = (0x01000000), + VCANrf = (0x02000000), + FIRE2 = (0x04000000), + Flex = (0x08000000), + RADGalaxy = (0x10000000), + RADStar2 = (0x20000000), + VividCAN = (0x40000000), + OBD2_SIM = (0x80000000) +} _icsneo_devicetype_t; + +typedef uint64_t icsneo_devicetype_t; + +#ifdef __cplusplus +} +#endif