Compare commits
1 Commits
584f524823
...
04d218c4fb
| Author | SHA1 | Date |
|---|---|---|
|
|
04d218c4fb |
|
|
@ -23,8 +23,6 @@ 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,7 +33,6 @@ 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)
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ std::shared_ptr<Message> HardwareLINPacket::DecodeToMessage(const std::vector<ui
|
||||||
auto isChecksumInvalid = [&]() -> bool {
|
auto isChecksumInvalid = [&]() -> bool {
|
||||||
/* messages with no data have no checksum (e.g. header only) */
|
/* messages with no data have no checksum (e.g. header only) */
|
||||||
if(!msg->data.size())
|
if(!msg->data.size())
|
||||||
return false;
|
return true;
|
||||||
|
|
||||||
uint8_t checkSum = (8 > numDataBytes) ? *(dataStart + numDataBytes) : packet->CoreMiniBitsLIN.LINByte9;
|
uint8_t checkSum = (8 > numDataBytes) ? *(dataStart + numDataBytes) : packet->CoreMiniBitsLIN.LINByte9;
|
||||||
LINMessage::calcChecksum(*msg);
|
LINMessage::calcChecksum(*msg);
|
||||||
|
|
|
||||||
|
|
@ -193,10 +193,6 @@ 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
|
||||||
|
|
@ -356,10 +352,6 @@ 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
|
||||||
|
|
|
||||||
|
|
@ -126,13 +126,13 @@ public:
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
StreamOutput(const char* filename) :
|
StreamOutput(const char* filename) :
|
||||||
MessageCallback([](std::shared_ptr<Message>) {}),
|
MessageCallback([](std::shared_ptr<Message> msg) {}),
|
||||||
stream(
|
stream(
|
||||||
new std::ofstream(filename, std::ios::binary),
|
new std::ofstream(filename, std::ios::binary),
|
||||||
std::default_delete<std::ostream>()
|
std::default_delete<std::ostream>()
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
StreamOutput(std::ostream& os) : MessageCallback([](std::shared_ptr<Message>) {}), stream(&os, [](std::ostream*){}) {}
|
StreamOutput(std::ostream& os) : MessageCallback([](std::shared_ptr<Message> msg) {}), stream(&os, [](std::ostream*){}) {}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
std::unique_ptr<std::ostream, std::function<void(std::ostream*)>> stream;
|
std::unique_ptr<std::ostream, std::function<void(std::ostream*)>> stream;
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,6 @@ 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),
|
||||||
|
|
@ -142,8 +141,6 @@ 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:
|
||||||
|
|
@ -254,7 +251,6 @@ 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,7 +3,6 @@
|
||||||
|
|
||||||
#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 {
|
||||||
|
|
||||||
|
|
@ -29,7 +28,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<RADEpsilonSettings, Disk::NeoMemoryDiskDriver, Disk::NeoMemoryDiskDriver>(makeDriver);
|
initialize(makeDriver);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void setupEncoder(Encoder& encoder) override {
|
virtual void setupEncoder(Encoder& encoder) override {
|
||||||
|
|
|
||||||
|
|
@ -1,131 +0,0 @@
|
||||||
#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_
|
|
||||||
|
|
@ -1,63 +0,0 @@
|
||||||
#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,7 +18,6 @@
|
||||||
#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,7 +18,6 @@
|
||||||
#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