USRP Hardware Driver and USRP Manual Version: 4.1.0.3
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
13namespace uhd { namespace rfnoc {
14
23{
24public:
26
27 enum class mode {SAMPLE_MODE, PACKET_MODE};
28
29 // Block registers
30 static const uint32_t REG_N_OFFSET;
31 static const uint32_t REG_MODE_OFFSET;
32 static const uint32_t REG_WIDTH_N_OFFSET;
33
40 virtual size_t get_max_n() const = 0;
41
49 virtual size_t get_n(const size_t chan = 0) const = 0;
50
60 virtual void set_n(const size_t n, const size_t chan = 0) = 0;
61
69 virtual mode get_mode(const size_t chan = 0) const = 0;
70
81 virtual void set_mode(const mode mode, const size_t chan = 0) = 0;
82};
83
84}} // namespace uhd::rfnoc
Definition: keep_one_in_n_block_control.hpp:23
static const uint32_t REG_WIDTH_N_OFFSET
Definition: keep_one_in_n_block_control.hpp:32
virtual size_t get_max_n() const =0
virtual mode get_mode(const size_t chan=0) const =0
static const uint32_t REG_N_OFFSET
Definition: keep_one_in_n_block_control.hpp:30
virtual size_t get_n(const size_t chan=0) const =0
virtual void set_mode(const mode mode, const size_t chan=0)=0
mode
Definition: keep_one_in_n_block_control.hpp:27
static const uint32_t REG_MODE_OFFSET
Definition: keep_one_in_n_block_control.hpp:31
virtual void set_n(const size_t n, const size_t chan=0)=0
Definition: noc_block_base.hpp:42
#define UHD_API
Definition: config.h:70
Definition: build_info.hpp:12
#define RFNOC_DECLARE_BLOCK(CLASS_NAME)
Definition: noc_block_base.hpp:21