ValueCAN 4-2EL: Allow the Ethernet network while communicating over it

All frames except for the CAB1/CAB2 communication are reported
This commit is contained in:
Paul Hollinsky
2021-05-04 23:08:34 -04:00
parent b104b34919
commit eca1110305
3 changed files with 18 additions and 38 deletions
@@ -48,11 +48,29 @@ public:
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:
ValueCAN4_2EL(neodevice_t neodevice) : ValueCAN4(neodevice) {
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; }
void handleDeviceStatus(const std::shared_ptr<Message>& message) override {