Skip to content

Commit

Permalink
* [Parsing-Core] Implement NDP frame transmission
Browse files Browse the repository at this point in the history
  • Loading branch information
jiangzp committed Feb 13, 2022
1 parent 70a39b5 commit f251da5
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
File renamed without changes.
3 changes: 3 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog of PicoScenes Plugin Development Kit (PDK)

## Feb. 14, 2022
* [EchoProbe] Implement NDP frame transmission

## Feb. 2, 2022
* [All] plugins now skips the parsing Tx parameters

Expand Down
18 changes: 11 additions & 7 deletions plugin-echoprobe/EchoProbeInitiator.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,18 @@ std::tuple<std::optional<ModularPicoScenesRxFrame>, std::optional<ModularPicoSce

std::shared_ptr<PicoScenesFrameBuilder> EchoProbeInitiator::buildBasicFrame(uint16_t taskId, const EchoProbePacketFrameType &frameType, uint16_t sessionId) const {
auto fp = std::make_shared<PicoScenesFrameBuilder>(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->makeFrame_NDP();
fp->setNDPFrame();
return fp;
} else {
fp->makeFrame_HeaderOnly();
fp->setTaskId(taskId);
Expand All @@ -261,12 +271,6 @@ std::shared_ptr<PicoScenesFrameBuilder> EchoProbeInitiator::buildBasicFrame(uint
if (frameType == EchoProbeRequestFrameType)
fp->addExtraInfo();
}
/**
* @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->setDestinationAddress(parameters.inj_target_mac_address->data());
if (isIntelMVMTypeNIC(nic->getDeviceType())) {
Expand Down
2 changes: 0 additions & 2 deletions plugin-echoprobe/EchoProbeInitiator.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ class EchoProbeInitiator {

std::vector<double> enumerateArbitraryCarrierFrequencies();

std::vector<double> enumerateIntelCarrierFrequencies();

std::vector<double> enumerateSamplingRates();

std::vector<double> enumerateArbitrarySamplingRates();
Expand Down

0 comments on commit f251da5

Please sign in to comment.