| USRP Hardware Driver and USRP Manual Version: 4.9.0.makepkg-0-g9ec1f582 UHD and USRP Manual |

Loading...
Searching...
No Matches
expert_container.hpp
Go to the documentation of this file.
1//
2// Copyright 2016 Ettus Research
3// Copyright 2018 Ettus Research, a National Instruments Company
4//
5// SPDX-License-Identifier: GPL-3.0-or-later
6//
7
8#pragma once
9
10#include <uhd/config.hpp>
11#include <uhd/experts/expert_nodes.hpp>
12#include <uhd/utils/noncopyable.hpp>
13#include <memory>
14#include <mutex>
15
16 namespace uhd { namespace experts {
17
18 enum auto_resolve_mode_t {
19 AUTO_RESOLVE_OFF,
20 AUTO_RESOLVE_ON_READ,
21 AUTO_RESOLVE_ON_WRITE,
22 AUTO_RESOLVE_ON_READ_WRITE
23};
24
25 class UHD_API expert_container : private uhd::noncopyable, public node_retriever_t
26{
27 public: // Methods
28 typedef std::shared_ptr<expert_container> sptr;
29
30 ~expert_container() override{};
31
35 virtual const std::string& get_name() const = 0;
36
51 virtual void resolve_all(bool force = false) = 0;
52
69 virtual void resolve_from(const std::string& node_name) = 0;
70
87 virtual void resolve_to(const std::string& node_name) = 0;
88
92 virtual const node_retriever_t& node_retriever() const = 0;
93
101 virtual std::string to_dot() const = 0;
102
110 virtual void debug_audit() const = 0;
111
112 private:
124 const dag_vertex_t& lookup(const std::string& name) const override = 0;
125 dag_vertex_t& retrieve(const std::string& name) const override = 0;
126
138 friend class expert_factory;
139
146 static sptr make(const std::string& name);
147
156 virtual std::recursive_mutex& resolve_mutex() = 0;
157
168 virtual void add_data_node(
169 dag_vertex_t* data_node, auto_resolve_mode_t resolve_mode = AUTO_RESOLVE_OFF) = 0;
170
180 virtual void add_worker(worker_node_t* worker) = 0;
181
190 virtual void clear() = 0;
191};
192
193}} // namespace uhd::experts
uhd::experts::dag_vertex_t
Definition expert_nodes.hpp:40
uhd::experts::expert_container
Definition expert_container.hpp:26
uhd::experts::expert_container::debug_audit
virtual void debug_audit() const =0
uhd::experts::expert_container::resolve_from
virtual void resolve_from(const std::string &node_name)=0
uhd::experts::expert_container::resolve_all
virtual void resolve_all(bool force=false)=0
uhd::experts::expert_container::get_name
virtual const std::string & get_name() const =0
uhd::experts::expert_container::to_dot
virtual std::string to_dot() const =0
uhd::experts::expert_container::resolve_to
virtual void resolve_to(const std::string &node_name)=0
uhd::experts::expert_container::node_retriever
virtual const node_retriever_t & node_retriever() const =0
uhd::experts::expert_container::sptr
std::shared_ptr< expert_container > sptr
Definition expert_container.hpp:28
uhd::experts::expert_container::~expert_container
~expert_container() override
Definition expert_container.hpp:30
uhd::experts::expert_container::expert_factory
friend class expert_factory
Definition expert_container.hpp:138
uhd::experts::node_retriever_t
Definition expert_nodes.hpp:286
uhd::experts::worker_node_t
Definition expert_nodes.hpp:482
UHD_API
#define UHD_API
Definition config.h:87
config.hpp
expert_nodes.hpp
uhd::experts
Definition expert_container.hpp:16
uhd::experts::auto_resolve_mode_t
auto_resolve_mode_t
Definition expert_container.hpp:18
uhd::experts::AUTO_RESOLVE_ON_WRITE
@ AUTO_RESOLVE_ON_WRITE
Definition expert_container.hpp:21
uhd::experts::AUTO_RESOLVE_ON_READ
@ AUTO_RESOLVE_ON_READ
Definition expert_container.hpp:20
uhd::experts::AUTO_RESOLVE_OFF
@ AUTO_RESOLVE_OFF
Definition expert_container.hpp:19
uhd::experts::AUTO_RESOLVE_ON_READ_WRITE
@ AUTO_RESOLVE_ON_READ_WRITE
Definition expert_container.hpp:22
uhd
Definition build_info.hpp:12
uhd::noncopyable
boost::noncopyable noncopyable
Definition noncopyable.hpp:45
noncopyable.hpp