Skip to content

Commit

Permalink
differentiate between tx with and without overhead
Browse files Browse the repository at this point in the history
  • Loading branch information
Consti10 committed Jul 25, 2023
1 parent ed7be53 commit d149977
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
11 changes: 6 additions & 5 deletions executables/injection_rate_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,14 @@ static TestResult increase_pps_until_fail(std::shared_ptr<WBTxRx> txrx,const int
result.pass_bps_measured=last_passed_bps_measured;
result.fail_pps_set=pps;
result.fail_pps_measured=txstats.curr_packets_per_second;
result.fail_bps_measured=txstats.curr_bits_per_second;
result.fail_bps_measured=txstats.curr_bits_per_second_excluding_overhead;
return result;
}else{
m_console->info("MCS {} passed {} - measured {} {}", mcs,pps,txstats.curr_packets_per_second,StringHelper::bitrate_readable(txstats.curr_bits_per_second));
m_console->info("MCS {} passed {} - measured {} {}", mcs,pps,txstats.curr_packets_per_second,StringHelper::bitrate_readable(txstats.curr_bits_per_second_excluding_overhead));
m_console->info("{}",WBTxRx::tx_stats_to_string(txstats));
last_passed_pps_set=pps;
last_passed_pps_measured=txstats.curr_packets_per_second;
last_passed_bps_measured=txstats.curr_bits_per_second;
last_passed_bps_measured=txstats.curr_bits_per_second_excluding_overhead;
}
}
//assert(false);
Expand Down Expand Up @@ -117,10 +118,10 @@ static Validation validate_specific_rate(std::shared_ptr<WBTxRx> txrx,const int
auto ret=Validation{txstats.count_tx_injections_error_hint,stream_generator->n_times_cannot_keep_up_wanted_pps};
if(ret.count_tx_injections_error_hint>0 || ret.n_times_cannot_keep_up_wanted_pps>10){
m_console->info("MCS {} didn't pass {} measured {}-{}",pps,
txstats.curr_packets_per_second,StringHelper::bitrate_readable(txstats.curr_bits_per_second));
txstats.curr_packets_per_second,StringHelper::bitrate_readable(txstats.curr_bits_per_second_excluding_overhead));
}else{
m_console->info("MCS {} passed {} measured {}-{}",pps,
txstats.curr_packets_per_second,StringHelper::bitrate_readable(txstats.curr_bits_per_second));
txstats.curr_packets_per_second,StringHelper::bitrate_readable(txstats.curr_bits_per_second_excluding_overhead));
}
return ret;
}
Expand Down
12 changes: 9 additions & 3 deletions src/Ieee80211Header.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,18 @@ class Ieee80211Header {
// write the port re-using the MAC address (which is unused for broadcast)
// write sequence number (not used on rx right now)
void writeParams(const uint8_t radioPort, const uint16_t seqenceNumber) {
write_radio_port(radioPort);
write_ieee80211_seq_nr(seqenceNumber);
}
void write_ieee80211_seq_nr(const uint16_t seq_nr){
data[FRAME_SEQ_LB] = seq_nr & 0xff;
data[FRAME_SEQ_HB] = (seq_nr >> 8) & 0xff;
}
void write_radio_port(const uint8_t radioPort){
data[SRC_MAC_LASTBYTE] = radioPort;
data[DST_MAC_LASTBYTE] = radioPort;
//setSequenceControl({0,seqenceNumber});
data[FRAME_SEQ_LB] = seqenceNumber & 0xff;
data[FRAME_SEQ_HB] = (seqenceNumber >> 8) & 0xff;
}

uint8_t getRadioPort() const {
return data[SRC_MAC_LASTBYTE];
}
Expand Down

0 comments on commit d149977

Please sign in to comment.