Skip to content

Commit

Permalink
Merge commit '888c39118b95986e4d3a5c019f965036a31fe126'
Browse files Browse the repository at this point in the history
  • Loading branch information
jiangzp committed Dec 14, 2021
2 parents f04d83a + 888c391 commit f7c21b7
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 0 deletions.
5 changes: 5 additions & 0 deletions plugin-echoprobe/EchoProbeInitiator.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,11 @@ std::shared_ptr<PicoScenesFrameBuilder> EchoProbeInitiator::buildBasicFrame(uint
fp->setGuardInterval(GuardIntervalEnum(parameters.guardInterval.value_or(800)));
fp->setNumberOfExtraSounding(parameters.numESS.value_or(0));
fp->setChannelCoding((ChannelCodingEnum) parameters.coding.value_or((uint32_t) ChannelCodingEnum::BCC));
fp->setTxHEExtendedRange(parameters.txHEExtendedRange.value_or(false));
if(parameters.heHighDoppler.value()){
fp->setHEHighDoppler(true);
fp->setHEMidamblePeriodicity(parameters.heHighDoppler.value());
}
fp->getFrame()->txParameters.idleTime = parameters.ifs.value_or(20e-6);

fp->setDestinationAddress(parameters.inj_target_mac_address->data());
Expand Down
3 changes: 3 additions & 0 deletions plugin-echoprobe/EchoProbeParameters.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ EchoProbeParameters::EchoProbeParameters() {
guardInterval = 800;
cbw = 20;
coding = uint32_t(ChannelCodingEnum::BCC);
txHEExtendedRange = false;
heHighDoppler = false;
heMidamblePeriodicity = 10;
injectorContent = EchoProbeInjectionContent::Full;
tx_delay_us = 5e5;
timeout_ms = 10;
Expand Down
3 changes: 3 additions & 0 deletions plugin-echoprobe/EchoProbeParameters.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ class EchoProbeParameters {
std::optional<uint32_t> numESS;
std::optional<uint32_t> guardInterval;
std::optional<uint32_t> coding;
std::optional<bool> txHEExtendedRange;
std::optional<bool> heHighDoppler;
std::optional<uint32_t> heMidamblePeriodicity;
std::optional<double> ifs;
EchoProbeInjectionContent injectorContent;

Expand Down
20 changes: 20 additions & 0 deletions plugin-echoprobe/EchoProbePlugin.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ void EchoProbePlugin::initialization() {
("ess", po::value<uint32_t>(), "Number of Extension Spatial Stream for TX [ 0 as default, 1, 2, 3]")
("gi", po::value<uint32_t>(), "Guarding Interval [400, 800, 1600, 3200], 800 as default")
("coding", po::value<std::string>(), "Code scheme [LDPC, BCC], BCC as default")
("extended-range", "Enable 11ax extended range")
("high-doppler", po::value<uint32_t>(), "High doppler [10, 20], 10 as default")
("injector-content", po::value<std::string>(), "Content type for injector mode [full, header, ndp]")
("ifs", po::value<std::string>(), "Inter-Frame Spacing in seconds, 20e-6 as default");

Expand Down Expand Up @@ -242,6 +244,24 @@ void EchoProbePlugin::parseAndExecuteCommands(const std::string &commandString)
parameters.coding = (uint32_t) ChannelCodingEnum::BCC;
}

if (vm.count("extended-range")) {
parameters.txHEExtendedRange = true;
}

if (vm.count("high-doppler")) {
auto heMidamblePeriodicity = vm["high-doppler"].as<std::uint32_t>();
if (*parameters.format == PacketFormatEnum::PacketFormat_HESU || *parameters.format == PacketFormatEnum::PacketFormat_HEMU) {
if (heMidamblePeriodicity == 10 || heMidamblePeriodicity == 20) {
parameters.heHighDoppler = true;
parameters.heMidamblePeriodicity = heMidamblePeriodicity;
} else
throw std::invalid_argument(fmt::format("[EchoProbe Plugin]: invalid high doppler value: {}.\n", heMidamblePeriodicity));

}else{
throw std::invalid_argument(fmt::format("[EchoProbe Plugin]: Only packet format of 11ax supports high doppler."));
}
}

if (vm.count("injector-content")) {
auto codingStr = vm["injector-content"].as<std::string>();
if (boost::iequals(codingStr, "ndp"))
Expand Down

0 comments on commit f7c21b7

Please sign in to comment.