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

Creates a VITA 49 and/or I/Q radio data source block for GNU Radio. More...

#include <vita_iq_source_2.h>

Inheritance diagram for gr::CyberRadio::vita_iq_source_2:
gr::CyberRadio::vita_iq_source_2_impl

Public Types

typedef boost::shared_ptr< vita_iq_source_2sptr
 

Public Member Functions

virtual void connect (const std::string &host, int port)=0
 Change the connection to a new destination. More...
 
virtual void disconnect ()=0
 Cut the connection if we have one set up. More...
 
virtual void set_receive_buffer_size (int size)=0
 Change the size of the UDP receive buffer. More...
 
virtual int get_receive_buffer_size ()=0
 Get the size of the UDP receive buffer. More...
 
virtual void set_scale_factor (int scale)=0
 Set the scale factor used when converting from short to float. Default is 32767. More...
 
virtual int get_scale_factor ()=0
 Get the scale factor used when converting from short to float. More...
 

Static Public Member Functions

static sptr make (int vitaType, size_t payloadSize, size_t vitaHeaderSize, size_t vitaTailSize, bool byteSwapped, bool iqSwapped, const std::string &host, int port, bool debug=false, bool tagOutput=false, bool coherent=false)
 Return a shared_ptr to a new instance of G3Tech::vita_iq_source. More...
 

Detailed Description

Creates a VITA 49 and/or I/Q radio data source block for GNU Radio.

The vita_iq_source block is used to collect VITA 49 or raw I/Q data coming from an NDR-class radio. The vita_iq_source block establishes a UDP listening port (details specified by the host and port arguments) and waits for the radio to send packetized data to that address.

The source block then makes raw data available on its output 0 stream without translating it in any way. If coherent mode is off, output 1 data has the VITA information stripped off, with byte swapping, I/Q swapping and tagging optionally available. If coherent mode is on, outputs 1-6 will contain data from each of the six receiver inputs, with byte swapping and I/Q swapping optionally available. Tagging is optionally available on output 1 only.

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.

Member Typedef Documentation

◆ sptr

Member Function Documentation

◆ connect()

virtual void gr::CyberRadio::vita_iq_source_2::connect ( const std::string &  host,
int  port 
)
pure virtual

Change the connection to a new destination.

Parameters
hostThe name or IP address of the receiving host; use NULL or None to break the connection without closing
portDestination port to connect to on receiving host

Calls disconnect() to terminate any current connection first.

Implemented in gr::CyberRadio::vita_iq_source_2_impl.

◆ disconnect()

virtual void gr::CyberRadio::vita_iq_source_2::disconnect ( )
pure virtual

Cut the connection if we have one set up.

Implemented in gr::CyberRadio::vita_iq_source_2_impl.

◆ get_receive_buffer_size()

virtual int gr::CyberRadio::vita_iq_source_2::get_receive_buffer_size ( )
pure virtual

Get the size of the UDP receive buffer.

Returns
size The size in bytes of the UDP receive buffer.

Implemented in gr::CyberRadio::vita_iq_source_2_impl.

◆ get_scale_factor()

virtual int gr::CyberRadio::vita_iq_source_2::get_scale_factor ( )
pure virtual

Get the scale factor used when converting from short to float.

Returns
scale The scale factor.

Implemented in gr::CyberRadio::vita_iq_source_2_impl.

◆ make()

static sptr gr::CyberRadio::vita_iq_source_2::make ( int  vitaType,
size_t  payloadSize,
size_t  vitaHeaderSize,
size_t  vitaTailSize,
bool  byteSwapped,
bool  iqSwapped,
const std::string &  host,
int  port,
bool  debug = false,
bool  tagOutput = false,
bool  coherent = false 
)
static

Return a shared_ptr to a new instance of G3Tech::vita_iq_source.

To avoid accidental use of raw pointers, G3Tech::vita_iq_source constructor is in a private implementation class. G3Tech::vita_iq_source::make is the public interface for creating new instances.

Parameters
vitaTypeThe 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.
payloadSizeThe 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.
vitaHeaderSizeThe VITA 49 header size for the radio, in bytes. If VITA 49 output is disabled, then this parameter is ignored.
vitaTailSizeThe VITA 49 tail size for the radio, in bytes. If VITA 49 output is disabled, then this parameter is ignored.
byteSwappedWhether the bytes in the packet are swapped (with respect to the endianness employed by the host operating system).
iqSwappedWhether I and Q data in the payload should be swapped.
hostThe IP address or host name for the UDP port to listen on.
portThe port number for the UDP port to listen on.
debugWhether the block should produce debug output. Defaults to False.
tagOutputWhether the second output should contain tags from the VITA header. Defaults to False.
coherentIf true, six channels of coherent data are deinterleaved from one UDP stream into six outputs. Default is False. This requires the receiver to be configured in coherent mode. (cmd: 'COH 3').
Returns
A boost::shared_ptr<vita_iq_source> representing the new source block.

◆ set_receive_buffer_size()

virtual void gr::CyberRadio::vita_iq_source_2::set_receive_buffer_size ( int  size)
pure virtual

Change the size of the UDP receive buffer.

Parameters
sizeThe size in bytes of the UDP receive buffer.

Implemented in gr::CyberRadio::vita_iq_source_2_impl.

◆ set_scale_factor()

virtual void gr::CyberRadio::vita_iq_source_2::set_scale_factor ( int  scale)
pure virtual

Set the scale factor used when converting from short to float. Default is 32767.

Parameters
scaleThe scale factor Default is 32767.

Implemented in gr::CyberRadio::vita_iq_source_2_impl.


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