Device: Add RAD-EpsilonXL
parent
e1a0ca056a
commit
52e98af9fd
|
|
@ -23,6 +23,8 @@ each of the respective APIs.
|
||||||
- RAD-A2B
|
- RAD-A2B
|
||||||
- RAD-Comet 2
|
- RAD-Comet 2
|
||||||
- RAD-Comet 3
|
- RAD-Comet 3
|
||||||
|
- RAD-Epsilon
|
||||||
|
- RAD-EpsilonXL
|
||||||
- RAD-Galaxy
|
- RAD-Galaxy
|
||||||
- RAD-Galaxy 2
|
- RAD-Galaxy 2
|
||||||
- RAD-Gigastar
|
- RAD-Gigastar
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,7 @@ void init_devicetype(pybind11::module_& m) {
|
||||||
.value("EtherBADGE", DeviceType::Enum::EtherBADGE)
|
.value("EtherBADGE", DeviceType::Enum::EtherBADGE)
|
||||||
.value("RAD_A2B", DeviceType::Enum::RAD_A2B)
|
.value("RAD_A2B", DeviceType::Enum::RAD_A2B)
|
||||||
.value("RADEpsilon", DeviceType::Enum::RADEpsilon)
|
.value("RADEpsilon", DeviceType::Enum::RADEpsilon)
|
||||||
|
.value("RADEpsilonXL", DeviceType::Enum::RADEpsilonXL)
|
||||||
.value("RADGalaxy2", DeviceType::Enum::RADGalaxy2)
|
.value("RADGalaxy2", DeviceType::Enum::RADGalaxy2)
|
||||||
.value("RADMoon3", DeviceType::Enum::RADMoon3)
|
.value("RADMoon3", DeviceType::Enum::RADMoon3)
|
||||||
.value("RADComet", DeviceType::Enum::RADComet)
|
.value("RADComet", DeviceType::Enum::RADComet)
|
||||||
|
|
|
||||||
|
|
@ -193,6 +193,10 @@ std::vector<std::shared_ptr<Device>> DeviceFinder::FindAll() {
|
||||||
makeIfSerialMatches<RADEpsilon>(dev, newFoundDevices);
|
makeIfSerialMatches<RADEpsilon>(dev, newFoundDevices);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __RADEPSILONXL_H_
|
||||||
|
makeIfSerialMatches<RADEpsilonXL>(dev, newFoundDevices);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __RADGALAXY_H_
|
#ifdef __RADGALAXY_H_
|
||||||
makeIfSerialMatches<RADGalaxy>(dev, newFoundDevices);
|
makeIfSerialMatches<RADGalaxy>(dev, newFoundDevices);
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -352,6 +356,10 @@ const std::vector<DeviceType>& DeviceFinder::GetSupportedDevices() {
|
||||||
RADEpsilon::DEVICE_TYPE,
|
RADEpsilon::DEVICE_TYPE,
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __RADEPSILONXL_H_
|
||||||
|
RADEpsilonXL::DEVICE_TYPE,
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __RADGALAXY_H_
|
#ifdef __RADGALAXY_H_
|
||||||
RADGalaxy::DEVICE_TYPE,
|
RADGalaxy::DEVICE_TYPE,
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,7 @@ public:
|
||||||
EtherBADGE = (0x00000016),
|
EtherBADGE = (0x00000016),
|
||||||
RAD_A2B = (0x00000017),
|
RAD_A2B = (0x00000017),
|
||||||
RADEpsilon = (0x00000018),
|
RADEpsilon = (0x00000018),
|
||||||
|
RADEpsilonXL = (0x0000001e),
|
||||||
RADGalaxy2 = (0x00000021),
|
RADGalaxy2 = (0x00000021),
|
||||||
RADMoon3 = (0x00000023),
|
RADMoon3 = (0x00000023),
|
||||||
RADComet = (0x00000024),
|
RADComet = (0x00000024),
|
||||||
|
|
@ -141,6 +142,8 @@ public:
|
||||||
return "RAD-A2B";
|
return "RAD-A2B";
|
||||||
case RADEpsilon:
|
case RADEpsilon:
|
||||||
return "RAD-Epsilon";
|
return "RAD-Epsilon";
|
||||||
|
case RADEpsilonXL:
|
||||||
|
return "RAD-EpsilonXL";
|
||||||
case RADMoon3:
|
case RADMoon3:
|
||||||
return "RAD-Moon 3";
|
return "RAD-Moon 3";
|
||||||
case RADComet:
|
case RADComet:
|
||||||
|
|
@ -251,6 +254,7 @@ private:
|
||||||
#define ICSNEO_DEVICETYPE_ETHERBADGE ((devicetype_t)0x00000016)
|
#define ICSNEO_DEVICETYPE_ETHERBADGE ((devicetype_t)0x00000016)
|
||||||
#define ICSNEO_DEVICETYPE_RAD_A2B ((devicetype_t)0x00000017)
|
#define ICSNEO_DEVICETYPE_RAD_A2B ((devicetype_t)0x00000017)
|
||||||
#define ICSNEO_DEVICETYPE_RADEPSILON ((devicetype_t)0x00000018)
|
#define ICSNEO_DEVICETYPE_RADEPSILON ((devicetype_t)0x00000018)
|
||||||
|
#define ICSNEO_DEVICETYPE_RADEPSILONXL ((devicetype_t)0x0000001e)
|
||||||
#define ICSNEO_DEVICETYPE_RADGALAXY2 ((devicetype_t)0x00000021)
|
#define ICSNEO_DEVICETYPE_RADGALAXY2 ((devicetype_t)0x00000021)
|
||||||
#define ICSNEO_DEVICETYPE_RADMoon3 ((devicetype_t)0x00000023)
|
#define ICSNEO_DEVICETYPE_RADMoon3 ((devicetype_t)0x00000023)
|
||||||
#define ICSNEO_DEVICETYPE_RADCOMET ((devicetype_t)0x00000024)
|
#define ICSNEO_DEVICETYPE_RADCOMET ((devicetype_t)0x00000024)
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
#include "icsneo/device/device.h"
|
#include "icsneo/device/device.h"
|
||||||
#include "icsneo/device/devicetype.h"
|
#include "icsneo/device/devicetype.h"
|
||||||
|
#include "icsneo/device/tree/radepsilon/radepsilonsettings.h"
|
||||||
|
|
||||||
namespace icsneo {
|
namespace icsneo {
|
||||||
|
|
||||||
|
|
@ -28,7 +29,7 @@ public:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
RADEpsilon(neodevice_t neodevice, const driver_factory_t& makeDriver) : Device(neodevice) {
|
RADEpsilon(neodevice_t neodevice, const driver_factory_t& makeDriver) : Device(neodevice) {
|
||||||
initialize(makeDriver);
|
initialize<RADEpsilonSettings, Disk::NeoMemoryDiskDriver, Disk::NeoMemoryDiskDriver>(makeDriver);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void setupEncoder(Encoder& encoder) override {
|
virtual void setupEncoder(Encoder& encoder) override {
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,131 @@
|
||||||
|
#ifndef __RADEPSILONSETTINGS_H_
|
||||||
|
#define __RADEPSILONSETTINGS_H_
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
#include "icsneo/device/idevicesettings.h"
|
||||||
|
#include "icsneo/communication/network.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
|
||||||
|
namespace icsneo {
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#pragma warning(push)
|
||||||
|
#pragma warning(disable : 4201) // nameless struct/union
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#pragma pack(push, 2)
|
||||||
|
#define RADEPSILON_MAX_PHY 18
|
||||||
|
typedef struct {
|
||||||
|
uint8_t phyMode[RADEPSILON_MAX_PHY];
|
||||||
|
uint8_t enablePhy[RADEPSILON_MAX_PHY];
|
||||||
|
uint8_t speed[RADEPSILON_MAX_PHY];
|
||||||
|
uint8_t legacy[RADEPSILON_MAX_PHY];
|
||||||
|
uint8_t spoofedMac[6];
|
||||||
|
uint8_t spoofMacFlag;
|
||||||
|
uint8_t pad;
|
||||||
|
} radepsilon_switch_settings_t;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
/* Performance Test */
|
||||||
|
uint16_t perf_en;
|
||||||
|
|
||||||
|
CAN_SETTINGS can1;
|
||||||
|
CANFD_SETTINGS canfd1;
|
||||||
|
CAN_SETTINGS can2;
|
||||||
|
CANFD_SETTINGS canfd2;
|
||||||
|
LIN_SETTINGS lin1;
|
||||||
|
|
||||||
|
uint16_t network_enables[3];
|
||||||
|
uint64_t termination_enables;
|
||||||
|
uint16_t misc_io_analog_enable;
|
||||||
|
|
||||||
|
uint32_t pwr_man_timeout;
|
||||||
|
uint16_t pwr_man_enable;
|
||||||
|
|
||||||
|
uint16_t network_enabled_on_boot;
|
||||||
|
|
||||||
|
/* ISO15765-2 Transport Layer */
|
||||||
|
int16_t iso15765_separation_time_offset;
|
||||||
|
uint16_t iso9141_kwp_enable_reserved;
|
||||||
|
uint16_t iso_tester_pullup_enable;
|
||||||
|
uint16_t iso_parity;
|
||||||
|
uint16_t iso_msg_termination;
|
||||||
|
ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings;
|
||||||
|
ETHERNET_SETTINGS ethernet;
|
||||||
|
|
||||||
|
STextAPISettings text_api;
|
||||||
|
|
||||||
|
struct
|
||||||
|
{
|
||||||
|
uint32_t disableUsbCheckOnBoot : 1;
|
||||||
|
uint32_t enableLatencyTest : 1;
|
||||||
|
uint32_t enablePcEthernetComm : 1;
|
||||||
|
uint32_t reserved : 29;
|
||||||
|
} flags;
|
||||||
|
|
||||||
|
radepsilon_switch_settings_t switchSettings;
|
||||||
|
ETHERNET_SETTINGS2 ethernet2;
|
||||||
|
uint16_t misc_io_on_report_events;
|
||||||
|
DISK_SETTINGS disk;
|
||||||
|
} radepsilon_settings_t;
|
||||||
|
#pragma pack(pop)
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#pragma warning(pop)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
|
class RADEpsilonSettings : public IDeviceSettings {
|
||||||
|
public:
|
||||||
|
RADEpsilonSettings(std::shared_ptr<Communication> com) : IDeviceSettings(com, sizeof(radepsilon_settings_t)) {}
|
||||||
|
const CAN_SETTINGS* getCANSettingsFor(Network net) const override {
|
||||||
|
auto cfg = getStructurePointer<radepsilon_settings_t>();
|
||||||
|
if(cfg == nullptr)
|
||||||
|
return nullptr;
|
||||||
|
switch(net.getNetID()) {
|
||||||
|
case Network::NetID::HSCAN:
|
||||||
|
return &(cfg->can1);
|
||||||
|
case Network::NetID::HSCAN2:
|
||||||
|
return &(cfg->can2);
|
||||||
|
default:
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const CANFD_SETTINGS* getCANFDSettingsFor(Network net) const override {
|
||||||
|
auto cfg = getStructurePointer<radepsilon_settings_t>();
|
||||||
|
if(cfg == nullptr)
|
||||||
|
return nullptr;
|
||||||
|
switch(net.getNetID()) {
|
||||||
|
case Network::NetID::HSCAN:
|
||||||
|
return &(cfg->canfd1);
|
||||||
|
case Network::NetID::HSCAN2:
|
||||||
|
return &(cfg->canfd2);
|
||||||
|
default:
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const LIN_SETTINGS* getLINSettingsFor(Network net) const override {
|
||||||
|
auto cfg = getStructurePointer<radepsilon_settings_t>();
|
||||||
|
if(cfg == nullptr)
|
||||||
|
return nullptr;
|
||||||
|
switch(net.getNetID()) {
|
||||||
|
case Network::NetID::LIN:
|
||||||
|
return &(cfg->lin1);
|
||||||
|
default:
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
}; // namespace icsneo
|
||||||
|
|
||||||
|
#endif // __cplusplus
|
||||||
|
|
||||||
|
#endif // __RADEPSILONSETTINGS_H_
|
||||||
|
|
@ -0,0 +1,63 @@
|
||||||
|
#ifndef __RADEPSILONXL_H_
|
||||||
|
#define __RADEPSILONXL_H_
|
||||||
|
|
||||||
|
#include "icsneo/device/device.h"
|
||||||
|
#include "icsneo/device/devicetype.h"
|
||||||
|
#include "icsneo/device/tree/radepsilon/radepsilonsettings.h" // Shared settings with RADEpsilon
|
||||||
|
|
||||||
|
namespace icsneo {
|
||||||
|
|
||||||
|
class RADEpsilonXL : public Device {
|
||||||
|
public:
|
||||||
|
// Serial numbers start with PX
|
||||||
|
// USB PID is 0x1109, standard driver is CDCACM
|
||||||
|
ICSNEO_FINDABLE_DEVICE(RADEpsilonXL, DeviceType::RADEpsilonXL, "PX");
|
||||||
|
|
||||||
|
static const std::vector<Network>& GetSupportedNetworks() {
|
||||||
|
static std::vector<Network> supportedNetworks = {
|
||||||
|
Network::NetID::HSCAN,
|
||||||
|
Network::NetID::HSCAN2,
|
||||||
|
|
||||||
|
Network::NetID::Ethernet, // Connected to port 6 on the switch
|
||||||
|
|
||||||
|
Network::NetID::LIN
|
||||||
|
};
|
||||||
|
return supportedNetworks;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool supportsComponentVersions() const override { return true; }
|
||||||
|
|
||||||
|
protected:
|
||||||
|
RADEpsilonXL(neodevice_t neodevice, const driver_factory_t& makeDriver) : Device(neodevice) {
|
||||||
|
initialize<RADEpsilonSettings, Disk::NeoMemoryDiskDriver, Disk::NeoMemoryDiskDriver>(makeDriver);
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void setupEncoder(Encoder& encoder) override {
|
||||||
|
Device::setupEncoder(encoder);
|
||||||
|
encoder.supportCANFD = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void setupSupportedRXNetworks(std::vector<Network>& rxNetworks) override {
|
||||||
|
for(auto& netid : GetSupportedNetworks())
|
||||||
|
rxNetworks.emplace_back(netid);
|
||||||
|
}
|
||||||
|
|
||||||
|
// The supported TX networks are the same as the supported RX networks for this device
|
||||||
|
void setupSupportedTXNetworks(std::vector<Network>& txNetworks) override { setupSupportedRXNetworks(txNetworks); }
|
||||||
|
|
||||||
|
std::optional<MemoryAddress> getCoreminiStartAddressFlash() const override {
|
||||||
|
return 14*1024*1024;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::optional<MemoryAddress> getCoreminiStartAddressSD() const override {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool supportsEraseMemory() const override {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
}; // namespace icsneo
|
||||||
|
|
||||||
|
#endif // __RADEPSILONXL_H_
|
||||||
|
|
@ -18,6 +18,7 @@
|
||||||
#include "icsneo/device/tree/radcomet3/radcomet3.h"
|
#include "icsneo/device/tree/radcomet3/radcomet3.h"
|
||||||
#include "icsneo/device/tree/radmoont1s/radmoont1s.h"
|
#include "icsneo/device/tree/radmoont1s/radmoont1s.h"
|
||||||
#include "icsneo/device/tree/radepsilon/radepsilon.h"
|
#include "icsneo/device/tree/radepsilon/radepsilon.h"
|
||||||
|
#include "icsneo/device/tree/radepsilonxl/radepsilonxl.h"
|
||||||
#include "icsneo/device/tree/radgalaxy/radgalaxy.h"
|
#include "icsneo/device/tree/radgalaxy/radgalaxy.h"
|
||||||
#include "icsneo/device/tree/radgalaxy2/radgalaxy2.h"
|
#include "icsneo/device/tree/radgalaxy2/radgalaxy2.h"
|
||||||
#include "icsneo/device/tree/radgigastar/radgigastar.h"
|
#include "icsneo/device/tree/radgigastar/radgigastar.h"
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@
|
||||||
#include "icsneo/device/tree/radcomet3/radcomet3.h"
|
#include "icsneo/device/tree/radcomet3/radcomet3.h"
|
||||||
#include "icsneo/device/tree/radmoont1s/radmoont1s.h"
|
#include "icsneo/device/tree/radmoont1s/radmoont1s.h"
|
||||||
#include "icsneo/device/tree/radepsilon/radepsilon.h"
|
#include "icsneo/device/tree/radepsilon/radepsilon.h"
|
||||||
|
#include "icsneo/device/tree/radepsilonxl/radepsilonxl.h"
|
||||||
#include "icsneo/device/tree/radgalaxy/radgalaxy.h"
|
#include "icsneo/device/tree/radgalaxy/radgalaxy.h"
|
||||||
#include "icsneo/device/tree/radgalaxy2/radgalaxy2.h"
|
#include "icsneo/device/tree/radgalaxy2/radgalaxy2.h"
|
||||||
#include "icsneo/device/tree/radgigastar/radgigastar.h"
|
#include "icsneo/device/tree/radgigastar/radgigastar.h"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue