#include "dev.h" #include "core/plugin.h" #include "logger.h" namespace satdump { namespace ndsp { std::vector getDeviceList() { std::vector l; eventBus->fire_event({l}); logger->trace("Device list :"); for (auto &d : l) logger->trace(" - " + d.name); return l; } std::shared_ptr getDeviceInstanceFromInfo(DeviceInfo i, DeviceBlock::device_mode_t m) { std::vector> l; eventBus->fire_event({i, l}); if (l.size() == 0) throw satdump_exception("Could not get device instance! " + i.name); else if (l.size() > 1) throw satdump_exception("Got more than one device instance! " + i.name); for (auto &li : l) li->setDevInfo(i, m); return l[0]; } } // namespace ndsp } // namespace satdump