| 65 | } |
| 66 | |
| 67 | ManagementAir::ManagementAir(std::shared_ptr<WBTxRx> wb_tx_rx, |
| 68 | int initial_freq_mhz, int inital_channel_width_mhz) |
| 69 | : m_wb_txrx(std::move(wb_tx_rx)), |
| 70 | m_curr_frequency_mhz(initial_freq_mhz), |
| 71 | m_curr_channel_width_mhz(inital_channel_width_mhz), |
| 72 | m_last_change_timestamp_ms{openhd::util::steady_clock_time_epoch_ms()} { |
| 73 | m_console = openhd::log::create_or_get("wb_mngmt_air"); |
| 74 | auto cb_packet = [this](uint64_t nonce, int wlan_index, const uint8_t *data, |
| 75 | const int data_len) { |
| 76 | this->on_new_management_packet(data, data_len); |
| 77 | }; |
| 78 | auto mgmt_handler = std::make_shared<WBTxRx::StreamRxHandler>( |
| 79 | openhd::MANAGEMENT_RADIO_PORT_GND_TX, cb_packet, nullptr); |
| 80 | m_wb_txrx->rx_register_stream_handler(mgmt_handler); |
| 81 | } |
| 82 | |
| 83 | int ManagementAir::get_last_received_packet_ts_ms() { |
| 84 | return m_last_received_packet_timestamp_ms; |
nothing calls this directly
no test coverage detected