USRP Hardware Driver and USRP Manual  Version: 4.4.0.HEAD-0-g5fac246b
UHD and USRP Manual
keep_one_in_n_block_control.hpp
Go to the documentation of this file.
1 //
2 // Copyright 2020 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/ranges.hpp>
12 
13 namespace uhd { namespace rfnoc {
14 
25 {
26 public:
28 
29  enum class mode {SAMPLE_MODE, PACKET_MODE};
30 
31  // Block registers
32  static const uint32_t REG_N_OFFSET;
33  static const uint32_t REG_MODE_OFFSET;
34  static const uint32_t REG_WIDTH_N_OFFSET;
35 
42  virtual size_t get_max_n() const = 0;
43 
51  virtual size_t get_n(const size_t chan = 0) const = 0;
52 
62  virtual void set_n(const size_t n, const size_t chan = 0) = 0;
63 
71  virtual mode get_mode(const size_t chan = 0) const = 0;
72 
83  virtual void set_mode(const mode mode, const size_t chan = 0) = 0;
84 };
85 
86 }} // namespace uhd::rfnoc
config.hpp
uhd::rfnoc::noc_block_base
Definition: noc_block_base.hpp:42
uhd::rfnoc::keep_one_in_n_block_control::mode
mode
Definition: keep_one_in_n_block_control.hpp:29
uhd::rfnoc::keep_one_in_n_block_control
Definition: keep_one_in_n_block_control.hpp:24
UHD_API
#define UHD_API
Definition: config.h:87
uhd
Definition: build_info.hpp:12
ranges.hpp
uhd::rfnoc::keep_one_in_n_block_control::REG_N_OFFSET
static const uint32_t REG_N_OFFSET
Definition: keep_one_in_n_block_control.hpp:32
noc_block_base.hpp
uhd::rfnoc::keep_one_in_n_block_control::REG_MODE_OFFSET
static const uint32_t REG_MODE_OFFSET
Definition: keep_one_in_n_block_control.hpp:33
RFNOC_DECLARE_BLOCK
#define RFNOC_DECLARE_BLOCK(CLASS_NAME)
Definition: noc_block_base.hpp:22
uhd::rfnoc::keep_one_in_n_block_control::REG_WIDTH_N_OFFSET
static const uint32_t REG_WIDTH_N_OFFSET
Definition: keep_one_in_n_block_control.hpp:34