2023-07-15 23:13:46 +02:00
|
|
|
#include "core/plugin.h"
|
|
|
|
|
#include "logger.h"
|
2024-03-09 15:38:41 +01:00
|
|
|
#include "net_source.h"
|
2023-07-15 23:13:46 +02:00
|
|
|
|
2024-03-09 15:38:41 +01:00
|
|
|
class NetSourceSupport : public satdump::Plugin
|
2023-07-15 23:13:46 +02:00
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
std::string getID()
|
|
|
|
|
{
|
2024-03-09 15:38:41 +01:00
|
|
|
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)
|
|
|
|
|
{
|
2024-03-09 15:38:41 +01:00
|
|
|
evt.dsp_sources_registry.insert({NetSource::getID(), {NetSource::getInstance, NetSource::getAvailableSources}});
|
2023-07-15 23:13:46 +02:00
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
2024-03-09 15:38:41 +01:00
|
|
|
PLUGIN_LOADER(NetSourceSupport)
|