Device: Add neoVI Connect support
parent
bc6f5eca9c
commit
3782e12ef6
|
|
@ -24,6 +24,10 @@
|
|||
- RADComet3
|
||||
- CAN works
|
||||
- Ethernet works
|
||||
- neoVI Connect
|
||||
- CAN works
|
||||
- CAN FD works
|
||||
- Ethernet works
|
||||
|
||||
- Connecting over USB
|
||||
- ValueCAN 4 series
|
||||
|
|
@ -53,4 +57,4 @@
|
|||
- RADMoon3
|
||||
- RADComet3
|
||||
- CAN works
|
||||
- Ethernet works
|
||||
- Ethernet works
|
||||
|
|
|
|||
|
|
@ -137,6 +137,10 @@ std::vector<std::shared_ptr<Device>> DeviceFinder::FindAll() {
|
|||
makeIfSerialMatches<NeoOBD2SIM>(dev, newFoundDevices);
|
||||
#endif
|
||||
|
||||
#ifdef __NEOVICONNECT_H_
|
||||
makeIfSerialMatches<NeoVIConnect>(dev, newFoundDevices);
|
||||
#endif
|
||||
|
||||
#ifdef __NEOVIFIRE_H_
|
||||
makeIfPIDMatches<NeoVIFIRE>(dev, newFoundDevices);
|
||||
#endif
|
||||
|
|
@ -288,6 +292,10 @@ const std::vector<DeviceType>& DeviceFinder::GetSupportedDevices() {
|
|||
NeoVIRED2::DEVICE_TYPE,
|
||||
#endif
|
||||
|
||||
#ifdef __NEOVICONNECT_H_
|
||||
NeoVIConnect::DEVICE_TYPE,
|
||||
#endif
|
||||
|
||||
#ifdef __NEOVIFIRE_H_
|
||||
NeoVIFIRE::DEVICE_TYPE,
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@ public:
|
|||
RADMoon3 = (0x00000023),
|
||||
RADComet = (0x00000024),
|
||||
FIRE3_FlexRay = (0x00000025),
|
||||
Connect = (0x00000026),
|
||||
RADComet3 = (0x00000027),
|
||||
RED = (0x00000040),
|
||||
ECU = (0x00000080),
|
||||
|
|
@ -189,6 +190,8 @@ public:
|
|||
return "neoVI FIRE3 FlexRay";
|
||||
case RADComet3:
|
||||
return "RAD-Comet 3";
|
||||
case Connect:
|
||||
return "neoVI Connect";
|
||||
case DONT_REUSE0:
|
||||
case DONT_REUSE1:
|
||||
case DONT_REUSE2:
|
||||
|
|
@ -242,6 +245,7 @@ private:
|
|||
#define ICSNEO_DEVICETYPE_RADMoon3 ((devicetype_t)0x00000023)
|
||||
#define ICSNEO_DEVICETYPE_RADCOMET ((devicetype_t)0x00000024)
|
||||
#define ICSNEO_DEVICETYPE_FIRE3FLEXRAY ((devicetype_t)0x00000025)
|
||||
#define ICSNEO_DEVICETYPE_CONNECT ((devicetype_t)0x00000026)
|
||||
#define ICSNEO_DEVICETYPE_RADCOMET3 ((devicetype_t)0x00000027)
|
||||
#define ICSNEO_DEVICETYPE_RED ((devicetype_t)0x00000040)
|
||||
#define ICSNEO_DEVICETYPE_ECU ((devicetype_t)0x00000080)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,75 @@
|
|||
#ifndef __NEOVICONNECT_H_
|
||||
#define __NEOVICONNECT_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/neoviconnect/neoviconnectsettings.h"
|
||||
|
||||
namespace icsneo {
|
||||
|
||||
class NeoVIConnect : public Device {
|
||||
public:
|
||||
// Serial numbers start with DM
|
||||
// Ethernet MAC allocation is 0x1F, standard driver is Raw
|
||||
ICSNEO_FINDABLE_DEVICE(NeoVIConnect, DeviceType::Connect, "DM");
|
||||
|
||||
static const std::vector<Network>& GetSupportedNetworks() {
|
||||
static std::vector<Network> supportedNetworks = {
|
||||
Network::NetID::HSCAN,
|
||||
Network::NetID::MSCAN,
|
||||
Network::NetID::HSCAN2,
|
||||
Network::NetID::HSCAN3,
|
||||
Network::NetID::HSCAN4,
|
||||
Network::NetID::HSCAN5,
|
||||
Network::NetID::HSCAN6,
|
||||
Network::NetID::HSCAN7,
|
||||
|
||||
Network::NetID::Ethernet,
|
||||
|
||||
Network::NetID::LIN,
|
||||
Network::NetID::LIN2
|
||||
};
|
||||
return supportedNetworks;
|
||||
}
|
||||
|
||||
protected:
|
||||
NeoVIConnect(neodevice_t neodevice, const driver_factory_t& makeDriver) : Device(neodevice) {
|
||||
initialize<NeoVIConnectSettings, 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; }
|
||||
|
||||
std::optional<MemoryAddress> getCoreminiStartAddressFlash() const override {
|
||||
return 33*1024*1024;
|
||||
}
|
||||
|
||||
std::optional<MemoryAddress> getCoreminiStartAddressSD() const override {
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
@ -0,0 +1,161 @@
|
|||
#ifndef __NEOVICONNECTSETTINGS_H_
|
||||
#define __NEOVICONNECTSETTINGS_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 reservedA;
|
||||
uint32_t pwr_man_timeout;
|
||||
uint64_t network_enables;
|
||||
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;
|
||||
uint16_t iso_parity;
|
||||
uint16_t iso_msg_termination;
|
||||
ISO9141_KEYWORD2000_SETTINGS iso9141_kwp_settings_2;
|
||||
uint16_t iso_parity_2;
|
||||
uint16_t iso_msg_termination_2;
|
||||
ETHERNET_SETTINGS ethernet_1;
|
||||
ETHERNET_SETTINGS2 ethernet2_1;
|
||||
ETHERNET_SETTINGS ethernet_2;
|
||||
ETHERNET_SETTINGS2 ethernet2_2;
|
||||
STextAPISettings text_api;
|
||||
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;
|
||||
Fire3LinuxSettings os_settings;
|
||||
RAD_GPTP_SETTINGS gPTP;
|
||||
struct
|
||||
{
|
||||
uint32_t disableUsbCheckOnBoot : 1;
|
||||
uint32_t enableLatencyTest : 1;
|
||||
uint32_t enableDefaultLogger : 1;
|
||||
uint32_t enableDefaultUpload : 1;
|
||||
uint32_t reserved3 : 28;
|
||||
} flags;
|
||||
} neoviconnect_settings_t;
|
||||
|
||||
typedef struct {
|
||||
} neoviconnect_status_t;
|
||||
#pragma pack(pop)
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
#include <iostream>
|
||||
|
||||
class NeoVIConnectSettings : public IDeviceSettings {
|
||||
public:
|
||||
NeoVIConnectSettings(std::shared_ptr<Communication> com) : IDeviceSettings(com, sizeof(neoviconnect_settings_t)) {}
|
||||
const CAN_SETTINGS* getCANSettingsFor(Network net) const override {
|
||||
auto cfg = getStructurePointer<neoviconnect_settings_t>();
|
||||
if(cfg == nullptr)
|
||||
return nullptr;
|
||||
switch(net.getNetID()) {
|
||||
case Network::NetID::HSCAN:
|
||||
return &(cfg->can1);
|
||||
case Network::NetID::HSCAN2:
|
||||
return &(cfg->can2);
|
||||
case Network::NetID::HSCAN3:
|
||||
return &(cfg->can3);
|
||||
case Network::NetID::HSCAN4:
|
||||
return &(cfg->can4);
|
||||
case Network::NetID::HSCAN5:
|
||||
return &(cfg->can5);
|
||||
case Network::NetID::HSCAN6:
|
||||
return &(cfg->can6);
|
||||
case Network::NetID::HSCAN7:
|
||||
return &(cfg->can7);
|
||||
case Network::NetID::MSCAN:
|
||||
return &(cfg->can8);
|
||||
default:
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
const CANFD_SETTINGS* getCANFDSettingsFor(Network net) const override {
|
||||
auto cfg = getStructurePointer<neoviconnect_settings_t>();
|
||||
if(cfg == nullptr)
|
||||
return nullptr;
|
||||
switch(net.getNetID()) {
|
||||
case Network::NetID::HSCAN:
|
||||
return &(cfg->canfd1);
|
||||
case Network::NetID::HSCAN2:
|
||||
return &(cfg->canfd2);
|
||||
case Network::NetID::HSCAN3:
|
||||
return &(cfg->canfd3);
|
||||
case Network::NetID::HSCAN4:
|
||||
return &(cfg->canfd4);
|
||||
case Network::NetID::HSCAN5:
|
||||
return &(cfg->canfd5);
|
||||
case Network::NetID::HSCAN6:
|
||||
return &(cfg->canfd6);
|
||||
case Network::NetID::HSCAN7:
|
||||
return &(cfg->canfd7);
|
||||
case Network::NetID::MSCAN:
|
||||
return &(cfg->canfd8);
|
||||
default:
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
const LIN_SETTINGS* getLINSettingsFor(Network net) const override {
|
||||
auto cfg = getStructurePointer<neoviconnect_settings_t>();
|
||||
if(cfg == nullptr)
|
||||
return nullptr;
|
||||
switch(net.getNetID()) {
|
||||
case Network::NetID::LIN:
|
||||
return &(cfg->lin1);
|
||||
case Network::NetID::LIN2:
|
||||
return &(cfg->lin2);
|
||||
default:
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // __cplusplus
|
||||
|
||||
#endif
|
||||
|
|
@ -4,6 +4,7 @@
|
|||
#include "icsneo/device/tree/etherbadge/etherbadge.h"
|
||||
#include "icsneo/device/tree/neoobd2pro/neoobd2pro.h"
|
||||
#include "icsneo/device/tree/neoobd2sim/neoobd2sim.h"
|
||||
#include "icsneo/device/tree/neoviconnect/neoviconnect.h"
|
||||
#include "icsneo/device/tree/neovifire/neovifire.h"
|
||||
#include "icsneo/device/tree/neovifire2/neovifire2.h"
|
||||
#include "icsneo/device/tree/neovifire3/neovifire3.h"
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
#include "icsneo/device/tree/etherbadge/etherbadge.h"
|
||||
#include "icsneo/device/tree/neoobd2pro/neoobd2pro.h"
|
||||
#include "icsneo/device/tree/neoobd2sim/neoobd2sim.h"
|
||||
#include "icsneo/device/tree/neoviconnect/neoviconnect.h"
|
||||
#include "icsneo/device/tree/neovifire/neovifire.h"
|
||||
#include "icsneo/device/tree/neovifire2/neovifire2.h"
|
||||
#include "icsneo/device/tree/neovifire3/neovifire3.h"
|
||||
|
|
|
|||
Loading…
Reference in New Issue