#ifndef __VALUECAN3_H_ #define __VALUECAN3_H_ #ifdef __cplusplus #include "icsneo/device/device.h" #include "icsneo/device/devicetype.h" #include "icsneo/device/tree/valuecan3/valuecan3settings.h" namespace icsneo { class ValueCAN3 : public Device { public: // USB PID is 0x0601, standard driver is DXX ICSNEO_FINDABLE_DEVICE_BY_SERIAL_RANGE(ValueCAN3, DeviceType::VCAN3, "80000", "139999"); static const std::vector& GetSupportedNetworks() { static std::vector supportedNetworks = { Network::NetID::DWCAN_01, Network::NetID::DWCAN_08 }; return supportedNetworks; } ProductID getProductID() const override { return ProductID::ValueCAN3; } private: ValueCAN3(neodevice_t neodevice, const driver_factory_t& makeDriver) : Device(neodevice) { initialize(makeDriver); } void setupSupportedRXNetworks(std::vector& 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& txNetworks) override { setupSupportedRXNetworks(txNetworks); } bool requiresVehiclePower() const override { return false; } std::optional getCoreminiStartAddressFlash() const override { return 512*2048; } std::optional getCoreminiStartAddressSD() const override { return 0; } }; } #endif // __cplusplus #endif