blob: 3d6d495750c290d9f01212f18a7900f7e89c435b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
//
// Copyright 2019 Ettus Research, a National Instruments Brand
//
// SPDX-License-Identifier: GPL-3.0-or-later
//
#ifndef INCLUDED_UHDLIB_TRANSPORT_ADAPTER_HPP
#define INCLUDED_UHDLIB_TRANSPORT_ADAPTER_HPP
#include <uhdlib/transport/adapter_info.hpp>
#include <uhdlib/transport/udp_boost_asio_link.hpp>
namespace uhd { namespace transport {
class adapter_ctx : uhd::noncopyable
{
public:
UHD_SINGLETON_FCN(adapter_ctx, get);
~adapter_ctx() = default;
adapter_id_t register_adapter(adapter_info& info);
private:
adapter_ctx() = default;
std::mutex _mutex;
std::unordered_map<std::string, adapter_id_t> _id_map;
};
}} // namespace uhd::transport
#endif /* INCLUDED_UHDLIB_TRANSPORT_ADAPTER_HPP */
|