GNU Radio Manual and C++ API Reference  3.7.9.2
The Free & Open Software Radio Ecosystem
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
sig_source_c.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2004,2012 Free Software Foundation, Inc.
4  *
5  * This file is part of GNU Radio
6  *
7  * GNU Radio is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 3, or (at your option)
10  * any later version.
11  *
12  * GNU Radio is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with GNU Radio; see the file COPYING. If not, write to
19  * the Free Software Foundation, Inc., 51 Franklin Street,
20  * Boston, MA 02110-1301, USA.
21  */
22 
23 /* WARNING: this file is machine generated. Edits will be overwritten */
24 
25 #ifndef INCLUDED_ANALOG_SIG_SOURCE_C_H
26 #define INCLUDED_ANALOG_SIG_SOURCE_C_H
27 
28 #include <gnuradio/analog/api.h>
30 #include <gnuradio/sync_block.h>
31 
32 namespace gr {
33  namespace analog {
34 
35  /*!
36  * \brief signal generator with gr_complex output.
37  * \ingroup waveform_generators_blk
38  */
39  class ANALOG_API sig_source_c : virtual public sync_block
40  {
41  public:
42  // gr::analog::sig_source_c::sptr
43  typedef boost::shared_ptr<sig_source_c> sptr;
44 
45  /*!
46  * Build a signal source block.
47  *
48  * \param sampling_freq Sampling rate of signal.
49  * \param waveform wavetform type.
50  * \param wave_freq Frequency of waveform (relative to sampling_freq).
51  * \param ampl Signal amplitude.
52  * \param offset offset of signal.
53  */
54  static sptr make(double sampling_freq,
56  double wave_freq,
57  double ampl, gr_complex offset = 0);
58 
59  virtual double sampling_freq() const = 0;
60  virtual gr::analog::gr_waveform_t waveform() const = 0;
61  virtual double frequency() const = 0;
62  virtual double amplitude() const = 0;
63  virtual gr_complex offset() const = 0;
64 
65  virtual void set_sampling_freq(double sampling_freq) = 0;
66  virtual void set_waveform(gr::analog::gr_waveform_t waveform) = 0;
67  virtual void set_frequency(double frequency) = 0;
68  virtual void set_amplitude(double ampl) = 0;
69  virtual void set_offset(gr_complex offset) = 0;
70  };
71 
72  } /* namespace analog */
73 } /* namespace gr */
74 
75 #endif /* INCLUDED_ANALOG_SIG_SOURCE_C_H */
gr_waveform_t
Types of signal generator waveforms.
Definition: sig_source_waveform.h:33
std::complex< float > gr_complex
Definition: gr_complex.h:27
signal generator with gr_complex output.
Definition: sig_source_c.h:39
boost::shared_ptr< sig_source_c > sptr
Definition: sig_source_c.h:43
Include this header to use the message passing features.
Definition: logger.h:131
synchronous 1:1 input to output with historyOverride work to provide the signal processing implementa...
Definition: sync_block.h:37
#define ANALOG_API
Definition: gr-analog/include/gnuradio/analog/api.h:30