four_multi
Multi-Antenna,Multi-Node,Multi-Band,Multi-Cell
Public Member Functions | Protected Member Functions | Protected Attributes
file_based Class Reference

This class provides a file-based interface to a multi-node real-world run. All transmitted signals are read from file, all received signals are written to file. The frame structure is defined by an input. The application file_based_example is based on this class. More...

Inheritance diagram for file_based:
four_multi_node

List of all members.

Public Member Functions

 file_based (std::string filename_rx, std::string filename_tx, uint32_t buffer_length, std::vector< frame_settings > tdma_def, uint32_t no_ant1, uint32_t no_ant2, bool use_external_10MHz, bool use_same_antenna, uint32_t skip_ant, std::vector< std::string > IP)
 Constructor.

Protected Member Functions

virtual frame_settings node_init (void)
 Override this function with your implementation. This function has the same function as node_process except that it is called only once and before anything has been transmitted and received. The function is called before synchronizing against the PPS. Here you can place any time consuming initializations you may need.
virtual frame_settings node_process (void)
 Override this function with your implementation. This is the most important function of your implementation. The function returns a "frame_settings" value which defines when then next frame should be transmitted, if it is a transmit or receive buffer. If it is a transmit frame then you should fill the transmitter buffers, d_tx_buffers, with the signal that should be transmitted before exiting node_process. If the previous frame was a receive frame then you should process the samples in d_rx_buffers. The frame_settings of the previous frame is stored in d_old_frame_settings.
virtual void end_of_run (void)
 Override this function with any post processing you may want to do.

Protected Attributes

double d_gain_rx
double d_gain_tx
double d_frequency
std::vector< frame_settingsd_tdma_def
uint32_t d_no_rx_buffer
uint32_t d_no_tx_buffer
uint32_t d_no_rx_buffer_so_far
uint32_t d_no_tx_buffer_so_far
uint32_t d_frame_ix
uint32_t d_no_frames
std::string d_filename_rx
std::string d_filename_tx
std::vector< const void * > d_tx_storage

Detailed Description

This class provides a file-based interface to a multi-node real-world run. All transmitted signals are read from file, all received signals are written to file. The frame structure is defined by an input. The application file_based_example is based on this class.

Definition at line 39 of file file_based_example.cpp.


Constructor & Destructor Documentation

file_based::file_based ( std::string  filename_rx,
std::string  filename_tx,
uint32_t  buffer_length,
std::vector< frame_settings tdma_def,
uint32_t  no_ant1,
uint32_t  no_ant2,
bool  use_external_10MHz,
bool  use_same_antenna,
uint32_t  skip_ant,
std::vector< std::string >  IP 
)

Constructor.

Parameters:
filename_rxThe received data is stored in this file. Format see xxx. \þaram filename_tx All transmitted signals are read from this file. Format see xxx.
buffer_length.The size of buffer (in samples) per USRP. Advice: leave some headroom in the beginning and end.
tdma_def.A vector containing the frame_settings of all frames to be transmitted.
no_ant1Set this parameter to the number of antennas in your system.
no_ant2Set this to zero (this is used in certain calibration schemes).
use_external_10MHzSet to true since we are using external 10MHz.
same_antenna.If XCVR2450 is used, setting this value to true makes the J1 antenna connector be used during TX and RX. Setting it to false makes J1 being used for RX and J2 for TX.
node_ixEach node needs a unique number. Use the range from 0 to number_of_nodes_in_system-1.
skip_antThe USRPs are assumed to have 192.168.10*(1+skip_ant).2, 192.168.10*(2+skip_ant).2,....

Definition at line 118 of file file_based_example.cpp.


The documentation for this class was generated from the following file:
 All Classes Functions Variables