GNU Radio's CYBERRADIO Package
vita_iq_source_mk3_impl.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /***************************************************************************
3  * \file vita_iq_source_mk3_impl.h
4  *
5  * \brief Implementation of a generic VITA 49-compatible I/Q data source
6  * block (Mk3).
7  *
8  * \author DA
9  * \copyright 2015 CyberRadio Solutions, Inc.
10  */
11 
12 #ifndef INCLUDED_CYBERRADIO_VITA_IQ_SOURCE_MK3_IMPL_H
13 #define INCLUDED_CYBERRADIO_VITA_IQ_SOURCE_MK3_IMPL_H
14 
16 #include "LibCyberRadio/Common/Debuggable.h"
17 #include "LibCyberRadio/Common/Vita49Packet.h"
18 #include "LibCyberRadio/Common/VitaIqSource.h"
19 #include <string>
20 #include <vector>
21 
22 namespace gr {
23 namespace CyberRadio {
24 
26  public LibCyberRadio::Debuggable {
27 public:
28  vita_iq_source_mk3_impl(int vita_type, size_t payload_size,
29  size_t vita_header_size, size_t vita_tail_size,
30  bool byte_swapped, bool iq_swapped,
31  float iq_scale_factor, const std::string &host,
32  unsigned short port, bool ddc_coherent,
33  int num_outputs, bool tagged, bool debug);
35  // Where all the action really happens
36  int work(int noutput_items, gr_vector_const_void_star &input_items,
37  gr_vector_void_star &output_items);
38  float get_realtime_sample_rate(int output);
39 
40 protected:
41  // Generate tags for an output stream from a Vita 49
42  // packet
43  void generate_vita_tags(int output, const LibCyberRadio::Vita49Packet &vp);
44 
45 private:
46  LibCyberRadio::VitaIqSource *d_source;
47  size_t d_packet_size;
48  float d_iq_scale_factor;
49  bool d_ddc_coherent;
50  int d_num_outputs;
51  int d_vita_packet_vec_size;
52  bool d_tagged;
53  int d_samples_per_packet;
54  int d_samples_per_output;
55  std::vector<float> d_realtime_sample_rates;
56  std::vector<long> d_realtime_sample_counts;
57  time_t d_realtime_last_time;
58  LibCyberRadio::Vita49PacketVector d_vita_packets;
59 };
60 
61 } // namespace CyberRadio
62 
63 } // namespace gr
64 
65 #endif /* INCLUDED_CYBERRADIO_VITA_IQ_SOURCE_MK3_IMPL_H */
void generate_vita_tags(int output, const LibCyberRadio::Vita49Packet &vp)
vita_iq_source_mk3_impl(int vita_type, size_t payload_size, size_t vita_header_size, size_t vita_tail_size, bool byte_swapped, bool iq_swapped, float iq_scale_factor, const std::string &host, unsigned short port, bool ddc_coherent, int num_outputs, bool tagged, bool debug)
float get_realtime_sample_rate(int output)
Gets the real-time calculated sample rate for a specific output.
A generic VITA 49-compatible I/Q data source block (Mk3).
Definition: vita_iq_source_mk3.h:74
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)
Definition: vita_iq_source_mk3_impl.h:25
LibCyberRadio::Vita49Packet Vita49Packet
Definition: vita_iq_source_2_impl.h:26