Basic introspection for device supported networks

This commit is contained in:
Paul Hollinsky
2019-01-03 17:00:15 -05:00
parent efd5547e5c
commit 7e9fbc4959
17 changed files with 317 additions and 38 deletions
@@ -22,6 +22,20 @@ public:
return found;
}
static constexpr Network::NetID SUPPORTED_NETWORKS[] = {
Network::NetID::HSCAN,
Network::NetID::HSCAN2
};
protected:
virtual void setupSupportedRXNetworks(std::vector<Network>& rxNetworks) override {
for(auto& netid : SUPPORTED_NETWORKS)
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:
ValueCAN4_2(neodevice_t neodevice) : ValueCAN4(neodevice) {
initialize<STM32, ValueCAN4_2Settings>();