GNU Radio's CYBERRADIO Package
gr::CyberRadio::vita_iq_source Class Referenceabstract

A generic VITA 49-compatible I/Q data source block. More...

#include <vita_iq_source.h>

Inheritance diagram for gr::CyberRadio::vita_iq_source:
gr::CyberRadio::vita_iq_source_impl

Public Types

typedef boost::shared_ptr< vita_iq_sourcesptr
 

Public Member Functions

virtual float get_realtime_sample_rate (int output=0)=0
 Gets the real-time calculated sample rate for a specific output. More...
 

Static Public Member Functions

static sptr make (int vita_type=0, size_t payload_size=8192, size_t vita_header_size=0, size_t vita_tail_size=0, bool byte_swapped=false, bool iq_swapped=false, float iq_scale_factor=1.0, const std::string &host="0.0.0.0", const std::vector< unsigned short > &port_list=std::vector< unsigned short >(), bool debug=false, bool tagged=false)
 Creates a vita_iq_source block. More...
 

Detailed Description

A generic VITA 49-compatible I/Q data source block.

The vita_iq_source block outputs VITA 49 or raw I/Q data coming from an NDR-class radio. The source block listens for incoming I/Q data using UDP and dispatches it to its output port(s) as needed. Dispatching is governed by which UDP port the data comes in on, so each data stream needs to be assigned its own UDP port on the radio side.

This class is designed to be as flexible as possible in dealing with data streams, since each NDR-class radio varies in how it packages data streams.

The vita_iq_source block can also produce stream tags at the beginning of each received VITA 49 frame. The block generates the following stream tags, as appropriate for the radio:

  • absolute_sample_num – The absolute sample number
  • frame_counter – The VITA frame counter
  • frame_size – The VITA frame size
  • packet_type – The VITA packet type
  • packet_counter – The VITA packet counter
  • packet_size – The VITA packet size
  • stream_id – The VITA stream ID
  • timestamp_int_type – The VITA timestamp integer (TSI) field type
  • timestamp_int – The VITA timestamp integer (TSI) field
  • timestamp_frac_type – The VITA timestamp fractional (TSF) field type
  • timestamp_frac – The VITA timestamp fractional (TSF) field
  • organizationally_unique_id – The organizationally unique ID (OUI)
  • information_class_code – The information class code (ICC)
  • packet_class_code – The packet class code (PCC) If the radio is sending raw I/Q data instead of VITA 49 frames, this block will not produce stream tags regardless of the tagged setting.

Member Typedef Documentation

◆ sptr

Member Function Documentation

◆ get_realtime_sample_rate()

virtual float gr::CyberRadio::vita_iq_source::get_realtime_sample_rate ( int  output = 0)
pure virtual

Gets the real-time calculated sample rate for a specific output.

Parameters
outputWhich output to get the sample rate for.
Returns
The sample rate (in samples per second).

Implemented in gr::CyberRadio::vita_iq_source_impl.

◆ make()

static sptr gr::CyberRadio::vita_iq_source::make ( int  vita_type = 0,
size_t  payload_size = 8192,
size_t  vita_header_size = 0,
size_t  vita_tail_size = 0,
bool  byte_swapped = false,
bool  iq_swapped = false,
float  iq_scale_factor = 1.0,
const std::string &  host = "0.0.0.0",
const std::vector< unsigned short > &  port_list = std::vector< unsigned short >(),
bool  debug = false,
bool  tagged = false 
)
static

Creates a vita_iq_source block.

Parameters
vita_typeThe VITA 49 enable option value. The range of valid values depends on the radio, but 0 always disables VITA 49 formatting. In that case, the data format is raw I/Q.
payload_sizeThe VITA 49 or I/Q payload size for the radio, in bytes. If VITA 49 output is disabled, then this parameter provides the total size of all raw I/Q data transmitted in a single packet.
vita_header_sizeThe VITA 49 header size for the radio, in bytes. If VITA 49 output is disabled, then this parameter is ignored.
vita_tail_sizeThe VITA 49 tail size for the radio, in bytes. If VITA 49 output is disabled, then this parameter is ignored.
byte_swappedWhether the bytes in the packet are swapped (with respect to the endianness employed by the host operating system).
iq_swappedWhether I and Q data in the payload are swapped.
iq_scale_factorScale factor for coverting I/Q data from native sample format to complex output.
hostThe IP address or host name to bind listening UDP ports on. Specify this as "0.0.0.0" to listen on all network interfaces.
port_listThe list of UDP port numbers to listen on. This block creates one output for each entry in this list, with each output corresponding to its associated port. This block will have one output for each port number in this list.
debugWhether the block should produce debug output. Defaults to False.
taggedWhether the block should produce stream tags. Defaults to False.
Returns
A boost::shared_ptr<vita_iq_source> representing the new source block.

The documentation for this class was generated from the following file: