GNU Radio 3.7.1 C++ API
sig_source_i.h
Go to the documentation of this file.
00001 /* -*- c++ -*- */
00002 /*
00003  * Copyright 2004,2012 Free Software Foundation, Inc.
00004  *
00005  * This file is part of GNU Radio
00006  *
00007  * GNU Radio is free software; you can redistribute it and/or modify
00008  * it under the terms of the GNU General Public License as published by
00009  * the Free Software Foundation; either version 3, or (at your option)
00010  * any later version.
00011  *
00012  * GNU Radio is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  * GNU General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU General Public License
00018  * along with GNU Radio; see the file COPYING.  If not, write to
00019  * the Free Software Foundation, Inc., 51 Franklin Street,
00020  * Boston, MA 02110-1301, USA.
00021  */
00022 
00023 /* WARNING: this file is machine generated. Edits will be overwritten */
00024 
00025 #ifndef INCLUDED_ANALOG_SIG_SOURCE_I_H
00026 #define INCLUDED_ANALOG_SIG_SOURCE_I_H
00027 
00028 #include <gnuradio/analog/api.h>
00029 #include <gnuradio/analog/sig_source_waveform.h>
00030 #include <gnuradio/sync_block.h>
00031 
00032 namespace gr {
00033   namespace analog {
00034 
00035     /*!
00036      * \brief signal generator with int output.
00037      * \ingroup waveform_generators_blk
00038      */
00039     class ANALOG_API sig_source_i : virtual public sync_block
00040     {
00041     public:
00042       // gr::analog::sig_source_i::sptr
00043       typedef boost::shared_ptr<sig_source_i> sptr;
00044       
00045       /*!
00046        * Build a signal source block.
00047        *
00048        * \param sampling_freq Sampling rate of signal.
00049        * \param waveform wavetform type.
00050        * \param wave_freq Frequency of waveform (relative to sampling_freq).
00051        * \param ampl Signal amplitude.
00052        * \param offset offset of signal.
00053        */
00054       static sptr make(double sampling_freq,
00055                        gr::analog::gr_waveform_t waveform,
00056                        double wave_freq,
00057                        double ampl, int offset = 0);
00058 
00059       virtual double sampling_freq() const = 0;
00060       virtual gr::analog::gr_waveform_t waveform() const = 0;
00061       virtual double frequency() const = 0;
00062       virtual double amplitude() const = 0;
00063       virtual int offset() const = 0;
00064 
00065       virtual void set_sampling_freq(double sampling_freq) = 0;
00066       virtual void set_waveform(gr::analog::gr_waveform_t waveform) = 0;
00067       virtual void set_frequency(double frequency) = 0;
00068       virtual void set_amplitude(double ampl) = 0;
00069       virtual void set_offset(int offset) = 0;
00070     };
00071 
00072   } /* namespace analog */
00073 } /* namespace gr */
00074 
00075 #endif /* INCLUDED_ANALOG_SIG_SOURCE_I_H */