satdump/plugins/sdr_sources/net_source_support/main.cpp

24 lines
580 B
C++
Raw Permalink Normal View History

2023-07-15 23:13:46 +02:00
#include "core/plugin.h"
#include "logger.h"
#include "net_source.h"
2023-07-15 23:13:46 +02:00
class NetSourceSupport : public satdump::Plugin
2023-07-15 23:13:46 +02:00
{
public:
std::string getID()
{
return "network_source_support";
2023-07-15 23:13:46 +02:00
}
void init()
{
satdump::eventBus->register_handler<dsp::RegisterDSPSampleSourcesEvent>(registerSources);
}
static void registerSources(const dsp::RegisterDSPSampleSourcesEvent &evt)
{
evt.dsp_sources_registry.insert({NetSource::getID(), {NetSource::getInstance, NetSource::getAvailableSources}});
2023-07-15 23:13:46 +02:00
}
};
PLUGIN_LOADER(NetSourceSupport)