GNU Radio's HIQSDRTRX Package
source.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2013 Stefan Goerg stefan@dl2stg.de
4  * Copyright 2021 Karsten Schmidt dg1vs@darc.de
5  *
6  * This is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 3, or (at your option)
9  * any later version.
10  *
11  * This software is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this software; see the file COPYING. If not, write to
18  * the Free Software Foundation, Inc., 51 Franklin Street,
19  * Boston, MA 02110-1301, USA.
20  */
21 
22 #ifndef INCLUDED_HIQSDRTRX_SOURCE_H
23 #define INCLUDED_HIQSDRTRX_SOURCE_H
24 
25 #include <hiqsdrtrx/api.h>
26 #include <gnuradio/sync_block.h>
27 
28 #define RX_CLOCK 122880000LL
29 #define RX_EXT 0x80
30 
31 #define TX_OFF 0
32 #define TX_CW 1
33 #define TX_SSB 2
34 #define USE_EXT_IO 4
35 #define TX_PTT 8
36 
37 #define HIQ_PREAMP 0x10
38 #define HIQ_ANT 0x01
39 
40 #define FILTER_RX 0
41 #define FILTER_TX 1
42 
43 namespace gr {
44  namespace hiqsdrtrx {
45 
46  /*!
47  * \brief <+description of block+>
48  * \ingroup hiqsdrtrx
49  *
50  */
51  class HIQSDRTRX_API source : virtual public gr::sync_block
52  {
53  public:
54  typedef boost::shared_ptr<source> sptr;
55 
56  /*!
57  * \brief Return a shared_ptr to a new instance of hiqsdrtrx::source.
58  *
59  * To avoid accidental use of raw pointers, hiqsdrtrx::source's
60  * constructor is in a private implementation
61  * class. hiqsdrtrx::source::make is the public interface for
62  * creating new instances.
63  */
64  static sptr make(size_t itemsize, const char *host,unsigned short port, unsigned short c_port, unsigned short rx_fir_port, unsigned short tx_fir_port, int payload_size=1472,bool eof=true, bool wait=true, int rxfreq=7000000, int txfreq=7000000, int rate=48000,bool ant=0, int presel=0, int att=0, int txLevel=255, bool ptt=0, int txRate=48000, int clockCorr=0,std::vector<gr_complex> rxFirTaps=std::vector<gr_complex>() , std::vector<gr_complex> txFirTaps=std::vector<gr_complex>(), bool dpd=0);
65  };
66 
67  } // namespace hiqsdrtrx
68 } // namespace gr
69 
70 #endif /* INCLUDED_HIQSDRTRX_SOURCE_H */
71 
#define HIQSDRTRX_API
Definition: api.h:31
<+description of block+>
Definition: source.h:51
boost::shared_ptr< source > sptr
Definition: source.h:54
Definition: sink.h:28