GNU Radio's CYBERRADIO Package
NDR651_sync_sink_impl.h
Go to the documentation of this file.
1 
2 
3 #ifndef INCLUDED_CYBERRADIO_NDR651_SYNC_SINK_IMPL_H
4 #define INCLUDED_CYBERRADIO_NDR651_SYNC_SINK_IMPL_H
5 
6 //#include <LibCyberRadio/NDR651/SyncTXClient.h>
7 
8 #include <LibCyberRadio/NDR651/SyncTXClient.h>
9 #include <vector>
10 
12 
13 namespace gr {
14 namespace CyberRadio {
15 
16 #define NUM_CH 2
17 #define ETH_PACKET_SIZE 1024
18 
19 /**
20  * This grc block is used to transmit data synchrnously to the NDR651
21  * It takes in 2 complex IQ streams and sends data out via syncTXClient (some
22  * sort of ethernet thing) It sends data out in sizes of ETH_PACKET_SIZE (1024),
23  * so this block was made to be decimating. By being decimating, GNU radio won't
24  * call it untill it has multiples of ETH_PACKET_SIZE
25  */
27 private:
28  // Variables that are shared between channels
29  const char *radioHostname;
30  int num_inputs;
31  int debug;
32  int groupIndex;
33  int channelRate;
34  int tenGbeIndex;
35  // Variables present in both groups
36  double centerFreqMHz[NUM_CH];
37  int txChannel[NUM_CH];
38  double rf_attenuationDB[NUM_CH];
39  const char *eth_index[NUM_CH];
40  long upd_port[NUM_CH];
41  double frequencyOffsetMHz[NUM_CH];
42  double digital_attenuationDB[NUM_CH];
43  float mult[NUM_CH];
44  int ducChannel[NUM_CH];
45 
46  std::vector<LibCyberRadio::NDR651::TXClient *> txClients;
47  LibCyberRadio::NDR651::SyncTXClient *syncTXClient;
48  // These buffers contain the gr_complex data that's been converted into
49  // int16_t IQ data.
50  std::vector<int16_t> iqBuffers[NUM_CH];
51 
52 public:
55 
56  int work(int noutput_items, gr_vector_const_void_star &input_items,
57  gr_vector_void_star &output_items);
58 
59  bool stop();
60 
61  // Callbacks
62  // bool doCallBacks(INPUT_ARGUMENTS_TYPE);
63 
64  void mult_callback(float mult1, float mult2);
65 
66  bool setDUCFreq_callback(double frequencyOffsetMHz1,
67  double frequencyOffsetMHz2);
68  bool setDUCAtten_callback(double digital_attenuationDB1,
69  double digital_attenuationDB2);
70  bool setTxFreq_callback(double centerFreqMHz1, double centerFreqMHz2);
71  bool setTxAtten_callback(double rf_attenuationDB1, double rf_attenuationDB2);
72  bool setDUCParameters(int ducChannel1, int ducChannel2, int channelRate,
73  int txChannel1, int txChannel2);
74  bool setEthernetInterface(unsigned int tenGbeIndex, const char *eth_index1,
75  const char *eth_index2, long upd_port1,
76  long upd_port2);
77 };
78 
79 } // namespace CyberRadio
80 } // namespace gr
81 
82 #endif /* INCLUDED_CYBERRADIO_NDR651_SYNC_SINK_IMPL_H */
Definition: NDR651_sync_sink_impl.h:26
bool setDUCAtten_callback(double digital_attenuationDB1, double digital_attenuationDB2)
bool setTxFreq_callback(double centerFreqMHz1, double centerFreqMHz2)
void mult_callback(float mult1, float mult2)
NDR651_sync_sink_impl(INPUT_ARGUMENTS_TYPE)
bool setTxAtten_callback(double rf_attenuationDB1, double rf_attenuationDB2)
Provides GNU Radio blocks.
Definition: NDR651_duc_sink_mk2.h:21
int work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
#define INPUT_ARGUMENTS_TYPE
Definition: NDR651_sync_sink.h:14
#define NUM_CH
Definition: NDR651_sync_sink_impl.h:16
bool setEthernetInterface(unsigned int tenGbeIndex, const char *eth_index1, const char *eth_index2, long upd_port1, long upd_port2)
bool setDUCParameters(int ducChannel1, int ducChannel2, int channelRate, int txChannel1, int txChannel2)
bool setDUCFreq_callback(double frequencyOffsetMHz1, double frequencyOffsetMHz2)
Definition: NDR651_sync_sink.h:22