ValueCAN 4-2EL: Allow the Ethernet network while communicating over it
All frames except for the CAB1/CAB2 communication are reportedpull/35/head
parent
b104b34919
commit
eca1110305
|
|
@ -48,11 +48,29 @@ public:
|
||||||
return Device::getProductName();
|
return Device::getProductName();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static const std::vector<Network>& GetSupportedNetworks() {
|
||||||
|
static std::vector<Network> supportedNetworks = {
|
||||||
|
Network::NetID::HSCAN,
|
||||||
|
Network::NetID::HSCAN2,
|
||||||
|
|
||||||
|
Network::NetID::Ethernet
|
||||||
|
};
|
||||||
|
return supportedNetworks;
|
||||||
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
ValueCAN4_2EL(neodevice_t neodevice) : ValueCAN4(neodevice) {
|
ValueCAN4_2EL(neodevice_t neodevice) : ValueCAN4(neodevice) {
|
||||||
getWritableNeoDevice().type = DEVICE_TYPE;
|
getWritableNeoDevice().type = DEVICE_TYPE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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); }
|
||||||
|
|
||||||
size_t getEthernetActivationLineCount() const override { return 1; }
|
size_t getEthernetActivationLineCount() const override { return 1; }
|
||||||
|
|
||||||
void handleDeviceStatus(const std::shared_ptr<Message>& message) override {
|
void handleDeviceStatus(const std::shared_ptr<Message>& message) override {
|
||||||
|
|
|
||||||
|
|
@ -46,27 +46,8 @@ public:
|
||||||
return found;
|
return found;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const std::vector<Network>& GetSupportedNetworks() {
|
|
||||||
static std::vector<Network> supportedNetworks = {
|
|
||||||
Network::NetID::HSCAN,
|
|
||||||
Network::NetID::HSCAN2,
|
|
||||||
|
|
||||||
// No Network::NetID::Ethernet, since we're communicating over it instead
|
|
||||||
};
|
|
||||||
return supportedNetworks;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool currentDriverSupportsDFU() const override { return false; }
|
bool currentDriverSupportsDFU() const override { return false; }
|
||||||
|
|
||||||
protected:
|
|
||||||
virtual 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
|
|
||||||
virtual void setupSupportedTXNetworks(std::vector<Network>& txNetworks) override { setupSupportedRXNetworks(txNetworks); }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ValueCAN4_2EL_ETH(neodevice_t neodevice) : ValueCAN4_2EL(neodevice) {
|
ValueCAN4_2EL_ETH(neodevice_t neodevice) : ValueCAN4_2EL(neodevice) {
|
||||||
initialize<PCAP, ValueCAN4_2ELSettings>();
|
initialize<PCAP, ValueCAN4_2ELSettings>();
|
||||||
|
|
|
||||||
|
|
@ -22,25 +22,6 @@ public:
|
||||||
return found;
|
return found;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const std::vector<Network>& GetSupportedNetworks() {
|
|
||||||
static std::vector<Network> supportedNetworks = {
|
|
||||||
Network::NetID::HSCAN,
|
|
||||||
Network::NetID::HSCAN2,
|
|
||||||
|
|
||||||
Network::NetID::Ethernet
|
|
||||||
};
|
|
||||||
return supportedNetworks;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected:
|
|
||||||
virtual 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
|
|
||||||
virtual void setupSupportedTXNetworks(std::vector<Network>& txNetworks) override { setupSupportedRXNetworks(txNetworks); }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ValueCAN4_2EL_USB(neodevice_t neodevice) : ValueCAN4_2EL(neodevice) {
|
ValueCAN4_2EL_USB(neodevice_t neodevice) : ValueCAN4_2EL(neodevice) {
|
||||||
initialize<CDCACM, ValueCAN4_2ELSettings>();
|
initialize<CDCACM, ValueCAN4_2ELSettings>();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue