Skip to content

Commit

Permalink
reset per card stats
Browse files Browse the repository at this point in the history
  • Loading branch information
Consti10 committed Aug 7, 2023
1 parent 886828a commit f0079a8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions src/WBTxRx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,13 @@ void WBTxRx::rx_reset_stats() {
m_rx_stats=RxStats{};
m_rx_bitrate_calculator.reset();
m_rx_packets_per_second_calculator.reset();
m_seq_nr_helper.reset();
for(int i=0;i<m_wifi_cards.size();i++){
RxStatsPerCard card_stats{};
card_stats.card_index=i;
m_rx_stats_per_card[i]=card_stats;
m_seq_nr_per_card[i]->reset();
}
}

int WBTxRx::get_curr_active_tx_card_idx() {
Expand Down
4 changes: 2 additions & 2 deletions src/WBTxRx.h
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,9 @@ class WBTxRx {
int32_t curr_bits_per_second=-1;
// n received valid session key packets
int n_received_valid_session_key_packets=0;
// mcs index on the most recent okay data packet, if the card supports reporting it
// mcs index on the most recent valid data packet, if the card supports reporting it
int last_received_packet_mcs_index=-1;
// channel width (20Mhz or 40Mhz) on the most recent received okay data packet, if the card supports reporting it
// channel width (20Mhz or 40Mhz) on the most recent received valid data packet, if the card supports reporting it
int last_received_packet_channel_width=-1;
// complicated but important metric in our case - how many "big gaps" we had in the last 1 second
int16_t curr_big_gaps_counter=-1;
Expand Down

0 comments on commit f0079a8

Please sign in to comment.