RAD-Moon3: Add initial support
parent
83f6c611fe
commit
af31aa23ad
|
|
@ -46,4 +46,5 @@
|
||||||
- CAN works
|
- CAN works
|
||||||
- RADA2B
|
- RADA2B
|
||||||
- CAN works
|
- CAN works
|
||||||
- Ethernet works
|
- Ethernet works
|
||||||
|
- RADMoon3
|
||||||
|
|
@ -1042,6 +1042,9 @@ int LegacyDLLExport icsneoGetDeviceSettingsType(void* hObject, EPlasmaIonVnetCha
|
||||||
case NEODEVICE_RADGIGALOG:
|
case NEODEVICE_RADGIGALOG:
|
||||||
*pDeviceSettingsType = DeviceRADGigalogSettingsType;
|
*pDeviceSettingsType = DeviceRADGigalogSettingsType;
|
||||||
break;
|
break;
|
||||||
|
case NEODEVICE_RADMOON3:
|
||||||
|
*pDeviceSettingsType = DeviceRADMoon3SettingsType;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -177,6 +177,10 @@ std::vector<std::shared_ptr<Device>> DeviceFinder::FindAll() {
|
||||||
makeIfSerialMatches<RADMoon2>(dev, newFoundDevices);
|
makeIfSerialMatches<RADMoon2>(dev, newFoundDevices);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __RADMOON3_H_
|
||||||
|
makeIfSerialMatches<RADMoon3>(dev, newFoundDevices);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __RADMOONDUO_H_
|
#ifdef __RADMOONDUO_H_
|
||||||
makeIfSerialMatches<RADMoonDuo>(dev, newFoundDevices);
|
makeIfSerialMatches<RADMoonDuo>(dev, newFoundDevices);
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -304,6 +308,10 @@ const std::vector<DeviceType>& DeviceFinder::GetSupportedDevices() {
|
||||||
RADMoon2::DEVICE_TYPE,
|
RADMoon2::DEVICE_TYPE,
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __RADMOON3_H_
|
||||||
|
RADMoon3::DEVICE_TYPE,
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __RADMOONDUO_H_
|
#ifdef __RADMOONDUO_H_
|
||||||
RADMoonDuo::DEVICE_TYPE,
|
RADMoonDuo::DEVICE_TYPE,
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,7 @@ public:
|
||||||
EtherBADGE = (0x00000016),
|
EtherBADGE = (0x00000016),
|
||||||
RAD_A2B = (0x00000017),
|
RAD_A2B = (0x00000017),
|
||||||
RADEpsilon = (0x00000018),
|
RADEpsilon = (0x00000018),
|
||||||
|
RADMoon3 = (0x00000023),
|
||||||
RADComet = (0x00000024),
|
RADComet = (0x00000024),
|
||||||
FIRE3_FlexRay = (0x00000025),
|
FIRE3_FlexRay = (0x00000025),
|
||||||
RED = (0x00000040),
|
RED = (0x00000040),
|
||||||
|
|
@ -135,6 +136,8 @@ public:
|
||||||
return "RAD-A2B";
|
return "RAD-A2B";
|
||||||
case RADEpsilon:
|
case RADEpsilon:
|
||||||
return "RAD-Epsilon";
|
return "RAD-Epsilon";
|
||||||
|
case RADMoon3:
|
||||||
|
return "RAD-Moon 3";
|
||||||
case RADComet:
|
case RADComet:
|
||||||
return "RAD-Comet";
|
return "RAD-Comet";
|
||||||
case RED:
|
case RED:
|
||||||
|
|
@ -233,6 +236,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_RADMoon3 ((devicetype_t)0x00000023)
|
||||||
#define ICSNEO_DEVICETYPE_RADCOMET ((devicetype_t)0x00000024)
|
#define ICSNEO_DEVICETYPE_RADCOMET ((devicetype_t)0x00000024)
|
||||||
#define ICSNEO_DEVICETYPE_FIRE3FLEXRAY ((devicetype_t)0x00000025)
|
#define ICSNEO_DEVICETYPE_FIRE3FLEXRAY ((devicetype_t)0x00000025)
|
||||||
#define ICSNEO_DEVICETYPE_RED ((devicetype_t)0x00000040)
|
#define ICSNEO_DEVICETYPE_RED ((devicetype_t)0x00000040)
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,57 @@
|
||||||
|
#ifndef __RADMOON3_H_
|
||||||
|
#define __RADMOON3_H_
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
|
||||||
|
#include "icsneo/device/device.h"
|
||||||
|
#include "icsneo/device/devicetype.h"
|
||||||
|
#include "icsneo/device/tree/radmoon3/radmoon3settings.h"
|
||||||
|
|
||||||
|
namespace icsneo {
|
||||||
|
|
||||||
|
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");
|
||||||
|
|
||||||
|
static const std::vector<Network>& GetSupportedNetworks() {
|
||||||
|
static std::vector<Network> supportedNetworks = {
|
||||||
|
Network::NetID::Ethernet,
|
||||||
|
Network::NetID::OP_Ethernet1,
|
||||||
|
};
|
||||||
|
return supportedNetworks;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool getEthPhyRegControlSupported() const override { return true; }
|
||||||
|
|
||||||
|
protected:
|
||||||
|
RADMoon3(neodevice_t neodevice, const driver_factory_t& makeDriver) : Device(neodevice) {
|
||||||
|
initialize<RADMoon3Settings>(makeDriver);
|
||||||
|
}
|
||||||
|
|
||||||
|
void setupPacketizer(Packetizer& packetizer) override {
|
||||||
|
Device::setupPacketizer(packetizer);
|
||||||
|
packetizer.align16bit = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void setupEncoder(Encoder& encoder) override {
|
||||||
|
Device::setupEncoder(encoder);
|
||||||
|
encoder.supportEthPhy = 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); }
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // __cplusplus
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
@ -0,0 +1,46 @@
|
||||||
|
#ifndef __RADMOON3SETTINGS_H_
|
||||||
|
#define __RADMOON3SETTINGS_H_
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
#include "icsneo/device/idevicesettings.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
|
||||||
|
namespace icsneo {
|
||||||
|
|
||||||
|
#endif // __cplusplus
|
||||||
|
|
||||||
|
#pragma pack(push, 2)
|
||||||
|
typedef struct {
|
||||||
|
uint16_t perf_en; // 2
|
||||||
|
|
||||||
|
ETHERNET10G_SETTINGS autoEth10g; // 24
|
||||||
|
ETHERNET10G_SETTINGS eth10g; // 24
|
||||||
|
|
||||||
|
uint16_t network_enables; // 2
|
||||||
|
uint16_t network_enables_2; // 2
|
||||||
|
uint16_t network_enabled_on_boot; // 2
|
||||||
|
uint16_t network_enables_3; // 2
|
||||||
|
|
||||||
|
struct
|
||||||
|
{
|
||||||
|
uint16_t enableLatencyTest : 1;
|
||||||
|
uint16_t reserved : 15;
|
||||||
|
} flags; // 2
|
||||||
|
} radmoon3_settings_t;
|
||||||
|
#pragma pack(pop)
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
|
class RADMoon3Settings : public IDeviceSettings {
|
||||||
|
public:
|
||||||
|
RADMoon3Settings(std::shared_ptr<Communication> com) : IDeviceSettings(com, sizeof(radmoon3_settings_t)) {}
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // __cplusplus
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
@ -163,6 +163,7 @@ typedef unsigned __int64 uint64_t;
|
||||||
//#define NEODEVICE_RADPLUTO (0x00000009)
|
//#define NEODEVICE_RADPLUTO (0x00000009)
|
||||||
#define NEODEVICE_VCAN42_EL (0x0000000a)
|
#define NEODEVICE_VCAN42_EL (0x0000000a)
|
||||||
#define NEODEVICE_VCAN3 (0x00000010)
|
#define NEODEVICE_VCAN3 (0x00000010)
|
||||||
|
#define NEODEVICE_RADMOON3 (0x00000023)
|
||||||
#define NEODEVICE_RED (0x00000040)
|
#define NEODEVICE_RED (0x00000040)
|
||||||
#define NEODEVICE_ECU (0x00000080)
|
#define NEODEVICE_ECU (0x00000080)
|
||||||
#define NEODEVICE_IEVB (0x00000100)
|
#define NEODEVICE_IEVB (0x00000100)
|
||||||
|
|
@ -1971,6 +1972,7 @@ typedef enum _EDeviceSettingsType
|
||||||
DeviceRADSuperMoonSettingsType,
|
DeviceRADSuperMoonSettingsType,
|
||||||
DeviceRADMoon2SettingsType,
|
DeviceRADMoon2SettingsType,
|
||||||
DeviceRADGigalogSettingsType,
|
DeviceRADGigalogSettingsType,
|
||||||
|
DeviceRADMoon3SettingsType,
|
||||||
//
|
//
|
||||||
// add new settings type here
|
// add new settings type here
|
||||||
// ...
|
// ...
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@
|
||||||
#include "icsneo/device/tree/radjupiter/radjupiter.h"
|
#include "icsneo/device/tree/radjupiter/radjupiter.h"
|
||||||
#include "icsneo/device/tree/radmars/radmars.h"
|
#include "icsneo/device/tree/radmars/radmars.h"
|
||||||
#include "icsneo/device/tree/radmoon2/radmoon2.h"
|
#include "icsneo/device/tree/radmoon2/radmoon2.h"
|
||||||
|
#include "icsneo/device/tree/radmoon3/radmoon3.h"
|
||||||
#include "icsneo/device/tree/radmoonduo/radmoonduo.h"
|
#include "icsneo/device/tree/radmoonduo/radmoonduo.h"
|
||||||
#include "icsneo/device/tree/radpluto/radpluto.h"
|
#include "icsneo/device/tree/radpluto/radpluto.h"
|
||||||
#include "icsneo/device/tree/radstar2/radstar2.h"
|
#include "icsneo/device/tree/radstar2/radstar2.h"
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@
|
||||||
#include "icsneo/device/tree/radjupiter/radjupiter.h"
|
#include "icsneo/device/tree/radjupiter/radjupiter.h"
|
||||||
#include "icsneo/device/tree/radmars/radmars.h"
|
#include "icsneo/device/tree/radmars/radmars.h"
|
||||||
#include "icsneo/device/tree/radmoon2/radmoon2.h"
|
#include "icsneo/device/tree/radmoon2/radmoon2.h"
|
||||||
|
#include "icsneo/device/tree/radmoon3/radmoon3.h"
|
||||||
#include "icsneo/device/tree/radmoonduo/radmoonduo.h"
|
#include "icsneo/device/tree/radmoonduo/radmoonduo.h"
|
||||||
#include "icsneo/device/tree/radpluto/radpluto.h"
|
#include "icsneo/device/tree/radpluto/radpluto.h"
|
||||||
#include "icsneo/device/tree/radstar2/radstar2.h"
|
#include "icsneo/device/tree/radstar2/radstar2.h"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue