satdump/plugins/sdr_sources/udp_source_support/main.cpp

24 lines
576 B
C++
Raw Normal View History

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