From 29eb611e291b07db4dcfbf5ff0b1defde37a062f Mon Sep 17 00:00:00 2001 From: Zhiping Jiang Date: Tue, 15 Feb 2022 01:25:18 +0800 Subject: [PATCH] fix bug --- plugin-echoprobe/EchoProbeInitiator.cxx | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/plugin-echoprobe/EchoProbeInitiator.cxx b/plugin-echoprobe/EchoProbeInitiator.cxx index ba4ddc2..4f8410b 100644 --- a/plugin-echoprobe/EchoProbeInitiator.cxx +++ b/plugin-echoprobe/EchoProbeInitiator.cxx @@ -247,20 +247,24 @@ std::tuple, std::optional EchoProbeInitiator::buildBasicFrame(uint16_t taskId, const EchoProbePacketFrameType &frameType, uint16_t sessionId) const { auto fp = std::make_shared(nic); - fp->resetFrameBuilder(); - - /** - * @brief PicoScenes Platform CLI parser has *absorbed* the common Tx parameters. - * The platform parser will parse the Tx parameters options and store the results in AbstractNIC. - * Plugin developers now can access the parameters via a new method nic->getUserSpecifiedTxParameters(). - */ - fp->setTxParameters(nic->getUserSpecifiedTxParameters()); if (frameType == SimpleInjectionFrameType && parameters.injectorContent == EchoProbeInjectionContent::NDP) { - fp->setNDPFrame(); + fp->makeFrame_NDP(); + /** + * @brief PicoScenes Platform CLI parser has *absorbed* the common Tx parameters. + * The platform parser will parse the Tx parameters options and store the results in AbstractNIC. + * Plugin developers now can access the parameters via a new method nic->getUserSpecifiedTxParameters(). + */ + fp->setTxParameters(nic->getUserSpecifiedTxParameters()); return fp; } else { fp->makeFrame_HeaderOnly(); + /** + * @brief PicoScenes Platform CLI parser has *absorbed* the common Tx parameters. + * The platform parser will parse the Tx parameters options and store the results in AbstractNIC. + * Plugin developers now can access the parameters via a new method nic->getUserSpecifiedTxParameters(). + */ + fp->setTxParameters(nic->getUserSpecifiedTxParameters()); fp->setTaskId(taskId); fp->setPicoScenesFrameType(frameType);