GNU Radio's CYBERRADIO Package
ndr651_sink_impl.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2017 <+YOU OR YOUR COMPANY+>.
4  *
5  * This is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 3, or (at your option)
8  * any later version.
9  *
10  * This software is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this software; see the file COPYING. If not, write to
17  * the Free Software Foundation, Inc., 51 Franklin Street,
18  * Boston, MA 02110-1301, USA.
19  */
20 
21 #ifndef INCLUDED_CYBERRADIO_NDR651_SINK_IMPL_H
22 #define INCLUDED_CYBERRADIO_NDR651_SINK_IMPL_H
23 
24 #include "LibCyberRadio/NDR651/TXClient.h"
25 #include <CyberRadio/ndr651_sink.h>
26 #include <volk/volk.h>
27 
28 #define SAPMLES_PER_FRAME 1024
29 
30 namespace gr {
31 namespace CyberRadio {
32 
33 class ndr651_sink_impl : public ndr651_sink {
34 private:
35  LibCyberRadio::NDR651::TXClient *txClient;
36  bool d_firstFrame;
37  int16_t *txBuffer;
38  unsigned int d_vlen;
39 
40 public:
41  ndr651_sink_impl(std::string hostname, unsigned int vlen, bool debug);
43 
44  bool start();
45  bool stop();
46 
47  // Where all the action really happens
48  int work(int noutput_items, gr_vector_const_void_star &input_items,
49  gr_vector_void_star &output_items);
50 
51  bool setDUCParameters(unsigned int ducChannel, unsigned int ducRateIndex,
52  unsigned int txChannel);
53  bool setEthernetInterface(unsigned int tenGbeIndex,
54  const std::string &txInterfaceName,
55  unsigned short port);
56  bool setDUCRateIndex(unsigned int ducRateIndex);
57  bool setDUCFreq(double ducFreq);
58  bool setDUCAtten(double ducAtten);
59  bool setTxFreq(double txFreq);
60  bool setTxAtten(double txAttenuation);
61  // bool setTxInversion(bool txInversion) { return true; };
62  bool setTxInversion(bool txInversion);
63  // void disableRF();
64  bool pauseDUC(bool paused = true);
65 
66 protected:
67  void handleMsgFreq(pmt::pmt_t msg);
68 };
69 
70 } // namespace CyberRadio
71 
72 } // namespace gr
73 
74 #endif /* INCLUDED_CYBERRADIO_NDR651_SINK_IMPL_H */
void handleMsgFreq(pmt::pmt_t msg)
bool setTxAtten(double txAttenuation)
bool setDUCAtten(double ducAtten)
bool pauseDUC(bool paused=true)
bool setTxInversion(bool txInversion)
Provides GNU Radio blocks.
Definition: NDR651_duc_sink_mk2.h:21
Definition: ndr651_sink_impl.h:33
bool setDUCFreq(double ducFreq)
int work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
bool setEthernetInterface(unsigned int tenGbeIndex, const std::string &txInterfaceName, unsigned short port)
bool setDUCRateIndex(unsigned int ducRateIndex)
<+description of block+>
Definition: ndr651_sink.h:38
bool setTxFreq(double txFreq)
ndr651_sink_impl(std::string hostname, unsigned int vlen, bool debug)
bool setDUCParameters(unsigned int ducChannel, unsigned int ducRateIndex, unsigned int txChannel)