![]() |
four_multi
Multi-Antenna,Multi-Node,Multi-Band,Multi-Cell
|
This is a channel model where the receive data is simply taken from a file of received samples. This enables playback of measurements obtained using live runs (see save_raw_input_on_file of four_multi_node) into the simulator (and thus debugging). More...
#include <simulator.hpp>
Public Member Functions | |
from_file (std::string directory_name="/usr/local/meas_data/") | |
virtual void | sub_channel (uint32_t from_node_ix, uint32_t to_node_ix, uint32_t from_antenna_ix, uint32_t to_antenna_ix, double freq_tx, double freq_rx, double time, double gain_tx, double gain_rx, std::complex< short int > const *signal_in, std::complex< short int > *signal_out, uint32_t number_of_samples) |
virtual void | add_noise (double gain_rx, std::complex< short int > *signal, uint32_t number_of_samples) |
Public Attributes | |
std::string | raw_data_dir |
itpp::mat | old_time [max_num_nodes][max_num_nodes] |
itpp::imat | frame_ix [max_num_nodes][max_num_nodes] |
Static Public Attributes | |
static const int unsigned | max_num_nodes = 10 |
static const int unsigned | max_num_ant = 20 |
This is a channel model where the receive data is simply taken from a file of received samples. This enables playback of measurements obtained using live runs (see save_raw_input_on_file of four_multi_node) into the simulator (and thus debugging).
Definition at line 77 of file simulator.hpp.
from_file::from_file | ( | std::string | directory_name = "/usr/local/meas_data/" | ) |
The data is read from the directory directory_name.
The file name is given by frame_node=x_frame=y.dat, where x is the node index and y is the frame number. The directory name can also be used to include a prefix to the filename e.g. directory_name="/home/arnold/sunday_". The files will then be named e.g. /home/arnold/sunday_frame_node=x_frame=y.dat and so on. How to read this data from the files into matlab is described in the document xxx.
Definition at line 440 of file simulator.cpp.
virtual void from_file::add_noise | ( | double | gain_rx, |
std::complex< short int > * | signal, | ||
uint32_t | number_of_samples | ||
) | [inline, virtual] |
The noise model.
gain_rx | Gain of the receiver chain. |
signal | Pointer to noise-free received signal. |
number_of_samples | Buffer size |
Implements channel_model.
Definition at line 98 of file simulator.hpp.
void from_file::sub_channel | ( | uint32_t | from_node_ix, |
uint32_t | to_node_ix, | ||
uint32_t | from_antenna_ix, | ||
uint32_t | to_antenna_ix, | ||
double | freq_tx, | ||
double | freq_rx, | ||
double | time, | ||
double | gain_tx, | ||
double | gain_rx, | ||
std::complex< short int > const * | signal_in, | ||
std::complex< short int > * | signal_out, | ||
uint32_t | number_of_samples | ||
) | [virtual] |
Transfer function between two antennas in the system.
from_node_ix | Transmitter node index. |
to_node_ix | Receiver node index. |
from_antenna_ix | Transmitter antenna index. |
to_antenna_ix | Receiver antenna index. |
freq_tx | Frequency of transmitter (Hz). |
freq_rx | Frequency of receiver (Hz). |
time | Time in seconds. |
gain_tx | Gain setting of transmitter chain. |
gain_rx | Gain setting of receiver chain, |
signal_in | Pointer to buffer of transmitter samples. |
signal_out | Pointer to buffer of receiver samples. |
number_of_samples | Buffer size. |
Implements channel_model.
Definition at line 459 of file simulator.cpp.