USRP Hardware Driver and USRP Manual  Version: 4.8.0.0
UHD and USRP Manual
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
actions.hpp
Go to the documentation of this file.
1 //
2 // Copyright 2019 Ettus Research, a National Instruments Brand
3 //
4 // SPDX-License-Identifier: GPL-3.0-or-later
5 //
6 
7 #pragma once
8 
9 #include <uhd/config.hpp>
11 #include <uhd/types/metadata.hpp>
12 #include <uhd/types/ranges.hpp>
13 #include <uhd/types/stream_cmd.hpp>
14 #include <uhd/types/time_spec.hpp>
17 #include <boost/optional.hpp>
18 #include <cstddef>
19 #include <cstdint>
20 #include <memory>
21 #include <string>
22 #include <vector>
23 
24 namespace uhd { namespace rfnoc {
25 
34 {
35 public:
36  virtual ~action_info() {}
37 
38  using sptr = std::shared_ptr<action_info>;
40  const size_t id;
42  std::string key;
44  // (de-)serialize it.
45  std::vector<uint8_t> payload;
48 
50  static sptr make(const std::string& key = "",
51  const uhd::device_addr_t& args = uhd::device_addr_t(""));
52 
53 protected:
55  const std::string& key, const uhd::device_addr_t& args = uhd::device_addr_t(""));
56 };
57 
59 {
60 public:
61  using sptr = std::shared_ptr<stream_cmd_action_info>;
62 
64 
66  static sptr make(const uhd::stream_cmd_t::stream_mode_t stream_mode);
67 
68 private:
70 };
71 
73 {
74 public:
75  using sptr = std::shared_ptr<rx_event_action_info>;
76 
79 
81  static sptr make(uhd::rx_metadata_t::error_code_t error_code);
82 
83 protected:
85 };
86 
88 {
89 public:
90  using sptr = std::shared_ptr<tx_event_action_info>;
91 
94 
96  bool has_tsf;
97 
99  uint64_t tsf;
100 
102  static sptr make(uhd::async_metadata_t::event_code_t event_code,
103  const boost::optional<uint64_t>& tsf);
104 
105 protected:
107  const boost::optional<uint64_t>& tsf);
108 };
109 
112 {
113 public:
114  using sptr = std::shared_ptr<tune_request_action_info>;
115 
123  static sptr make(const uhd::tune_request_t tune_request);
124 
125 private:
126  tune_request_action_info(const uhd::tune_request_t tune_request);
127 };
128 
129 }} /* namespace uhd::rfnoc */
uhd::rfnoc::tune_request_action_info::tune_result
uhd::tune_result_t tune_result
Definition: actions.hpp:118
uhd::rfnoc::tx_event_action_info
Definition: actions.hpp:87
device_addr.hpp
time_spec.hpp
config.hpp
uhd::rfnoc::tune_request_action_info::tune_request
uhd::tune_request_t tune_request
Definition: actions.hpp:116
uhd::rfnoc::tune_request_action_info
Action object for graph-based tuning.
Definition: actions.hpp:111
tune_request.hpp
uhd::rfnoc::action_info::payload
std::vector< uint8_t > payload
An arbitrary payload. It is up to consumers and producers to.
Definition: actions.hpp:45
uhd::rfnoc::rx_event_action_info
Definition: actions.hpp:72
uhd::rfnoc::action_info::~action_info
virtual ~action_info()
Definition: actions.hpp:36
uhd::rfnoc::action_info::id
const size_t id
A unique counter for this action.
Definition: actions.hpp:40
uhd::rfnoc::rx_event_action_info::error_code
uhd::rx_metadata_t::error_code_t error_code
The error code that describes the event.
Definition: actions.hpp:78
UHD_API
#define UHD_API
Definition: config.h:87
uhd::rfnoc::tune_request_action_info::time_spec
uhd::time_spec_t time_spec
Definition: actions.hpp:117
uhd::rfnoc::action_info::args
uhd::device_addr_t args
A dictionary of key-value pairs. May be used as desired.
Definition: actions.hpp:47
stream_cmd.hpp
uhd::device_addr_t
Definition: device_addr.hpp:38
uhd::rfnoc::tx_event_action_info::has_tsf
bool has_tsf
Has time specification?
Definition: actions.hpp:96
uhd::rfnoc::action_info::sptr
std::shared_ptr< action_info > sptr
Definition: actions.hpp:38
uhd::rfnoc::tune_request_action_info::overall_freq_range
uhd::freq_range_t overall_freq_range
Definition: actions.hpp:121
uhd
Definition: build_info.hpp:12
uhd::rfnoc::tune_request_action_info::rf_range
uhd::freq_range_t rf_range
Definition: actions.hpp:120
uhd::time_spec_t
Definition: time_spec.hpp:28
ranges.hpp
uhd::rx_metadata_t::error_code_t
error_code_t
Definition: metadata.hpp:113
uhd::stream_cmd_t
Definition: stream_cmd.hpp:39
uhd::tune_request_t
Definition: tune_request.hpp:24
uhd::rfnoc::action_info
Definition: actions.hpp:33
metadata.hpp
uhd::stream_cmd_t::stream_mode_t
stream_mode_t
Definition: stream_cmd.hpp:41
uhd::rfnoc::stream_cmd_action_info
Definition: actions.hpp:58
uhd::rfnoc::action_info::key
std::string key
A string identifier for this action.
Definition: actions.hpp:42
uhd::async_metadata_t::event_code_t
event_code_t
Definition: metadata.hpp:216
uhd::rfnoc::tx_event_action_info::event_code
uhd::async_metadata_t::event_code_t event_code
The event code that describes the event.
Definition: actions.hpp:93
uhd::rfnoc::tx_event_action_info::tsf
uint64_t tsf
When the async event occurred.
Definition: actions.hpp:99
uhd::rfnoc::tune_request_action_info::dsp_range
uhd::freq_range_t dsp_range
Definition: actions.hpp:119
uhd::rfnoc::stream_cmd_action_info::stream_cmd
uhd::stream_cmd_t stream_cmd
Definition: actions.hpp:63
uhd::meta_range_t
Definition: ranges.hpp:65
tune_result.hpp
uhd::tune_result_t
Definition: tune_result.hpp:18