GNU Radio 3.6.5 C++ API

cpfsk_bc_impl.h

Go to the documentation of this file.
00001 /* -*- c++ -*- */
00002 /*
00003  * Copyright 2008,2012 Free Software Foundation, Inc.
00004  *
00005  * GNU Radio is free software; you can redistribute it and/or modify
00006  * it under the terms of the GNU General Public License as published by
00007  * the Free Software Foundation; either version 3, or (at your option)
00008  * any later version.
00009  *
00010  * GNU Radio is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU General Public License
00016  * along with GNU Radio; see the file COPYING.  If not, write to
00017  * the Free Software Foundation, Inc., 51 Franklin Street,
00018  * Boston, MA 02110-1301, USA.
00019  */
00020 
00021 #ifndef INCLUDED_ANALOG_CPFSK_BC_IMPL_H
00022 #define INCLUDED_ANALOG_CPFSK_BC_IMPL_H
00023 
00024 #include <analog/cpfsk_bc.h>
00025 
00026 namespace gr {
00027   namespace analog {
00028     
00029     class cpfsk_bc_impl : public cpfsk_bc
00030     {
00031     private:
00032       int   d_samples_per_sym;  // Samples per symbol, square pulse
00033       float d_freq;             // Modulation index*pi/samples_per_sym
00034       float d_ampl;             // Output amplitude
00035       float d_phase;            // Current phase
00036 
00037     public:
00038       cpfsk_bc_impl(float k, float ampl, int samples_per_sym);
00039       ~cpfsk_bc_impl();
00040 
00041       void set_amplitude(float amplitude) { d_ampl = amplitude; }
00042       float amplitude() { return d_ampl; }
00043       float freq() { return d_freq; }
00044       float phase() { return d_phase; }
00045 
00046       int work(int noutput_items,
00047                gr_vector_const_void_star &input_items,
00048                gr_vector_void_star &output_items);
00049     };
00050 
00051   } /* namespace analog */
00052 } /* namespace gr */
00053 
00054 #endif /* INCLUDED_ANALOG_CPFSK_BC_IMPL_H */