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

Generic VITA 49-compatible I/Q data source block that pulls its source data from a sequence of files. More...

#include <vita_multifile_iq_source.h>

Inheritance diagram for gr::CyberRadio::vita_multifile_iq_source:
gr::CyberRadio::vita_multifile_iq_source_impl

Public Types

typedef boost::shared_ptr< vita_multifile_iq_sourcesptr
 

Public Member Functions

virtual void open (const std::vector< std::string > &filespecs=std::vector< std::string >(), bool alphabetical=false, bool repeat=false, bool terminate_at_end=false)=0
 Opens a new sequence of files. More...
 
virtual void close ()=0
 Close the existing file sequence. More...
 
virtual void set_iq_scale_factor (float iq_scale_factor)=0
 Sets the I/Q scale factor. More...
 
virtual float get_realtime_sample_rate ()=0
 Gets the real-time calculated sample rate for a specific output. More...
 

Static Public Member Functions

static sptr make (const std::vector< std::string > &filespecs=std::vector< std::string >(), bool alphabetical=false, 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, bool repeat=false, bool terminate_at_end=false, bool tagged=false, bool debug=false)
 Creates a vita_multifile_iq_source block. More...
 

Detailed Description

Generic VITA 49-compatible I/Q data source block that pulls its source data from a sequence of files.

The vita_multifile_iq_source block provides I/Q data from a sequence of files on disk. The sequence of files can be explicitly provided by the user, determined by evaluating a wildcard file specification, or some combination of these.

The behavior of this block when it has no active files to read data from depends on the Terminate When Data Ends option. If this option is True, then the flowgraph will terminate. If it is not set, then it will output (complex) zeros until it does have valid data files.

This block assumes that the data being read from disk is in a format returned by an NDR-class radio. This will be either raw I/Q data (16-bit interleaved I and Q) or VITA 49 frame format. The output from this block is native (32-bit) complex.

The vita_multifile_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
  • absolute_packet_num – The absolute packet number
  • filename – The file name that the data comes from. If the packet spans files, the file name will be the file that the last segment of the packet data came from.
  • 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)

In addition, this block provides some features that are useful in a GUI environment, where the file(s) that the user wants to use is (are) not necessarily known when the flowgraph starts. (This is a drawback of the stock file_source object in GNU Radio.)

Member Typedef Documentation

◆ sptr

Member Function Documentation

◆ close()

virtual void gr::CyberRadio::vita_multifile_iq_source::close ( )
pure virtual

Close the existing file sequence.

Calling this method causes this block to provide zero values until provided with a file sequence than can be opened.

Implemented in gr::CyberRadio::vita_multifile_iq_source_impl.

◆ get_realtime_sample_rate()

virtual float gr::CyberRadio::vita_multifile_iq_source::get_realtime_sample_rate ( )
pure virtual

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

Returns
The sample rate (in samples per second).

Implemented in gr::CyberRadio::vita_multifile_iq_source_impl.

◆ make()

static sptr gr::CyberRadio::vita_multifile_iq_source::make ( const std::vector< std::string > &  filespecs = std::vector< std::string >(),
bool  alphabetical = false,
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,
bool  repeat = false,
bool  terminate_at_end = false,
bool  tagged = false,
bool  debug = false 
)
static

Creates a vita_multifile_iq_source block.

Parameters
filespecsA list of filenames and/or wildcard file specifications for the data files to use.
alphabeticalWhether the block should alphabetically sort file names during file spec evaluation.
vita_typeThe VITA 49 enable option value. A value of 0 indicates raw I/Q format, and any other value indicates VITA 49 frame format.
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.
repeatTrue if the data should be repeated from the beginning once the last item is processed, False otherwise.
terminate_at_endTrue if the flowgraph should terminate when the all of the file data has been processed. This option has no effect if Repeat is True.
taggedWhether the block should produce stream tags. Defaults to False.
debugWhether the block produces debug output.
Returns
A boost::shared_ptr<vita_multifile_iq_source> representing the new block.

◆ open()

virtual void gr::CyberRadio::vita_multifile_iq_source::open ( const std::vector< std::string > &  filespecs = std::vector< std::string >(),
bool  alphabetical = false,
bool  repeat = false,
bool  terminate_at_end = false 
)
pure virtual

Opens a new sequence of files.

Calling this method while this block is already reading data closes the file being used and abandons the previous file sequence.

Parameters
filespecsA list of filenames and/or wildcard file specifications for the data files to use.
alphabeticalWhether the block should alphabetically sort file names during file spec evaluation.
repeatTrue if the data should be repeated from the beginning once the last item is processed, False otherwise.
terminate_at_endTrue if the flowgraph should terminate when the all of the file data has been processed. This option has no effect if Repeat is True.

Implemented in gr::CyberRadio::vita_multifile_iq_source_impl.

◆ set_iq_scale_factor()

virtual void gr::CyberRadio::vita_multifile_iq_source::set_iq_scale_factor ( float  iq_scale_factor)
pure virtual

Sets the I/Q scale factor.

Parameters
iq_scale_factorThe new I/Q scale factor.

Implemented in gr::CyberRadio::vita_multifile_iq_source_impl.


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