SDRPlusPlus/decoder_modules/radio/src/main.cpp

29 wiersze
688 B
C++

#include "radio_module.h"
2020-08-11 16:33:42 +00:00
SDRPP_MOD_INFO{
2020-12-08 03:36:37 +00:00
/* Name: */ "radio",
/* Description: */ "Analog radio decoder",
2020-12-08 03:36:37 +00:00
/* Author: */ "Ryzerth",
/* Version: */ 2, 0, 0,
2020-12-08 03:36:37 +00:00
/* Max instances */ -1
2020-09-30 23:21:15 +00:00
};
MOD_EXPORT void _INIT_() {
json def = json({});
config.setPath(core::args["root"].s() + "/radio_config.json");
config.load(def);
config.enableAutoSave();
2020-08-12 14:43:44 +00:00
}
2020-12-08 03:36:37 +00:00
MOD_EXPORT ModuleManager::Instance* _CREATE_INSTANCE_(std::string name) {
2020-09-30 23:21:15 +00:00
return new RadioModule(name);
2020-08-11 16:33:42 +00:00
}
2020-09-30 23:21:15 +00:00
MOD_EXPORT void _DELETE_INSTANCE_(void* instance) {
delete (RadioModule*)instance;
2020-08-11 16:33:42 +00:00
}
2020-12-08 03:36:37 +00:00
MOD_EXPORT void _END_() {
config.disableAutoSave();
config.save();
2020-08-11 16:33:42 +00:00
}