MCPcopy Create free account
hub / github.com/OpenHD/OpenHD / WBEndpoint

Method WBEndpoint

OpenHD/ohd_telemetry/src/endpoints/WBEndpoint.cpp:30–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28#include "openhd_spdlog_include.h"
29
30WBEndpoint::WBEndpoint(std::shared_ptr<OHDLink> link, std::string TAG)
31 : MEndpoint(std::move(TAG)), m_link_handle(std::move(link)) {
32 // assert(m_tx_rx_handle);
33 if (!m_link_handle) {
34 openhd::log::get_default()->warn(
35 "WBEndpoint-tx rx handle is missing (no telemetry connection between "
36 "air and ground)");
37 } else {
38 auto cb = [this](std::shared_ptr<std::vector<uint8_t>> data) {
39 MEndpoint::parseNewData(data->data(), data->size());
40 };
41 m_link_handle->register_on_receive_telemetry_data_cb(cb);
42 }
43}
44
45WBEndpoint::~WBEndpoint() {
46 if (m_link_handle) {

Callers

nothing calls this directly

Calls 2

sizeMethod · 0.80

Tested by

no test coverage detected