2022-03-05 12:44:19 +01:00
# include "core/plugin.h"
2022-02-21 23:32:11 +01:00
# include "logger.h"
# include "aqua/module_aqua_db_decoder.h"
2022-02-28 12:51:55 +01:00
# include "eos/module_eos_instruments.h"
2025-05-31 20:26:47 +02:00
# include "terra/module_terra_db_demod.h"
2022-02-21 23:32:11 +01:00
2023-11-21 20:04:39 +01:00
# include "eos/instruments/modis/calibrator/modis_calibrator.h"
2025-03-14 11:12:18 +01:00
// #include "eos/instruments/modis/day_fire.h"
2023-11-21 11:28:01 +01:00
2022-02-21 23:32:11 +01:00
class EOSSupport : public satdump : : Plugin
{
public :
2025-05-31 20:26:47 +02:00
std : : string getID ( ) { return " eos_support " ; }
2022-02-21 23:32:11 +01:00
void init ( )
{
2025-05-31 20:26:47 +02:00
satdump : : eventBus - > register_handler < satdump : : pipeline : : RegisterModulesEvent > ( registerPluginsHandler ) ;
2025-03-13 14:19:35 +01:00
satdump : : eventBus - > register_handler < satdump : : products : : RequestImageCalibratorEvent > ( provideImageCalibratorHandler ) ;
2025-03-14 11:12:18 +01:00
logger - > critical ( " TODOREWORK NO MORE CPP COMPOSITES!!! " ) ; // satdump::eventBus->register_handler<satdump::RequestCppCompositeEvent>(provideCppCompositeHandler);
2022-02-21 23:32:11 +01:00
}
2025-05-31 20:26:47 +02:00
static void registerPluginsHandler ( const satdump : : pipeline : : RegisterModulesEvent & evt )
2022-02-21 23:32:11 +01:00
{
REGISTER_MODULE_EXTERNAL ( evt . modules_registry , aqua : : AquaDBDecoderModule ) ;
REGISTER_MODULE_EXTERNAL ( evt . modules_registry , terra : : TerraDBDemodModule ) ;
2022-02-28 12:51:55 +01:00
REGISTER_MODULE_EXTERNAL ( evt . modules_registry , eos : : instruments : : EOSInstrumentsDecoderModule ) ;
2022-02-21 23:32:11 +01:00
}
2023-11-21 11:28:01 +01:00
2025-03-13 14:19:35 +01:00
static void provideImageCalibratorHandler ( const satdump : : products : : RequestImageCalibratorEvent & evt )
2023-11-21 11:28:01 +01:00
{
if ( evt . id = = " eos_modis " )
2025-03-13 14:19:35 +01:00
evt . calibrators . push_back ( std : : make_shared < eos : : modis : : EosMODISCalibrator > ( evt . products , evt . calib ) ) ;
2023-11-21 11:28:01 +01:00
}
2025-03-13 14:19:35 +01:00
2025-03-14 11:12:18 +01:00
// static void provideCppCompositeHandler(const satdump::RequestCppCompositeEvent &evt)
// {
// if (evt.id == "day_fire")
// evt.compositors.push_back(modis::dayFireCompositor);
// }
2022-02-21 23:32:11 +01:00
} ;
2024-11-01 20:29:59 -03:00
PLUGIN_LOADER ( EOSSupport )