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

Method ExternalDeviceManager

OpenHD/ohd_common/src/openhd_external_device.cpp:31–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29#include "openhd_util.h"
30
31openhd::ExternalDeviceManager::ExternalDeviceManager() {
32 // Here one can manually declare any IP addresses openhd should forward video
33 // / telemetry to
34 const auto config = openhd::load_config();
35 for (const auto& ip : config.NW_MANUAL_FORWARDING_IPS) {
36 if (OHDUtil::is_valid_ip(ip)) {
37 m_manual_ips.push_back(ip);
38 } else {
39 openhd::log::get_default()->warn("[{}] is not a valid ip", ip);
40 }
41 }
42 for (const auto& ip : m_manual_ips) {
43 on_new_external_device(ExternalDevice{"manual", ip}, true);
44 }
45}
46
47openhd::ExternalDeviceManager::~ExternalDeviceManager() {
48 for (const auto& ip : m_manual_ips) {

Callers

nothing calls this directly

Calls 1

push_backMethod · 0.80

Tested by

no test coverage detected