Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

GrUsrpSink.h

Go to the documentation of this file.
00001 /* -*- c++ -*- */
00002 /*
00003  * Copyright 2003 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 2, 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., 59 Temple Place - Suite 330,
00020  * Boston, MA 02111-1307, USA.
00021  */
00022 
00023 #include <GrSink.h>
00024 
00025 class usrp_tx;
00026 
00030 class GrUsrpSink : public GrSink
00031 {
00032  private:
00033   int           d_ninputs;
00034   usrp_tx       *d_usrp;
00035 
00036  public:
00037   GrUsrpSink (int which_board,
00038               unsigned int usrp_tx_config,
00039               unsigned int interp_rate);
00040   ~GrUsrpSink ();
00041 
00045   static GrUsrpSink *make (int which_board,
00046                            unsigned int usrp_tx_config,
00047                            unsigned interp_rate);
00048   
00049   virtual const char *name () { return "GrUsrpSink"; }
00050 
00051   virtual int work3 (VrSampleRange output,
00052                      VrSampleRange inputs[], void *i[]);
00053 
00054   void initialize ();
00055 
00056   bool set_interp_rate (unsigned int rate);
00057   bool set_tx_freq (int channel, double freq);
00058   bool set_ext_clk_div (unsigned int div);
00059 
00060   bool _set_interp_reg (unsigned int regval);   // diagnostics only
00061 
00062   // ACCESSORS
00063 
00064   double  get_oscillator_freq () const;         // freq of master oscillator on board
00065   unsigned int get_interp_rate () const;
00066   double get_tx_freq (int channel) const;
00067   unsigned int get_ext_clk_div () const;
00068 };

Generated on Tue Mar 15 23:55:33 2005 for GNU Radio by  doxygen 1.4.0