GNU Radio 3.3.0 C++ API
|
00001 /* -*- c++ -*- */ 00002 /* 00003 * Copyright 2008 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 along 00018 * with this program; if not, write to the Free Software Foundation, Inc., 00019 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 00020 */ 00021 #ifndef INCLUDED_MSDD_SOURCE_SIMPLE_H 00022 #define INCLUDED_MSDD_SOURCE_SIMPLE_H 00023 00024 #include <gr_sync_block.h> 00025 #include <msdd6000.h> 00026 #include <boost/scoped_ptr.hpp> 00027 00028 #define MSDD_COMPLEX_SAMPLES_PER_PACKET 366 00029 00030 class msdd_source_simple; 00031 typedef boost::shared_ptr<msdd_source_simple> msdd_source_simple_sptr; 00032 00033 00034 // public shared_ptr constructor 00035 00036 msdd_source_simple_sptr msdd_make_source_simple(const char *src, unsigned short port_src); 00037 00038 00039 class msdd_source_simple : public gr_sync_block { 00040 private: 00041 friend msdd_source_simple_sptr 00042 msdd_make_source_simple(const char *src, unsigned short port_src); 00043 00044 boost::scoped_ptr<MSDD6000> rcv; 00045 int d_lastseq; 00046 bool d_firstrun; 00047 00048 protected: 00049 msdd_source_simple(const char *src, unsigned short port_src); 00050 00051 public: 00052 ~msdd_source_simple(); 00053 bool stop(); 00054 bool start(); 00055 00056 bool set_decim_rate(unsigned int); 00057 bool set_rx_freq(int,double); 00058 bool set_pga(int,double); 00059 00060 int work(int, gr_vector_const_void_star&, gr_vector_void_star&); 00061 00062 long adc_freq(); 00063 int decim_rate(); 00064 std::vector<int> gain_range(); 00065 std::vector<float> freq_range(); 00066 }; 00067 00068 #endif /* INCLUDED_MSDD_SOURCE_C_H */