Device: Add neoVI FIRE3 T1S/LIN

pull/76/merge
Bryant Jones 2025-09-18 17:18:27 -04:00 committed by Kyle Schwarz
parent 88d32128c9
commit 58b22da09b
13 changed files with 429 additions and 4 deletions

View File

@ -38,6 +38,8 @@ void init_devicetype(pybind11::module_& m) {
.value("RADMoon3", DeviceType::Enum::RADMoon3)
.value("RADComet", DeviceType::Enum::RADComet)
.value("FIRE3_FlexRay", DeviceType::Enum::FIRE3_FlexRay)
.value("FIRE3_T1S_LIN", DeviceType::Enum::FIRE3_T1S_LIN)
.value("FIRE3_T1S_SENT", DeviceType::Enum::FIRE3_T1S_SENT)
.value("Connect", DeviceType::Enum::Connect)
.value("RADComet3", DeviceType::Enum::RADComet3)
.value("RADMoonT1S", DeviceType::Enum::RADMoonT1S)

View File

@ -145,6 +145,10 @@ std::vector<std::shared_ptr<Device>> DeviceFinder::FindAll() {
makeIfSerialMatches<NeoVIFIRE3FlexRay>(dev, newFoundDevices);
#endif
#ifdef __NEOVIFIRE3T1SLIN_H_
makeIfSerialMatches<NeoVIFIRE3T1SLIN>(dev, newFoundDevices);
#endif
#ifdef __NEOVIRED2_H_
makeIfSerialMatches<NeoVIRED2>(dev, newFoundDevices);
#endif
@ -316,6 +320,10 @@ const std::vector<DeviceType>& DeviceFinder::GetSupportedDevices() {
NeoVIFIRE3FlexRay::DEVICE_TYPE,
#endif
#ifdef __NEOVIFIRE3T1SLIN_H_
NeoVIFIRE3T1SLIN::DEVICE_TYPE,
#endif
#ifdef __NEOVIION_H_
NeoVIION::DEVICE_TYPE,
#endif

View File

@ -56,6 +56,8 @@ public:
RADComet3 = (0x00000027),
RADMoonT1S = (0x00000028),
RADGigastar2 = (0x00000029),
FIRE3_T1S_LIN = (0x0000002A),
FIRE3_T1S_SENT = (0x0000002B),
RED = (0x00000040),
ECU = (0x00000080),
IEVB = (0x00000100),
@ -196,6 +198,10 @@ public:
return "neoOBD2 SIM";
case FIRE3_FlexRay:
return "neoVI FIRE3 FlexRay";
case FIRE3_T1S_LIN:
return "neoVI FIRE3 T1S/LIN";
case FIRE3_T1S_SENT:
return "neoVI FIRE3 T1S/SENT";
case RADComet3:
return "RAD-Comet 3";
case RADMoonT1S:
@ -263,6 +269,8 @@ private:
#define ICSNEO_DEVICETYPE_RADCOMET3 ((devicetype_t)0x00000027)
#define ICSNEO_DEVICETYPE_RADMOONT1S ((devicetype_t)0x00000028)
#define ICSNEO_DEVICETYPE_RADGIGASTAR2 ((devicetype_t)0x00000029)
#define ICSNEO_DEVICETYPE_FIRE3_T1S_LIN ((devicetype_t)0x0000002A)
#define ICSNEO_DEVICETYPE_FIRE3_T1S_SENT ((devicetype_t)0x0000002B)
#define ICSNEO_DEVICETYPE_RED ((devicetype_t)0x00000040)
#define ICSNEO_DEVICETYPE_ECU ((devicetype_t)0x00000080)
#define ICSNEO_DEVICETYPE_IEVB ((devicetype_t)0x00000100)

View File

@ -669,10 +669,15 @@ typedef struct
#define FIRE3LINUXSETTINGS_SIZE 8
static_assert(sizeof(Fire3LinuxSettings) == FIRE3LINUXSETTINGS_SIZE, "Fire3LinuxSettings is the wrong size!");
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable : 4201) // nameless struct/union
#endif
/* Define number of CMP streams per device*/
#define CMP_STREAMS_FIRE3 (10)
#define CMP_STREAMS_FIRE3FR (10)
#define CMP_STREAMS_FIRE3T1SLIN (10)
#define CMP_STREAMS_RED2 (10)
#define CMP_STREAMS_A2B (3)
#define CMP_STREAMS_GIGASTAR (10)
@ -686,7 +691,17 @@ typedef struct
uint8_t spare : 4;
uint8_t streamId;
uint8_t dstMac[6];
uint64_t network_enables_1;
union
{
uint64_t word;
struct
{
uint16_t network_enables;
uint16_t network_enables_2;
uint16_t network_enables_3;
uint16_t network_enables_4;
};
} network_enables;
uint64_t network_enables_2;
} CMP_NETWORK_DATA;

View File

@ -80,7 +80,7 @@ protected:
bool supportsGPTP() const override { return true; }
std::optional<MemoryAddress> getCoreminiStartAddressFlash() const override {
return 33*1024*1024;
return std::nullopt;
}
std::optional<MemoryAddress> getCoreminiStartAddressSD() const override {

View File

@ -139,6 +139,10 @@ typedef struct {
uint64_t network_enables_2;
uint64_t termination_enables_2;
uint16_t iso_tester_pullup_enable;
CMP_GLOBAL_DATA cmp_global_data;
CMP_NETWORK_DATA cmp_stream_data[CMP_STREAMS_FIRE3];
uint32_t networkTimeSync;
} neovifire3_settings_t;
typedef struct {

View File

@ -13,7 +13,7 @@ namespace icsneo {
class NeoVIFIRE3FlexRay : public Device {
public:
// Serial numbers start with FF
// Ethernet MAC allocation is 1F, standard driver is Raw
// Ethernet MAC allocation is 0x1E, standard driver is Raw
ICSNEO_FINDABLE_DEVICE(NeoVIFIRE3FlexRay, DeviceType::FIRE3_FlexRay, "FF");
static const std::vector<Network>& GetSupportedNetworks() {
@ -81,7 +81,7 @@ protected:
bool supportsLiveData() const override { return true; }
std::optional<MemoryAddress> getCoreminiStartAddressFlash() const override {
return 512*4;
return std::nullopt;
}
std::optional<MemoryAddress> getCoreminiStartAddressSD() const override {

View File

@ -122,6 +122,10 @@ typedef struct {
uint16_t flex_mode;
uint16_t flex_termination;
uint16_t iso_tester_pullup_enable;
CMP_GLOBAL_DATA cmp_global_data;
CMP_NETWORK_DATA cmp_stream_data[CMP_STREAMS_FIRE3FR];
uint32_t networkTimeSync;
} neovifire3flexray_settings_t;
typedef struct {

View File

@ -0,0 +1,106 @@
#ifndef __NEOVIFIRE3T1SLIN_H_
#define __NEOVIFIRE3T1SLIN_H_
#include "icsneo/device/device.h"
#include "icsneo/device/devicetype.h"
#include "icsneo/disk/extextractordiskreaddriver.h"
#include "icsneo/disk/neomemorydiskdriver.h"
#include "icsneo/device/tree/neovifire3t1slin/neovifire3t1slinsettings.h"
namespace icsneo {
class NeoVIFIRE3T1SLIN : public Device {
public:
// Serial numbers start with FT
// Ethernet MAC allocation is 0x1E, standard driver is Raw
ICSNEO_FINDABLE_DEVICE(NeoVIFIRE3T1SLIN, DeviceType::FIRE3_T1S_LIN, "FT");
static const std::vector<Network>& GetSupportedNetworks() {
static std::vector<Network> supportedNetworks = {
Network::NetID::DWCAN_01,
Network::NetID::DWCAN_08,
Network::NetID::DWCAN_02,
Network::NetID::DWCAN_03,
Network::NetID::DWCAN_04,
Network::NetID::DWCAN_05,
Network::NetID::DWCAN_06,
Network::NetID::DWCAN_07,
Network::NetID::LIN_01,
Network::NetID::LIN_02,
Network::NetID::LIN_03,
Network::NetID::LIN_04,
Network::NetID::LIN_05,
Network::NetID::LIN_06,
Network::NetID::LIN_07,
Network::NetID::LIN_08,
Network::NetID::LIN_09,
Network::NetID::LIN_10,
Network::NetID::ISO9141_01,
Network::NetID::ISO9141_02,
Network::NetID::ISO9141_03,
Network::NetID::ISO9141_04,
Network::NetID::ETHERNET_01,
Network::NetID::ETHERNET_02,
Network::NetID::AE_01,
Network::NetID::AE_02,
Network::NetID::AE_03,
Network::NetID::AE_04,
Network::NetID::AE_05,
Network::NetID::AE_06,
Network::NetID::AE_07,
Network::NetID::AE_08,
};
return supportedNetworks;
}
bool supportsTC10() const override { return true; }
protected:
NeoVIFIRE3T1SLIN(neodevice_t neodevice, const driver_factory_t& makeDriver) : Device(neodevice) {
initialize<NeoVIFIRE3T1SLINSettings, Disk::ExtExtractorDiskReadDriver, Disk::NeoMemoryDiskDriver>(makeDriver);
}
virtual void setupEncoder(Encoder& encoder) override {
Device::setupEncoder(encoder);
encoder.supportCANFD = true;
}
void setupPacketizer(Packetizer& packetizer) override {
Device::setupPacketizer(packetizer);
packetizer.align16bit = 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); }
bool supportsWiVI() const override { return true; }
bool supportsLiveData() const override { return true; }
bool supportsGPTP() const override { return true; }
std::optional<MemoryAddress> getCoreminiStartAddressFlash() const override {
return std::nullopt;
}
std::optional<MemoryAddress> getCoreminiStartAddressSD() const override {
return 0;
}
bool supportsEraseMemory() const override {
return true;
}
};
}
#endif

View File

@ -0,0 +1,271 @@
#ifndef __NEOVIFIRE3T1SLINSETTINGS_H_
#define __NEOVIFIRE3T1SLINSETTINGS_H_
#include <stdint.h>
#include "icsneo/device/idevicesettings.h"
#ifdef __cplusplus
namespace icsneo {
#endif
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable : 4201) // nameless struct/union
#endif
#pragma pack(push, 2)
typedef struct {
uint16_t perf_en;
uint16_t network_enabled_on_boot;
uint16_t misc_io_on_report_events;
uint16_t pwr_man_enable;
int16_t iso15765_separation_time_offset;
uint16_t slaveVnetA;
uint32_t reserved;
uint64_t termination_enables;
uint64_t network_enables;
uint32_t pwr_man_timeout;
CAN_SETTINGS can1;
CANFD_SETTINGS canfd1;
CAN_SETTINGS can2;
CANFD_SETTINGS canfd2;
CAN_SETTINGS can3;
CANFD_SETTINGS canfd3;
CAN_SETTINGS can4;
CANFD_SETTINGS canfd4;
CAN_SETTINGS can5;
CANFD_SETTINGS canfd5;
CAN_SETTINGS can6;
CANFD_SETTINGS canfd6;
CAN_SETTINGS can7;
CANFD_SETTINGS canfd7;
CAN_SETTINGS can8;
CANFD_SETTINGS canfd8;
LIN_SETTINGS lin1;
LIN_SETTINGS lin2;
ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_1;
uint16_t iso_parity_1;
uint16_t iso_msg_termination_1;
ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_2;
uint16_t iso_parity_2;
uint16_t iso_msg_termination_2;
ETHERNET_SETTINGS ethernet_1;
TIMESYNC_ICSHARDWARE_SETTINGS timeSync;
STextAPISettings text_api;
struct
{
uint32_t disableUsbCheckOnBoot : 1;
uint32_t enableLatencyTest : 1;
uint32_t busMessagesToAndroid : 1;
uint32_t reserved1 : 1;
uint32_t enableDefaultLogger : 1;
uint32_t enableDefaultUpload : 1;
uint32_t reserved : 26;
} flags;
DISK_SETTINGS disk;
uint16_t misc_io_report_period;
uint16_t ain_threshold;
uint16_t misc_io_analog_enable;
uint16_t digitalIoThresholdTicks;
uint16_t digitalIoThresholdEnable;
uint16_t misc_io_initial_ddr;
uint16_t misc_io_initial_latch;
ETHERNET_SETTINGS2 ethernet2_1;
ETHERNET_SETTINGS ethernet_2;
ETHERNET_SETTINGS2 ethernet2_2;
Fire3LinuxSettings os_settings;
RAD_GPTP_SETTINGS gPTP;
/* VEM */
// 10T1S
ETHERNET_SETTINGS2 ethT1s1;
ETHERNET10T1S_SETTINGS t1s1;
ETHERNET10T1S_SETTINGS_EXT t1s1Ext;
// 10T1S
ETHERNET_SETTINGS2 ethT1s2;
ETHERNET10T1S_SETTINGS t1s2;
ETHERNET10T1S_SETTINGS_EXT t1s2Ext;
// 10T1S
ETHERNET_SETTINGS2 ethT1s3;
ETHERNET10T1S_SETTINGS t1s3;
ETHERNET10T1S_SETTINGS_EXT t1s3Ext;
// 10T1S
ETHERNET_SETTINGS2 ethT1s4;
ETHERNET10T1S_SETTINGS t1s4;
ETHERNET10T1S_SETTINGS_EXT t1s4Ext;
// 10T1S
ETHERNET_SETTINGS2 ethT1s5;
ETHERNET10T1S_SETTINGS t1s5;
ETHERNET10T1S_SETTINGS_EXT t1s5Ext;
// 10T1S
ETHERNET_SETTINGS2 ethT1s6;
ETHERNET10T1S_SETTINGS t1s6;
ETHERNET10T1S_SETTINGS_EXT t1s6Ext;
// 10T1S
ETHERNET_SETTINGS2 ethT1s7;
ETHERNET10T1S_SETTINGS t1s7;
ETHERNET10T1S_SETTINGS_EXT t1s7Ext;
// 10T1S
ETHERNET_SETTINGS2 ethT1s8;
ETHERNET10T1S_SETTINGS t1s8;
ETHERNET10T1S_SETTINGS_EXT t1s8Ext;
LIN_SETTINGS lin3;
LIN_SETTINGS lin4;
LIN_SETTINGS lin5;
LIN_SETTINGS lin6;
LIN_SETTINGS lin7;
LIN_SETTINGS lin8;
LIN_SETTINGS lin9;
LIN_SETTINGS lin10;
ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_3;
uint16_t iso_parity_3;
uint16_t iso_msg_termination_3;
ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_4;
uint16_t iso_parity_4;
uint16_t iso_msg_termination_4;
uint16_t iso_tester_pullup_enable;
uint64_t network_enables_5;
CMP_GLOBAL_DATA cmp_global_data;
CMP_NETWORK_DATA cmp_stream_data[CMP_STREAMS_FIRE3T1SLIN];
uint32_t networkTimeSync;
} neovifire3t1slin_settings_t;
typedef struct {
uint8_t backupPowerGood;
uint8_t backupPowerEnabled;
uint8_t usbHostPowerEnabled;
uint8_t ethernetActivationLineEnabled;
EthernetNetworkStatus ethernetStatus;
} neovifire3t1slin_status_t;
#pragma pack(pop)
#ifdef _MSC_VER
#pragma warning(pop)
#endif
#ifdef __cplusplus
#include <iostream>
class NeoVIFIRE3T1SLINSettings : public IDeviceSettings {
public:
NeoVIFIRE3T1SLINSettings(std::shared_ptr<Communication> com) : IDeviceSettings(com, sizeof(neovifire3t1slin_settings_t)) {}
const CAN_SETTINGS* getCANSettingsFor(Network net) const override {
auto cfg = getStructurePointer<neovifire3t1slin_settings_t>();
if(cfg == nullptr)
return nullptr;
switch(net.getNetID()) {
case Network::NetID::DWCAN_01:
return &(cfg->can1);
case Network::NetID::DWCAN_08:
return &(cfg->can2);
case Network::NetID::DWCAN_02:
return &(cfg->can3);
case Network::NetID::DWCAN_03:
return &(cfg->can4);
case Network::NetID::DWCAN_04:
return &(cfg->can5);
case Network::NetID::DWCAN_05:
return &(cfg->can6);
case Network::NetID::DWCAN_06:
return &(cfg->can7);
case Network::NetID::DWCAN_07:
return &(cfg->can8);
default:
return nullptr;
}
}
const CANFD_SETTINGS* getCANFDSettingsFor(Network net) const override {
auto cfg = getStructurePointer<neovifire3t1slin_settings_t>();
if(cfg == nullptr)
return nullptr;
switch(net.getNetID()) {
case Network::NetID::DWCAN_01:
return &(cfg->canfd1);
case Network::NetID::DWCAN_08:
return &(cfg->canfd2);
case Network::NetID::DWCAN_02:
return &(cfg->canfd3);
case Network::NetID::DWCAN_03:
return &(cfg->canfd4);
case Network::NetID::DWCAN_04:
return &(cfg->canfd5);
case Network::NetID::DWCAN_05:
return &(cfg->canfd6);
case Network::NetID::DWCAN_06:
return &(cfg->canfd7);
case Network::NetID::DWCAN_07:
return &(cfg->canfd8);
default:
return nullptr;
}
}
virtual std::vector<TerminationGroup> getTerminationGroups() const override {
return {
{
Network(Network::NetID::DWCAN_01),
Network(Network::NetID::DWCAN_03),
Network(Network::NetID::DWCAN_05),
Network(Network::NetID::DWCAN_07)
},
{
Network(Network::NetID::DWCAN_08),
Network(Network::NetID::DWCAN_02),
Network(Network::NetID::DWCAN_04),
Network(Network::NetID::DWCAN_06)
}
};
}
const LIN_SETTINGS* getLINSettingsFor(Network net) const override {
auto cfg = getStructurePointer<neovifire3t1slin_settings_t>();
if(cfg == nullptr)
return nullptr;
switch(net.getNetID()) {
case Network::NetID::LIN_01:
return &(cfg->lin1);
case Network::NetID::LIN_02:
return &(cfg->lin2);
case Network::NetID::LIN_03:
return &(cfg->lin3);
case Network::NetID::LIN_04:
return &(cfg->lin4);
case Network::NetID::LIN_05:
return &(cfg->lin5);
case Network::NetID::LIN_06:
return &(cfg->lin6);
case Network::NetID::LIN_07:
return &(cfg->lin7);
case Network::NetID::LIN_08:
return &(cfg->lin8);
case Network::NetID::LIN_09:
return &(cfg->lin9);
case Network::NetID::LIN_10:
return &(cfg->lin10);
default:
return nullptr;
}
}
protected:
ICSNEO_UNALIGNED(const uint64_t*) getTerminationEnables() const override {
auto cfg = getStructurePointer<neovifire3t1slin_settings_t>();
if(cfg == nullptr)
return nullptr;
return &cfg->termination_enables;
}
};
}
#endif // __cplusplus
#endif

View File

@ -226,6 +226,11 @@ typedef unsigned __int64 uint64_t;
#define NEODEVICE_RADCOMET (0x00000024)
#define NEODEVICE_FIRE3_FLEXRAY (0x00000025)
#define NEODEVICE_RED2_OEM (0x00000026)
#define NEODEVICE_RADCOMET3 (0x00000027)
#define NEODEVICE_RADMOONT1S (0x00000028)
#define NEODEVICE_GIGASTAR2 (0x00000029)
#define NEODEVICE_FIRE3_T1S_LIN (0x0000002A)
#define NEODEVICE_FIRE3_T1S_SENT (0x0000002B)
#define NEODEVICE_RED (0x00000040)
#define NEODEVICE_ECU (0x00000080)
#define NEODEVICE_IEVB (0x00000100)

View File

@ -9,6 +9,7 @@
#include "icsneo/device/tree/neovifire2/neovifire2.h"
#include "icsneo/device/tree/neovifire3/neovifire3.h"
#include "icsneo/device/tree/neovifire3flexray/neovifire3flexray.h"
#include "icsneo/device/tree/neovifire3t1slin/neovifire3t1slin.h"
#include "icsneo/device/tree/neovired2/neovired2.h"
#include "icsneo/device/tree/plasion/neoviion.h"
#include "icsneo/device/tree/plasion/neoviplasma.h"

View File

@ -9,6 +9,7 @@
#include "icsneo/device/tree/neovifire2/neovifire2.h"
#include "icsneo/device/tree/neovifire3/neovifire3.h"
#include "icsneo/device/tree/neovifire3flexray/neovifire3flexray.h"
#include "icsneo/device/tree/neovifire3t1slin/neovifire3t1slin.h"
#include "icsneo/device/tree/neovired2/neovired2.h"
#include "icsneo/device/tree/plasion/neoviion.h"
#include "icsneo/device/tree/plasion/neoviplasma.h"