itpp_sci  1.0.0
it++ based simulation framework for scicoslab, scilab and scipy
sim_cofdm_map.hpp
1 
6 #ifndef COFDM_MAP_HPP
7 #define COFDM_MAP_HPP
8 
9 #include <itpp/itbase.h>
10 #include <itpp/itcomm.h>
11 
12 #include <complex>
13 
14 #include "sim_qam_mod.hpp"
15 
16 using namespace itpp;
17 using namespace std;
18 
19 namespace SIM
20 {
21 
29 class cofdm_map
30 {
31 private:
32  int NFFT;
33  double PA;
34 
35  qam_mod qammod;
36  ivec data_carriers;
37  ivec pilots_carriers;
38  ivec zero_carriers;
39 
40 public:
41  cvec y0;
42 
44  {
45  NFFT = 256;
46  PA = 0.5;
47  qammod.set_size(4);
48  y0.set_size(NFFT);
49  data_carriers = to_ivec(itpp::linspace(0, NFFT - 1, NFFT));
50  pilots_carriers.set_size(0);
51  zero_carriers.set_size(0);
52  };
53 
55  {
56  };
57 
61  void set_NFFT(int n);
62 
66  void set_qam_size(int m);
67 
71  void set_PA(double pa);
72 
76  void set_data_carriers(ivec dc_indx);
77 
81  void set_pilots_carriers(ivec pc_indx);
82 
86  void set_zero_carriers(ivec zc_indx);
87 
91  void set_data(ivec x);
92 
97  void set_pilots(bvec x);
98 
102  cvec get_carriers();
103 
109  cmat process(const bvec &ce, const imat &x);
110 
111 };
112 
113 
114 }
115 #endif //SIM_cofdm_mod
QAM modulator Core function: SIM::qam_mod.process() .
Definition: sim_qam_mod.hpp:28
~cofdm_map()
Definition: sim_cofdm_map.hpp:54
cofdm_map()
Definition: sim_cofdm_map.hpp:43
void set_size(int m)
Definition: sim_qam_mod.cpp:15
SIM layer implements low level simulation models with itpp base classes as operational types...
Definition: sim_amp.hpp:15
cvec y0
y0[i] - QAM[i,q] PILOTS[i,q] for carriers and pilots
Definition: sim_cofdm_map.hpp:41
mapper of QAM and BPSK symbol codes into COFDM carriers [I,Q] Core immediate functions: SIM::cofdm_...
Definition: sim_cofdm_map.hpp:29
Definition: _sci_assert.cpp:35