diff --git a/libPDK-PhasedCOTSArray.so b/libPDK-PhasedCOTSArray.so deleted file mode 100755 index 81ebc7f..0000000 Binary files a/libPDK-PhasedCOTSArray.so and /dev/null differ diff --git a/plugin-forwarder/UDPForwarderPlugin.cxx b/plugin-forwarder/UDPForwarderPlugin.cxx index 2386f6f..38e4ada 100644 --- a/plugin-forwarder/UDPForwarderPlugin.cxx +++ b/plugin-forwarder/UDPForwarderPlugin.cxx @@ -6,20 +6,25 @@ #include "boost/algorithm/string.hpp" std::string UDPForwarderPlugin::getPluginName() { - return "Forwarder"; + return "UDPForwarder"; } std::string UDPForwarderPlugin::getPluginDescription() { return "forward all received packets to the specified destination."; } +std::vector UDPForwarderPlugin::getSupportedDeviceTypes() { + static auto supportedDevices = std::vector{PicoScenesDeviceType::IWL5300, PicoScenesDeviceType::QCA9300, PicoScenesDeviceType::IWLMVM_AX200, PicoScenesDeviceType::IWLMVM_AX210, PicoScenesDeviceType::VirtualSDR, PicoScenesDeviceType::USRP}; + return supportedDevices; +} + +void UDPForwarderPlugin::initialization() { + options = std::make_shared("UDPForward Options"); + options->add_options() + ("forward-to", po::value(), "Destination address and port, e.g., 192.168.10.1:50000"); +} + std::shared_ptr UDPForwarderPlugin::pluginOptionsDescription() { - static auto options = std::make_shared("Options for plugin " + this->getPluginName()); - static std::once_flag onceFlag; - std::call_once(onceFlag, [&] { - options->add_options() - ("forward-to", po::value(), "Destination address and port, e.g., 192.168.10.1:50000"); - }); return options; } @@ -48,4 +53,4 @@ void UDPForwarderPlugin::parseAndExecuteCommands(const std::string &commandStrin void UDPForwarderPlugin::rxHandle(const ModularPicoScenesRxFrame &rxframe) { auto frameBuffer = rxframe.toBuffer(); UDPService::getInstance("Forwarder" + destinationIP + std::to_string(destinationPort))->sendData(frameBuffer.data(), frameBuffer.size(), destinationIP, destinationPort); -} \ No newline at end of file +} diff --git a/plugin-forwarder/UDPForwarderPlugin.hxx b/plugin-forwarder/UDPForwarderPlugin.hxx index deddd78..c7d23a7 100644 --- a/plugin-forwarder/UDPForwarderPlugin.hxx +++ b/plugin-forwarder/UDPForwarderPlugin.hxx @@ -17,6 +17,10 @@ public: std::string pluginStatus() override; + std::vector getSupportedDeviceTypes() override; + + void initialization() override; + std::shared_ptr pluginOptionsDescription() override; void parseAndExecuteCommands(const std::string &commandString) override; @@ -30,6 +34,7 @@ public: private: std::string destinationIP{}; uint16_t destinationPort{0}; + std::shared_ptr options; }; BOOST_DLL_ALIAS(UDPForwarderPlugin::create, initPicoScenesPlugin)