14 namespace uhd {
namespace rfnoc {
50 virtual void set_enable(
const bool enable,
const size_t port) = 0;
60 virtual bool get_enable(
const size_t port)
const = 0;
70 virtual void set_waveform(
const siggen_waveform type,
const size_t port) = 0;
99 virtual void set_amplitude(
const double amplitude,
const size_t port) = 0;
111 virtual double get_amplitude(
const size_t port)
const = 0;
126 virtual void set_constant(
const std::complex<double> constant,
const size_t port) = 0;
137 virtual std::complex<double> get_constant(
const size_t port)
const = 0;
148 virtual void set_sine_phase_increment(
const double phase_inc,
const size_t port) = 0;
159 virtual double get_sine_phase_increment(
const size_t port)
const = 0;
170 virtual void set_samples_per_packet(
const size_t spp,
const size_t port) = 0;
180 virtual size_t get_samples_per_packet(
const size_t port)
const = 0;
193 const double frequency,
const double sample_rate,
const size_t port)
195 if (sample_rate <= 0.0) {
198 const double phase_inc = (frequency / sample_rate) * 2.0 * uhd::math::PI;
199 if (phase_inc < -uhd::math::PI || phase_inc > uhd::math::PI) {
202 set_sine_phase_increment(phase_inc, port);
siggen_waveform
Definition: siggen_block_control.hpp:16
static const uint32_t REG_PHASE_INC_OFFSET
Definition: siggen_block_control.hpp:39
static const uint32_t REG_SPP_OFFSET
Definition: siggen_block_control.hpp:35
Definition: exception.hpp:107
#define RFNOC_DECLARE_BLOCK(CLASS_NAME)
Definition: noc_block_base.hpp:22
static const uint32_t REG_ENABLE_OFFSET
Definition: siggen_block_control.hpp:34
Definition: build_info.hpp:12
void set_sine_frequency(const double frequency, const double sample_rate, const size_t port)
Definition: siggen_block_control.hpp:192
Definition: noc_block_base.hpp:42
static const uint32_t REG_GAIN_OFFSET
Definition: siggen_block_control.hpp:37
#define UHD_API
Definition: config.h:87
static const uint32_t REG_CONSTANT_OFFSET
Definition: siggen_block_control.hpp:38
static const uint32_t REG_CARTESIAN_OFFSET
Definition: siggen_block_control.hpp:40
Definition: siggen_block_control.hpp:28
static const uint32_t REG_BLOCK_SIZE
Definition: siggen_block_control.hpp:33
static const uint32_t REG_WAVEFORM_OFFSET
Definition: siggen_block_control.hpp:36