From 0ff12300f34be54ec7d3380a4ab6693a7d7c3fb1 Mon Sep 17 00:00:00 2001 From: Paul Hollinsky Date: Fri, 11 Mar 2022 10:53:05 -0500 Subject: [PATCH] RAD-Gigalog: Rename to RAD-Mars --- device/devicefinder.cpp | 16 +++++++-------- include/icsneo/communication/packetizer.h | 2 +- include/icsneo/device/devicetype.h | 8 ++++---- .../radgigalog.h => radmars/radmars.h} | 16 +++++++-------- .../radgigalogeth.h => radmars/radmarseth.h} | 18 ++++++++--------- .../radmarssettings.h} | 20 +++++++++---------- .../radgigalogusb.h => radmars/radmarsusb.h} | 14 ++++++------- include/icsneo/platform/posix/devices.h | 4 ++-- include/icsneo/platform/windows/devices.h | 4 ++-- 9 files changed, 51 insertions(+), 51 deletions(-) rename include/icsneo/device/tree/{radgigalog/radgigalog.h => radmars/radmars.h} (84%) rename include/icsneo/device/tree/{radgigalog/radgigalogeth.h => radmars/radmarseth.h} (72%) rename include/icsneo/device/tree/{radgigalog/radgigalogsettings.h => radmars/radmarssettings.h} (87%) rename include/icsneo/device/tree/{radgigalog/radgigalogusb.h => radmars/radmarsusb.h} (52%) diff --git a/device/devicefinder.cpp b/device/devicefinder.cpp index 53c27df..45537ce 100644 --- a/device/devicefinder.cpp +++ b/device/devicefinder.cpp @@ -51,12 +51,12 @@ static std::vector supportedDevices = { RADGalaxy::DEVICE_TYPE, #endif - #ifdef __RADGIGALOG_ETH_H_ - RADGigalogETH::DEVICE_TYPE, + #ifdef __RADMARS_ETH_H_ + RADMarsETH::DEVICE_TYPE, #endif - #ifdef __RADGIGALOG_USB_H_ - RADGigalogUSB::DEVICE_TYPE, + #ifdef __RADMARS_USB_H_ + RADMarsUSB::DEVICE_TYPE, #endif #ifdef __RADGIGASTAR_ETH_H_ @@ -181,12 +181,12 @@ std::vector> DeviceFinder::FindAll() { findResults.push_back(RADGalaxy::Find(pcapDevices)); #endif - #ifdef __RADGIGALOG_ETH_H_ - findResults.push_back(RADGigalogETH::Find(pcapDevices)); + #ifdef __RADMARS_ETH_H_ + findResults.push_back(RADMarsETH::Find(pcapDevices)); #endif - #ifdef __RADGIGALOG_USB_H_ - findResults.push_back(RADGigalogUSB::Find()); + #ifdef __RADMARS_USB_H_ + findResults.push_back(RADMarsUSB::Find()); #endif #ifdef __RADGIGASTAR_ETH_H_ diff --git a/include/icsneo/communication/packetizer.h b/include/icsneo/communication/packetizer.h index 053835e..6e2a66f 100644 --- a/include/icsneo/communication/packetizer.h +++ b/include/icsneo/communication/packetizer.h @@ -23,7 +23,7 @@ public: std::vector> output(); bool disableChecksum = false; // Even for short packets - bool align16bit = true; // Not needed for Gigalog, Galaxy, etc and newer + bool align16bit = true; // Not needed for Mars, Galaxy, etc and newer private: enum class ReadState { diff --git a/include/icsneo/device/devicetype.h b/include/icsneo/device/devicetype.h index dc083b9..14aba6c 100644 --- a/include/icsneo/device/devicetype.h +++ b/include/icsneo/device/devicetype.h @@ -29,7 +29,7 @@ public: RADSupermoon = (0x00000003), DW_VCAN = (0x00000004), RADMoon2 = (0x00000005), - RADGigalog = (0x00000006), + RADMars = (0x00000006), VCAN4_1 = (0x00000007), FIRE = (0x00000008), RADPluto = (0x00000009), @@ -95,8 +95,8 @@ public: return "DW_VCAN"; case RADMoon2: return "RAD-Moon 2"; - case RADGigalog: - return "RAD-Gigalog"; + case RADMars: + return "RAD-Mars"; case VCAN4_1: return "ValueCAN 4-1"; case FIRE: @@ -203,7 +203,7 @@ private: #define ICSNEO_DEVICETYPE_RADSUPERMOON ((devicetype_t)0x00000003) #define ICSNEO_DEVICETYPE_DW_VCAN ((devicetype_t)0x00000004) #define ICSNEO_DEVICETYPE_RADMOON2 ((devicetype_t)0x00000005) -#define ICSNEO_DEVICETYPE_RADGIGALOG ((devicetype_t)0x00000006) +#define ICSNEO_DEVICETYPE_RADMARS ((devicetype_t)0x00000006) #define ICSNEO_DEVICETYPE_VCAN4_1 ((devicetype_t)0x00000007) #define ICSNEO_DEVICETYPE_FIRE ((devicetype_t)0x00000008) #define ICSNEO_DEVICETYPE_RADPLUTO ((devicetype_t)0x00000009) diff --git a/include/icsneo/device/tree/radgigalog/radgigalog.h b/include/icsneo/device/tree/radmars/radmars.h similarity index 84% rename from include/icsneo/device/tree/radgigalog/radgigalog.h rename to include/icsneo/device/tree/radmars/radmars.h index 760decd..68ad170 100644 --- a/include/icsneo/device/tree/radgigalog/radgigalog.h +++ b/include/icsneo/device/tree/radmars/radmars.h @@ -1,23 +1,23 @@ -#ifndef __RADGIGALOG_H_ -#define __RADGIGALOG_H_ +#ifndef __RADMARS_H_ +#define __RADMARS_H_ #ifdef __cplusplus #include "icsneo/device/device.h" #include "icsneo/device/devicetype.h" -#include "icsneo/device/tree/radgigalog/radgigalogsettings.h" +#include "icsneo/device/tree/radmars/radmarssettings.h" namespace icsneo { -class RADGigalog : public Device { +class RADMars : public Device { public: - static constexpr DeviceType::Enum DEVICE_TYPE = DeviceType::RADGigalog; + static constexpr DeviceType::Enum DEVICE_TYPE = DeviceType::RADMars; static constexpr const char* SERIAL_START = "GL"; size_t getEthernetActivationLineCount() const override { return 1; } protected: - RADGigalog(neodevice_t neodevice) : Device(neodevice) { + RADMars(neodevice_t neodevice) : Device(neodevice) { getWritableNeoDevice().type = DEVICE_TYPE; } @@ -78,10 +78,10 @@ protected: } void handleDeviceStatus(const std::shared_ptr& message) override { - if(message->data.size() < sizeof(radgigalog_status_t)) + if(message->data.size() < sizeof(radmars_status_t)) return; std::lock_guard lk(ioMutex); - const radgigalog_status_t* status = reinterpret_cast(message->data.data()); + const radmars_status_t* status = reinterpret_cast(message->data.data()); ethActivationStatus = status->ethernetActivationLineEnabled; } }; diff --git a/include/icsneo/device/tree/radgigalog/radgigalogeth.h b/include/icsneo/device/tree/radmars/radmarseth.h similarity index 72% rename from include/icsneo/device/tree/radgigalog/radgigalogeth.h rename to include/icsneo/device/tree/radmars/radmarseth.h index 4c1f0b8..59285bc 100644 --- a/include/icsneo/device/tree/radgigalog/radgigalogeth.h +++ b/include/icsneo/device/tree/radmars/radmarseth.h @@ -1,21 +1,21 @@ -#ifndef __RADGIGALOG_ETH_H_ -#define __RADGIGALOG_ETH_H_ +#ifndef __RADMARS_ETH_H_ +#define __RADMARS_ETH_H_ #ifdef __cplusplus -#include "icsneo/device/tree/radgigalog/radgigalog.h" +#include "icsneo/device/tree/radmars/radmars.h" #include "icsneo/platform/pcap.h" namespace icsneo { -class RADGigalogETH : public RADGigalog { +class RADMarsETH : public RADMars { public: static constexpr const uint16_t PRODUCT_ID = 0x000A; static std::vector> Find(const std::vector& pcapDevices) { std::vector> found; for(auto& foundDev : pcapDevices) { - auto fakedev = std::shared_ptr(new RADGigalogETH({})); + auto fakedev = std::shared_ptr(new RADMarsETH({})); for (auto& payload : foundDev.discoveryPackets) fakedev->com->packetizer->input(payload); for (auto& packet : fakedev->com->packetizer->output()) { @@ -32,11 +32,11 @@ public: if(sn->deviceSerial.length() < 2) continue; if(sn->deviceSerial.substr(0, 2) != SERIAL_START) - continue; // Not a RADGigalog + continue; // Not a RAD-Mars auto device = foundDev.device; device.serial[sn->deviceSerial.copy(device.serial, sizeof(device.serial))] = '\0'; - found.push_back(std::shared_ptr(new RADGigalogETH(std::move(device)))); + found.push_back(std::shared_ptr(new RADMarsETH(std::move(device)))); break; } } @@ -45,8 +45,8 @@ public: } private: - RADGigalogETH(neodevice_t neodevice) : RADGigalog(neodevice) { - initialize(); + RADMarsETH(neodevice_t neodevice) : RADMars(neodevice) { + initialize(); productId = PRODUCT_ID; } }; diff --git a/include/icsneo/device/tree/radgigalog/radgigalogsettings.h b/include/icsneo/device/tree/radmars/radmarssettings.h similarity index 87% rename from include/icsneo/device/tree/radgigalog/radgigalogsettings.h rename to include/icsneo/device/tree/radmars/radmarssettings.h index 3e6377d..c4f8d90 100644 --- a/include/icsneo/device/tree/radgigalog/radgigalogsettings.h +++ b/include/icsneo/device/tree/radmars/radmarssettings.h @@ -1,5 +1,5 @@ -#ifndef __RADGIGALOGSETTINGS_H_ -#define __RADGIGALOGSETTINGS_H_ +#ifndef __RADMARSSETTINGS_H_ +#define __RADMARSSETTINGS_H_ #include #include "icsneo/device/idevicesettings.h" @@ -85,25 +85,25 @@ typedef struct { ETHERNET_SETTINGS2 ethernet2; uint16_t network_enables_4; RAD_REPORTING_SETTINGS reporting; -} radgigalog_settings_t; +} radmars_settings_t; typedef struct { uint8_t unused[3]; uint8_t ethernetActivationLineEnabled; -} radgigalog_status_t; +} radmars_status_t; #pragma pack(pop) #ifdef __cplusplus -static_assert(sizeof(radgigalog_settings_t) == 666, "RADGigalog settings size mismatch"); +static_assert(sizeof(radmars_settings_t) == 666, "RAD-Mars settings size mismatch"); #include -class RADGigalogSettings : public IDeviceSettings { +class RADMarsSettings : public IDeviceSettings { public: - RADGigalogSettings(std::shared_ptr com) : IDeviceSettings(com, sizeof(radgigalog_settings_t)) {} + RADMarsSettings(std::shared_ptr com) : IDeviceSettings(com, sizeof(radmars_settings_t)) {} const CAN_SETTINGS* getCANSettingsFor(Network net) const override { - auto cfg = getStructurePointer(); + auto cfg = getStructurePointer(); if(cfg == nullptr) return nullptr; switch(net.getNetID()) { @@ -128,7 +128,7 @@ public: } } const CANFD_SETTINGS* getCANFDSettingsFor(Network net) const override { - auto cfg = getStructurePointer(); + auto cfg = getStructurePointer(); if(cfg == nullptr) return nullptr; switch(net.getNetID()) { @@ -172,7 +172,7 @@ public: protected: ICSNEO_UNALIGNED(const uint64_t*) getTerminationEnables() const override { - auto cfg = getStructurePointer(); + auto cfg = getStructurePointer(); if(cfg == nullptr) return nullptr; return &cfg->termination_enables; diff --git a/include/icsneo/device/tree/radgigalog/radgigalogusb.h b/include/icsneo/device/tree/radmars/radmarsusb.h similarity index 52% rename from include/icsneo/device/tree/radgigalog/radgigalogusb.h rename to include/icsneo/device/tree/radmars/radmarsusb.h index 3f492dd..0b2c3f9 100644 --- a/include/icsneo/device/tree/radgigalog/radgigalogusb.h +++ b/include/icsneo/device/tree/radmars/radmarsusb.h @@ -1,28 +1,28 @@ -#ifndef __RADGIGALOG_USB_H_ -#define __RADGIGALOG_USB_H_ +#ifndef __RADMARS_USB_H_ +#define __RADMARS_USB_H_ #ifdef __cplusplus -#include "icsneo/device/tree/radgigalog/radgigalog.h" +#include "icsneo/device/tree/radmars/radmars.h" #include "icsneo/platform/ftdi3.h" namespace icsneo { -class RADGigalogUSB : public RADGigalog { +class RADMarsUSB : public RADMars { public: static constexpr const uint16_t PRODUCT_ID = 0x1203; static std::vector> Find() { std::vector> found; for(auto neodevice : FTDI3::FindByProduct(PRODUCT_ID)) - found.emplace_back(new RADGigalogUSB(neodevice)); // Creation of the shared_ptr + found.emplace_back(new RADMarsUSB(neodevice)); // Creation of the shared_ptr return found; } private: - RADGigalogUSB(neodevice_t neodevice) : RADGigalog(neodevice) { - initialize(); + RADMarsUSB(neodevice_t neodevice) : RADMars(neodevice) { + initialize(); productId = PRODUCT_ID; } }; diff --git a/include/icsneo/platform/posix/devices.h b/include/icsneo/platform/posix/devices.h index d9931c0..435f157 100644 --- a/include/icsneo/platform/posix/devices.h +++ b/include/icsneo/platform/posix/devices.h @@ -12,10 +12,10 @@ #include "icsneo/device/tree/plasion/neoviplasma.h" #include "icsneo/device/tree/radepsilon/radepsilon.h" #include "icsneo/device/tree/radgalaxy/radgalaxy.h" -#include "icsneo/device/tree/radgigalog/radgigalogeth.h" -#include "icsneo/device/tree/radgigalog/radgigalogusb.h" #include "icsneo/device/tree/radgigastar/radgigastareth.h" #include "icsneo/device/tree/radgigastar/radgigastarusb.h" +#include "icsneo/device/tree/radmars/radmarseth.h" +#include "icsneo/device/tree/radmars/radmarsusb.h" #include "icsneo/device/tree/radmoon2/radmoon2.h" #include "icsneo/device/tree/radmoonduo/radmoonduo.h" #include "icsneo/device/tree/radpluto/radplutousb.h" diff --git a/include/icsneo/platform/windows/devices.h b/include/icsneo/platform/windows/devices.h index a56a678..35bfd3a 100644 --- a/include/icsneo/platform/windows/devices.h +++ b/include/icsneo/platform/windows/devices.h @@ -12,10 +12,10 @@ #include "icsneo/device/tree/plasion/neoviplasma.h" #include "icsneo/device/tree/radepsilon/radepsilon.h" #include "icsneo/device/tree/radgalaxy/radgalaxy.h" -#include "icsneo/device/tree/radgigalog/radgigalogeth.h" -#include "icsneo/device/tree/radgigalog/radgigalogusb.h" #include "icsneo/device/tree/radgigastar/radgigastareth.h" #include "icsneo/device/tree/radgigastar/radgigastarusb.h" +#include "icsneo/device/tree/radmars/radmarseth.h" +#include "icsneo/device/tree/radmars/radmarsusb.h" #include "icsneo/device/tree/radmoon2/radmoon2.h" #include "icsneo/device/tree/radmoonduo/radmoonduo.h" #include "icsneo/device/tree/radpluto/radplutousb.h"