Compare commits
4 Commits
ca10478752
...
8e3b12cdd0
| Author | SHA1 | Date |
|---|---|---|
|
|
8e3b12cdd0 | |
|
|
b0f504a731 | |
|
|
00c7e05b5d | |
|
|
21a587db75 |
|
|
@ -142,13 +142,13 @@ ICSNEO_API icsneo_error_t icsneo_device_describe(icsneo_device_t* device, const
|
|||
return icsneo_error_success;
|
||||
}
|
||||
|
||||
ICSNEO_API icsneo_error_t icsneo_device_type(icsneo_device_t* device, uint64_t* value) {
|
||||
ICSNEO_API icsneo_error_t icsneo_device_type(icsneo_device_t* device, icsneo_devicetype_t* value) {
|
||||
if (!device || !device->device) {
|
||||
return icsneo_error_invalid_parameters;
|
||||
}
|
||||
auto dev = device->device;
|
||||
// TODO: We should expose these types
|
||||
*value = static_cast<uint64_t>(dev->getType());
|
||||
*value = dev->getType().getDeviceType();
|
||||
|
||||
return icsneo_error_success;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -313,7 +313,7 @@ bool icsneo_getProductNameForType(icsneo_devicetype_t type, char* str, size_t* m
|
|||
return false;
|
||||
}
|
||||
|
||||
std::string output = DeviceType(type).getGenericProductName();
|
||||
std::string output = DeviceType(type).getProductName();
|
||||
|
||||
if(str == nullptr) {
|
||||
*maxLength = output.length();
|
||||
|
|
|
|||
|
|
@ -2,6 +2,9 @@
|
|||
#include "icsneo/device/device.h"
|
||||
#include "icsneo/communication/message/flexray/flexraymessage.h"
|
||||
|
||||
#include <chrono>
|
||||
#include <memory>
|
||||
|
||||
using namespace icsneo;
|
||||
|
||||
FlexRay::Extension::Extension(Device& device, const std::vector<Network>& controllerNetworks) : DeviceExtension(device) {
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ int main() {
|
|||
|
||||
std::cout<< "Supported devices:" << std::endl;
|
||||
for(auto& dev : icsneo::GetSupportedDevices())
|
||||
std::cout << '\t' << dev.getGenericProductName() << std::endl;
|
||||
std::cout << '\t' << dev.getProductName() << std::endl;
|
||||
|
||||
std::cout << "\nFinding devices... " << std::flush;
|
||||
auto devices = icsneo::FindAllDevices(); // This is type std::vector<std::shared_ptr<icsneo::Device>>
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ public:
|
|||
std::string getSerial() const { return data.serial; }
|
||||
uint32_t getSerialNumber() const { return Device::SerialStringToNum(getSerial()); }
|
||||
const neodevice_t& getNeoDevice() const { return data; }
|
||||
virtual std::string getProductName() const { return getType().getGenericProductName(); }
|
||||
virtual std::string getProductName() const { return getType().getProductName(); }
|
||||
std::string describe() const;
|
||||
friend std::ostream& operator<<(std::ostream& os, const Device& device) {
|
||||
os << device.describe();
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@
|
|||
#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
|
||||
|
||||
#include <ostream>
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <icsneo/icsneotypes.h>
|
||||
|
||||
|
||||
|
|
@ -21,131 +21,129 @@ public:
|
|||
* as the product name may change based on device-specific factors, such as serial
|
||||
* number.
|
||||
*/
|
||||
static const char* GetGenericProductName(_icsneo_devicetype_t t) {
|
||||
template<typename T>
|
||||
static std::string getGenericProductName(T deviceType) {
|
||||
// Adding something? Make sure you update DEVICE_TYPE_LONGEST_NAME at the top!
|
||||
switch(t) {
|
||||
case Unknown:
|
||||
switch(static_cast<icsneo_devicetype_t>(deviceType)) {
|
||||
case icsneo_devicetype_unknown:
|
||||
return "Unknown";
|
||||
case BLUE:
|
||||
case icsneo_devicetype_blue:
|
||||
return "neoVI BLUE";
|
||||
case ECU_AVB:
|
||||
case icsneo_devicetype_ecu_avb:
|
||||
return "neoECU AVB/TSN";
|
||||
case RADSupermoon:
|
||||
case icsneo_devicetype_rad_supermoon:
|
||||
return "RAD-Supermoon";
|
||||
case DW_VCAN:
|
||||
case icsneo_devicetype_dw_vcan:
|
||||
return "DW_VCAN";
|
||||
case RADMoon2:
|
||||
case icsneo_devicetype_rad_moon2:
|
||||
return "RAD-Moon 2";
|
||||
case RADMars:
|
||||
case icsneo_devicetype_rad_mars:
|
||||
return "RAD-Mars";
|
||||
case VCAN4_1:
|
||||
case icsneo_devicetype_vcan41:
|
||||
return "ValueCAN 4-1";
|
||||
case FIRE:
|
||||
case icsneo_devicetype_fire:
|
||||
return "neoVI FIRE";
|
||||
case RADPluto:
|
||||
case icsneo_devicetype_rad_pluto:
|
||||
return "RAD-Pluto";
|
||||
case VCAN4_2EL:
|
||||
case icsneo_devicetype_vcan42_el:
|
||||
return "ValueCAN 4-2EL";
|
||||
case RADIO_CANHUB:
|
||||
case icsneo_devicetype_radio_canhub:
|
||||
return "RAD-IO2 CANHub";
|
||||
case NEOECU12:
|
||||
case icsneo_devicetype_neo_ecu12:
|
||||
return "neoECU 12";
|
||||
case OBD2_LCBADGE:
|
||||
case icsneo_devicetype_obd2_lc_badge:
|
||||
return "neoOBD2 LC BADGE";
|
||||
case RADMoonDuo:
|
||||
case icsneo_devicetype_rad_moon_duo:
|
||||
return "RAD-Moon Duo";
|
||||
case FIRE3:
|
||||
case icsneo_devicetype_fire3:
|
||||
return "neoVI FIRE 3";
|
||||
case VCAN3:
|
||||
case icsneo_devicetype_vcan3:
|
||||
return "ValueCAN 3";
|
||||
case RADJupiter:
|
||||
case icsneo_devicetype_rad_jupiter:
|
||||
return "RAD-Jupiter";
|
||||
case VCAN4_IND:
|
||||
case icsneo_devicetype_vcan4_industrial:
|
||||
return "ValueCAN 4 Industrial";
|
||||
case RADGigastar:
|
||||
case icsneo_devicetype_rad_gigastar:
|
||||
return "RAD-Gigastar";
|
||||
case RED2:
|
||||
case icsneo_devicetype_red2:
|
||||
return "neoVI RED 2";
|
||||
case EtherBADGE:
|
||||
case icsneo_devicetype_etherbadge:
|
||||
return "EtherBADGE";
|
||||
case RAD_A2B:
|
||||
case icsneo_devicetype_rad_a2b:
|
||||
return "RAD-A2B";
|
||||
case RADEpsilon:
|
||||
case icsneo_devicetype_rad_epsilon:
|
||||
return "RAD-Epsilon";
|
||||
case RADMoon3:
|
||||
case icsneo_devicetype_rad_moon3:
|
||||
return "RAD-Moon 3";
|
||||
case RADComet:
|
||||
case icsneo_devicetype_rad_comet:
|
||||
return "RAD-Comet";
|
||||
case RED:
|
||||
case icsneo_devicetype_red:
|
||||
return "neoVI RED";
|
||||
case ECU:
|
||||
case icsneo_devicetype_ecu:
|
||||
return "neoECU";
|
||||
case IEVB:
|
||||
case icsneo_devicetype_ievb:
|
||||
return "IEVB";
|
||||
case Pendant:
|
||||
case icsneo_devicetype_pendant:
|
||||
return "Pendant";
|
||||
case OBD2_PRO:
|
||||
case icsneo_devicetype_obd2_pro:
|
||||
return "neoOBD2 PRO";
|
||||
case ECUChip_UART:
|
||||
case icsneo_devicetype_ecuchip_uart:
|
||||
return "neoECU Chip UART";
|
||||
case PLASMA:
|
||||
case icsneo_devicetype_plasma:
|
||||
return "neoVI PLASMA";
|
||||
case NEOAnalog:
|
||||
case icsneo_devicetype_neo_analog:
|
||||
return "NEOAnalog";
|
||||
case CT_OBD:
|
||||
case icsneo_devicetype_ct_obd:
|
||||
return "CT_OBD";
|
||||
case ION:
|
||||
case icsneo_devicetype_ion:
|
||||
return "neoVI ION";
|
||||
case RADStar:
|
||||
case icsneo_devicetype_rad_star:
|
||||
return "RAD-Star";
|
||||
case VCAN4_4:
|
||||
case icsneo_devicetype_vcan44:
|
||||
return "ValueCAN 4-4";
|
||||
case VCAN4_2:
|
||||
case icsneo_devicetype_vcan42:
|
||||
return "ValueCAN 4-2";
|
||||
case CMProbe:
|
||||
case icsneo_devicetype_cm_probe:
|
||||
return "CMProbe";
|
||||
case EEVB:
|
||||
case icsneo_devicetype_eevb:
|
||||
return "Intrepid Ethernet Evaluation Board";
|
||||
case VCANrf:
|
||||
case icsneo_devicetype_vcan_rf:
|
||||
return "ValueCAN.rf";
|
||||
case FIRE2:
|
||||
case icsneo_devicetype_fire2:
|
||||
return "neoVI FIRE 2";
|
||||
case Flex:
|
||||
case icsneo_devicetype_flex:
|
||||
return "neoVI Flex";
|
||||
case RADGalaxy:
|
||||
case icsneo_devicetype_rad_galaxy:
|
||||
return "RAD-Galaxy";
|
||||
case RADStar2:
|
||||
case icsneo_devicetype_rad_star2:
|
||||
return "RAD-Star 2";
|
||||
case VividCAN:
|
||||
case icsneo_devicetype_vividcan:
|
||||
return "VividCAN";
|
||||
case OBD2_SIM:
|
||||
case icsneo_devicetype_obd2_sim:
|
||||
return "neoOBD2 SIM";
|
||||
case FIRE3_FlexRay:
|
||||
case icsneo_devicetype_fire3_flexray:
|
||||
return "neoVI FIRE3 FlexRay";
|
||||
case RADComet3:
|
||||
case icsneo_devicetype_rad_comet3:
|
||||
return "RAD-Comet 3";
|
||||
case RADMoonT1S:
|
||||
case icsneo_devicetype_rad_moon_t1s:
|
||||
return "RAD-Moon T1S";
|
||||
case Connect:
|
||||
case icsneo_devicetype_connect:
|
||||
return "neoVI Connect";
|
||||
case RADGigastar2:
|
||||
case icsneo_devicetype_rad_gigastar2:
|
||||
return "RAD-Gigastar 2";
|
||||
case DONT_REUSE0:
|
||||
case DONT_REUSE1:
|
||||
case DONT_REUSE2:
|
||||
case DONT_REUSE3:
|
||||
// Intentionally don't use default so that the compiler throws a warning when something is added
|
||||
return "Unknown neoVI";
|
||||
// Intentionally don't use default so that the compiler throws a warning when something is added
|
||||
}
|
||||
return "Unknown neoVI";
|
||||
}
|
||||
|
||||
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 icsneo_devicetype_t() const { return getDeviceType(); }
|
||||
DeviceType(icsneo_devicetype_t device_type) { deviceType = device_type; }
|
||||
icsneo_devicetype_t getDeviceType() const { return deviceType; }
|
||||
|
||||
// Returns the generic name of the device - This doesn't include the serial.
|
||||
std::string getProductName() const { return DeviceType::getGenericProductName(getDeviceType()); }
|
||||
|
||||
private:
|
||||
icsneo_devicetype_t value;
|
||||
icsneo_devicetype_t deviceType;
|
||||
};
|
||||
|
||||
}; // namespace icsneo
|
||||
|
|
|
|||
|
|
@ -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, _icsneo_devicetype_t::EtherBADGE, "EB");
|
||||
ICSNEO_FINDABLE_DEVICE(EtherBADGE, _icsneo_devicetype_t::icsneo_devicetype_etherbadge, "EB");
|
||||
|
||||
static const std::vector<Network>& GetSupportedNetworks() {
|
||||
static std::vector<Network> supportedNetworks = {
|
||||
|
|
|
|||
|
|
@ -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, _icsneo_devicetype_t::OBD2_PRO, "NP");
|
||||
ICSNEO_FINDABLE_DEVICE(NeoOBD2PRO, _icsneo_devicetype_t::icsneo_devicetype_obd2_pro, "NP");
|
||||
|
||||
static const std::vector<Network>& GetSupportedNetworks() {
|
||||
static std::vector<Network> supportedNetworks = {
|
||||
|
|
|
|||
|
|
@ -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, _icsneo_devicetype_t::OBD2_SIM, "OS");
|
||||
ICSNEO_FINDABLE_DEVICE(NeoOBD2SIM, _icsneo_devicetype_t::icsneo_devicetype_obd2_sim, "OS");
|
||||
|
||||
static const std::vector<Network>& GetSupportedNetworks() {
|
||||
static std::vector<Network> supportedNetworks = {
|
||||
|
|
|
|||
|
|
@ -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, _icsneo_devicetype_t::Connect, "DM");
|
||||
ICSNEO_FINDABLE_DEVICE(NeoVIConnect, _icsneo_devicetype_t::icsneo_devicetype_connect, "DM");
|
||||
|
||||
static const std::vector<Network>& GetSupportedNetworks() {
|
||||
static std::vector<Network> supportedNetworks = {
|
||||
|
|
|
|||
|
|
@ -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, _icsneo_devicetype_t::FIRE, 0x0701);
|
||||
ICSNEO_FINDABLE_DEVICE_BY_PID(NeoVIFIRE, _icsneo_devicetype_t::icsneo_devicetype_fire, 0x0701);
|
||||
|
||||
static const std::vector<Network>& GetSupportedNetworks() {
|
||||
static std::vector<Network> supportedNetworks = {
|
||||
|
|
|
|||
|
|
@ -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, _icsneo_devicetype_t::FIRE2, "CY");
|
||||
ICSNEO_FINDABLE_DEVICE(NeoVIFIRE2, _icsneo_devicetype_t::icsneo_devicetype_fire2, "CY");
|
||||
|
||||
enum class SKU {
|
||||
Standard,
|
||||
|
|
|
|||
|
|
@ -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, _icsneo_devicetype_t::FIRE3, "ON");
|
||||
ICSNEO_FINDABLE_DEVICE(NeoVIFIRE3, _icsneo_devicetype_t::icsneo_devicetype_fire3, "ON");
|
||||
|
||||
static const std::vector<Network>& GetSupportedNetworks() {
|
||||
static std::vector<Network> supportedNetworks = {
|
||||
|
|
|
|||
|
|
@ -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, _icsneo_devicetype_t::FIRE3_FlexRay, "FF");
|
||||
ICSNEO_FINDABLE_DEVICE(NeoVIFIRE3FlexRay, _icsneo_devicetype_t::icsneo_devicetype_fire3_flexray, "FF");
|
||||
|
||||
static const std::vector<Network>& GetSupportedNetworks() {
|
||||
static std::vector<Network> supportedNetworks = {
|
||||
|
|
|
|||
|
|
@ -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, _icsneo_devicetype_t::RED2, "D2");
|
||||
ICSNEO_FINDABLE_DEVICE(NeoVIRED2, _icsneo_devicetype_t::icsneo_devicetype_red2, "D2");
|
||||
|
||||
static const std::vector<Network>& GetSupportedNetworks() {
|
||||
static std::vector<Network> supportedNetworks = {
|
||||
|
|
|
|||
|
|
@ -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, _icsneo_devicetype_t::ION, 0x0901);
|
||||
ICSNEO_FINDABLE_DEVICE_BY_PID(NeoVIION, _icsneo_devicetype_t::icsneo_devicetype_ion, 0x0901);
|
||||
|
||||
bool supportsComponentVersions() const override { return true; }
|
||||
|
||||
|
|
|
|||
|
|
@ -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, _icsneo_devicetype_t::PLASMA, 0x0801);
|
||||
ICSNEO_FINDABLE_DEVICE_BY_PID(NeoVIPLASMA, _icsneo_devicetype_t::icsneo_devicetype_plasma, 0x0801);
|
||||
|
||||
private:
|
||||
NeoVIPLASMA(neodevice_t neodevice, const driver_factory_t& makeDriver) : Plasion(neodevice) {
|
||||
|
|
|
|||
|
|
@ -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, _icsneo_devicetype_t::RAD_A2B, "AB");
|
||||
ICSNEO_FINDABLE_DEVICE(RADA2B, _icsneo_devicetype_t::icsneo_devicetype_rad_a2b, "AB");
|
||||
|
||||
static const std::vector<Network>& GetSupportedNetworks() {
|
||||
static std::vector<Network> supportedNetworks = {
|
||||
|
|
|
|||
|
|
@ -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, _icsneo_devicetype_t::RADComet, "RC0000", "RC0299");
|
||||
ICSNEO_FINDABLE_DEVICE_BY_SERIAL_RANGE(RADComet, _icsneo_devicetype_t::icsneo_devicetype_rad_comet, "RC0000", "RC0299");
|
||||
|
||||
std::string getProductName() const override {
|
||||
return "RAD-Comet";
|
||||
|
|
|
|||
|
|
@ -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, _icsneo_devicetype_t::RADComet, "RC0300", "RCZZZZ");
|
||||
ICSNEO_FINDABLE_DEVICE_BY_SERIAL_RANGE(RADComet2, _icsneo_devicetype_t::icsneo_devicetype_rad_comet, "RC0300", "RCZZZZ");
|
||||
|
||||
std::string getProductName() const override {
|
||||
return "RAD-Comet 2";
|
||||
|
|
|
|||
|
|
@ -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, _icsneo_devicetype_t::RADComet3, "C3");
|
||||
ICSNEO_FINDABLE_DEVICE(RADComet3, _icsneo_devicetype_t::icsneo_devicetype_rad_comet3, "C3");
|
||||
|
||||
static const std::vector<Network>& GetSupportedNetworks() {
|
||||
static std::vector<Network> supportedNetworks = {
|
||||
|
|
|
|||
|
|
@ -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, _icsneo_devicetype_t::RADEpsilon, "RE");
|
||||
ICSNEO_FINDABLE_DEVICE(RADEpsilon, _icsneo_devicetype_t::icsneo_devicetype_rad_epsilon, "RE");
|
||||
|
||||
static const std::vector<Network>& GetSupportedNetworks() {
|
||||
static std::vector<Network> supportedNetworks = {
|
||||
|
|
|
|||
|
|
@ -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, _icsneo_devicetype_t::RADGalaxy, "RG");
|
||||
ICSNEO_FINDABLE_DEVICE(RADGalaxy, _icsneo_devicetype_t::icsneo_devicetype_rad_galaxy, "RG");
|
||||
|
||||
static const std::vector<Network>& GetSupportedNetworks() {
|
||||
static std::vector<Network> supportedNetworks = {
|
||||
|
|
|
|||
|
|
@ -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, _icsneo_devicetype_t::RADGigastar, "GS");
|
||||
ICSNEO_FINDABLE_DEVICE(RADGigastar, _icsneo_devicetype_t::icsneo_devicetype_rad_gigastar, "GS");
|
||||
|
||||
size_t getEthernetActivationLineCount() const override { return 1; }
|
||||
|
||||
|
|
|
|||
|
|
@ -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, _icsneo_devicetype_t::RADGigastar2, "GT");
|
||||
ICSNEO_FINDABLE_DEVICE(RADGigastar2, _icsneo_devicetype_t::icsneo_devicetype_rad_gigastar2, "GT");
|
||||
|
||||
static const std::vector<Network> &GetSupportedNetworks()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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, _icsneo_devicetype_t::RADJupiter, "RJ");
|
||||
ICSNEO_FINDABLE_DEVICE(RADJupiter, _icsneo_devicetype_t::icsneo_devicetype_rad_jupiter, "RJ");
|
||||
|
||||
static const std::vector<Network>& GetSupportedNetworks() {
|
||||
static std::vector<Network> supportedNetworks = {
|
||||
|
|
|
|||
|
|
@ -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, _icsneo_devicetype_t::RADMars, "GL");
|
||||
ICSNEO_FINDABLE_DEVICE(RADMars, _icsneo_devicetype_t::icsneo_devicetype_rad_mars, "GL");
|
||||
|
||||
size_t getEthernetActivationLineCount() const override { return 1; }
|
||||
|
||||
|
|
|
|||
|
|
@ -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, _icsneo_devicetype_t::RADMoon2, "RM");
|
||||
ICSNEO_FINDABLE_DEVICE(RADMoon2, _icsneo_devicetype_t::icsneo_devicetype_rad_moon2, "RM");
|
||||
|
||||
uint8_t getPhyAddrOrPort() const override { return 6; };
|
||||
|
||||
|
|
|
|||
|
|
@ -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, _icsneo_devicetype_t::RADMoon2, "RN");
|
||||
ICSNEO_FINDABLE_DEVICE(RADMoon2ZL, _icsneo_devicetype_t::icsneo_devicetype_rad_moon2, "RN");
|
||||
|
||||
uint8_t getPhyAddrOrPort() const override { return 1; }
|
||||
|
||||
|
|
|
|||
|
|
@ -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, _icsneo_devicetype_t::RADMoon3, "R3");
|
||||
ICSNEO_FINDABLE_DEVICE(RADMoon3, _icsneo_devicetype_t::icsneo_devicetype_rad_moon3, "R3");
|
||||
|
||||
static const std::vector<Network>& GetSupportedNetworks() {
|
||||
static std::vector<Network> supportedNetworks = {
|
||||
|
|
|
|||
|
|
@ -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, _icsneo_devicetype_t::RADMoonDuo, "MD");
|
||||
ICSNEO_FINDABLE_DEVICE(RADMoonDuo, _icsneo_devicetype_t::icsneo_devicetype_rad_moon_duo, "MD");
|
||||
|
||||
static const std::vector<Network>& GetSupportedNetworks() {
|
||||
// If Converter1 Target is set to USB/CM, OP_Ethernet2 will be exposed to the PC
|
||||
|
|
|
|||
|
|
@ -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, _icsneo_devicetype_t::RADMoonT1S, "MS");
|
||||
ICSNEO_FINDABLE_DEVICE(RADMoonT1S, _icsneo_devicetype_t::icsneo_devicetype_rad_moon_t1s, "MS");
|
||||
|
||||
static const std::vector<Network>& GetSupportedNetworks() {
|
||||
static std::vector<Network> supportedNetworks = {
|
||||
|
|
|
|||
|
|
@ -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, _icsneo_devicetype_t::RADPluto, "PL");
|
||||
ICSNEO_FINDABLE_DEVICE(RADPluto, _icsneo_devicetype_t::icsneo_devicetype_rad_pluto, "PL");
|
||||
|
||||
static const std::vector<Network>& GetSupportedNetworks() {
|
||||
static std::vector<Network> supportedNetworks = {
|
||||
|
|
|
|||
|
|
@ -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, _icsneo_devicetype_t::RADStar2, "RS");
|
||||
ICSNEO_FINDABLE_DEVICE(RADStar2, _icsneo_devicetype_t::icsneo_devicetype_rad_star2, "RS");
|
||||
|
||||
static const std::vector<Network>& GetSupportedNetworks() {
|
||||
static std::vector<Network> supportedNetworks = {
|
||||
|
|
|
|||
|
|
@ -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, _icsneo_devicetype_t::RADSupermoon, "SM");
|
||||
ICSNEO_FINDABLE_DEVICE(RADSupermoon, _icsneo_devicetype_t::icsneo_devicetype_rad_supermoon, "SM");
|
||||
|
||||
enum class SKU {
|
||||
Standard,
|
||||
|
|
|
|||
|
|
@ -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, _icsneo_devicetype_t::VCAN3, 0x0601);
|
||||
ICSNEO_FINDABLE_DEVICE_BY_PID(ValueCAN3, _icsneo_devicetype_t::icsneo_devicetype_vcan3, 0x0601);
|
||||
|
||||
static const std::vector<Network>& GetSupportedNetworks() {
|
||||
static std::vector<Network> supportedNetworks = {
|
||||
|
|
|
|||
|
|
@ -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, _icsneo_devicetype_t::VCAN4_1, "V1");
|
||||
ICSNEO_FINDABLE_DEVICE(ValueCAN4_1, _icsneo_devicetype_t::icsneo_devicetype_vcan41, "V1");
|
||||
|
||||
static const std::vector<Network>& GetSupportedNetworks() {
|
||||
static std::vector<Network> supportedNetworks = {
|
||||
|
|
|
|||
|
|
@ -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, _icsneo_devicetype_t::VCAN4_2, "V2");
|
||||
ICSNEO_FINDABLE_DEVICE(ValueCAN4_2, _icsneo_devicetype_t::icsneo_devicetype_vcan42, "V2");
|
||||
|
||||
enum class SKU {
|
||||
Standard,
|
||||
|
|
|
|||
|
|
@ -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, _icsneo_devicetype_t::VCAN4_2EL, "VE");
|
||||
ICSNEO_FINDABLE_DEVICE(ValueCAN4_2EL, _icsneo_devicetype_t::icsneo_devicetype_vcan42_el, "VE");
|
||||
|
||||
enum class SKU {
|
||||
Standard,
|
||||
|
|
|
|||
|
|
@ -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, _icsneo_devicetype_t::VCAN4_4, "V4");
|
||||
ICSNEO_FINDABLE_DEVICE(ValueCAN4_4, _icsneo_devicetype_t::icsneo_devicetype_vcan44, "V4");
|
||||
|
||||
enum class SKU {
|
||||
Standard,
|
||||
|
|
|
|||
|
|
@ -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, _icsneo_devicetype_t::VCAN4_IND, "IV");
|
||||
ICSNEO_FINDABLE_DEVICE(ValueCAN4Industrial, _icsneo_devicetype_t::icsneo_devicetype_vcan4_industrial, "IV");
|
||||
|
||||
static const std::vector<Network>& GetSupportedNetworks() {
|
||||
static std::vector<Network> supportedNetworks = {
|
||||
|
|
|
|||
|
|
@ -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, _icsneo_devicetype_t::VividCAN, "VV");
|
||||
ICSNEO_FINDABLE_DEVICE(VividCAN, _icsneo_devicetype_t::icsneo_devicetype_vividcan, "VV");
|
||||
|
||||
// VividCAN does not go online, you can only set settings
|
||||
bool goOnline() override {
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ ICSNEO_API icsneo_error_t icsneo_open(icsneo_device_t* device);
|
|||
ICSNEO_API icsneo_error_t icsneo_close(icsneo_device_t* device);
|
||||
|
||||
ICSNEO_API icsneo_error_t icsneo_device_describe(icsneo_device_t* device, const char* value, uint32_t* value_length);
|
||||
ICSNEO_API icsneo_error_t icsneo_device_type(icsneo_device_t* device, uint64_t* value);
|
||||
ICSNEO_API icsneo_error_t icsneo_device_type(icsneo_device_t* device, icsneo_devicetype_t* value);
|
||||
ICSNEO_API icsneo_error_t icsneo_device_serial(icsneo_device_t* device, const char* value, uint32_t* value_length);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
|||
|
|
@ -1,5 +1,10 @@
|
|||
#pragma once
|
||||
|
||||
// _Static_assert support, this can be removed once C23 is the "standard"
|
||||
#if __STDC_VERSION__ < 202311L && !defined(__cplusplus)
|
||||
#include <assert.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
|
@ -22,66 +27,126 @@ 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)
|
||||
// Unknown device type
|
||||
icsneo_devicetype_unknown,
|
||||
// neoVI Blue - Obsolete
|
||||
icsneo_devicetype_blue,
|
||||
// neoECU AVB/TSN
|
||||
icsneo_devicetype_ecu_avb,
|
||||
// RAD-SuperMoon
|
||||
icsneo_devicetype_rad_supermoon,
|
||||
// DualWire ValueCAN - Obsolete
|
||||
icsneo_devicetype_dw_vcan,
|
||||
// RAD-Moon 2
|
||||
icsneo_devicetype_rad_moon2,
|
||||
// RAD-Mars
|
||||
icsneo_devicetype_rad_mars,
|
||||
// ValueCAN 4-1
|
||||
icsneo_devicetype_vcan41,
|
||||
// neoVI FIRE
|
||||
icsneo_devicetype_fire,
|
||||
// RAD-Pluto
|
||||
icsneo_devicetype_rad_pluto,
|
||||
// ValueCAN 4-2EL
|
||||
icsneo_devicetype_vcan42_el,
|
||||
// RAD-IO CAN-HUB
|
||||
icsneo_devicetype_radio_canhub,
|
||||
// neoECU12
|
||||
icsneo_devicetype_neo_ecu12,
|
||||
// neoOBD2-LC Badge
|
||||
icsneo_devicetype_obd2_lc_badge,
|
||||
// RAD-Moon Duo
|
||||
icsneo_devicetype_rad_moon_duo,
|
||||
// neoVI FIRE3
|
||||
icsneo_devicetype_fire3,
|
||||
// ValueCAN3
|
||||
icsneo_devicetype_vcan3,
|
||||
// RAD-Jupiter
|
||||
icsneo_devicetype_rad_jupiter,
|
||||
// ValueCAN4 Industrial
|
||||
icsneo_devicetype_vcan4_industrial,
|
||||
// RAD-Gigastar
|
||||
icsneo_devicetype_rad_gigastar,
|
||||
// neoVI RED2
|
||||
icsneo_devicetype_red2,
|
||||
// EtherBADGE
|
||||
icsneo_devicetype_etherbadge,
|
||||
// RAD-A2B
|
||||
icsneo_devicetype_rad_a2b,
|
||||
// RAD-Epsilon
|
||||
icsneo_devicetype_rad_epsilon,
|
||||
// RAD-Moon 3
|
||||
icsneo_devicetype_rad_moon3,
|
||||
// RAD-Comet
|
||||
icsneo_devicetype_rad_comet,
|
||||
// neoVI FIRE3 FlexRay
|
||||
icsneo_devicetype_fire3_flexray,
|
||||
// neoVI CONNECT
|
||||
icsneo_devicetype_connect,
|
||||
// RAD-Comet 3
|
||||
icsneo_devicetype_rad_comet3,
|
||||
// RAD-Moon T1S
|
||||
icsneo_devicetype_rad_moon_t1s,
|
||||
// RAD-Gigastar 2
|
||||
icsneo_devicetype_rad_gigastar2,
|
||||
// neoVI RED
|
||||
icsneo_devicetype_red,
|
||||
// neoECU - Obsolete
|
||||
icsneo_devicetype_ecu,
|
||||
// IEVB - Obsolete
|
||||
icsneo_devicetype_ievb,
|
||||
// Pendant - Obsolete
|
||||
icsneo_devicetype_pendant,
|
||||
// neoOBD2 Pro - Obsolete
|
||||
icsneo_devicetype_obd2_pro,
|
||||
// neoECU Chip - Obsolete
|
||||
icsneo_devicetype_ecuchip_uart,
|
||||
// neoVI PLASMA
|
||||
icsneo_devicetype_plasma,
|
||||
// neoAnalog - Obsolete
|
||||
icsneo_devicetype_neo_analog,
|
||||
// Obsolete
|
||||
icsneo_devicetype_ct_obd,
|
||||
// neoVI ION
|
||||
icsneo_devicetype_ion,
|
||||
// RAD-Star - Obsolete
|
||||
icsneo_devicetype_rad_star,
|
||||
// ValueCAN4-4
|
||||
icsneo_devicetype_vcan44,
|
||||
// ValueCAN4-2
|
||||
icsneo_devicetype_vcan42,
|
||||
// CMProbe - Obsolete
|
||||
icsneo_devicetype_cm_probe,
|
||||
// Ethernet EVB - Obsolete
|
||||
icsneo_devicetype_eevb,
|
||||
// ValueCAN.rf - Obsolete
|
||||
icsneo_devicetype_vcan_rf,
|
||||
// neoVI FIRE2
|
||||
icsneo_devicetype_fire2,
|
||||
// neoVI FLEX - Obsolete
|
||||
icsneo_devicetype_flex,
|
||||
// RAD-Galaxy
|
||||
icsneo_devicetype_rad_galaxy,
|
||||
// RAD-Star 2
|
||||
icsneo_devicetype_rad_star2,
|
||||
// VividCAN
|
||||
icsneo_devicetype_vividcan,
|
||||
// neoOBD2 SIM
|
||||
icsneo_devicetype_obd2_sim,
|
||||
|
||||
|
||||
// Must be last entry
|
||||
icsneo_devicetype_maxsize,
|
||||
} _icsneo_devicetype_t;
|
||||
|
||||
typedef uint64_t icsneo_devicetype_t;
|
||||
typedef uint32_t icsneo_devicetype_t;
|
||||
|
||||
// Make sure icsneo_devicetype_t is never smaller than the actual enum
|
||||
#if __STDC_VERSION__ < 202311L && !defined(__cplusplus)
|
||||
_Static_assert(sizeof(_icsneo_devicetype_t) <= sizeof(icsneo_devicetype_t));
|
||||
#else // C++ or C23
|
||||
static_assert(sizeof(_icsneo_devicetype_t) <= sizeof(icsneo_devicetype_t));
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue