Drivers: Decouple from devices

This allows us to better implement alternative drivers
for devices, such as for device sharing servers or
talking to CoreMini processors within the same device.
This commit is contained in:
Paul Hollinsky
2022-03-27 14:30:31 -04:00
parent 0ff12300f3
commit 781fc2c034
66 changed files with 780 additions and 1566 deletions
+3 -5
View File
@@ -5,7 +5,6 @@
#include "icsneo/device/device.h"
#include "icsneo/communication/multichannelcommunication.h"
#include "icsneo/platform/ftdi.h"
#include "icsneo/device/extensions/flexray/extension.h"
namespace icsneo {
@@ -45,6 +44,8 @@ public:
size_t getEthernetActivationLineCount() const override { return 1; }
protected:
using Device::Device;
// TODO This is done so that Plasion can still transmit it's basic networks, awaiting slave VNET support
virtual bool isSupportedRXNetwork(const Network&) const override { return true; }
virtual bool isSupportedTXNetwork(const Network&) const override { return true; }
@@ -55,7 +56,7 @@ protected:
addExtension(std::make_shared<FlexRay::Extension>(*this, flexRayControllers));
}
virtual void setupSupportedRXNetworks(std::vector<Network>& rxNetworks) override {
void setupSupportedRXNetworks(std::vector<Network>& rxNetworks) override {
for(auto& netid : GetSupportedNetworks())
rxNetworks.emplace_back(netid);
// TODO Check configuration for FlexRay ColdStart mode, disable FlexRay 2 if so
@@ -87,9 +88,6 @@ protected:
const fire2vnet_status_t* status = reinterpret_cast<const fire2vnet_status_t*>(message->data.data());
ethActivationStatus = status->ethernetActivationLineEnabled;
}
public:
Plasion(neodevice_t neodevice) : Device(neodevice) {}
};
}