itpp_sci  1.0.0
it++ based simulation framework for scicoslab, scilab and scipy
sim_rms_x.hpp
1 /*xxx
2 * \brief - SIM::rms_x - complex signal RMS measuring block using moving average MAV fir
3 * \author maki
4 */
5 
6 
7 
8 #ifndef SIM_RMS_X_HPP
9 #define SIM_RMS_X_HPP
10 
11 #include <itpp/itbase.h>
12 #include <complex>
13 
14 #include "sim\_sim_extension.hpp"
15 
16 #include "sim_fir.hpp"
17 
18 
19 using namespace itpp;
20 using namespace std;
21 
22 
23 namespace SIM
24 {
25 
34 class rms_x
35 {
36 private:
37  double y0;
38  int N;
39  SIM::fir fir_mav;
40 
41 public:
43  {
44  y0 = 0.0;
45  };
46 
48  {
49  };
50 
54  void set_size(int n);
55 
59  void set_output(double yout);
60 
64  int get_size(void);
65 
69  double get_output(void);
70 
76  vec process(const bvec &ce, const cvec &x);
77 
78 };
79 
80 
81 }
82 #endif //SIM_rms_x
RMS calculator for complex signals Core function: SIM::rms_x.process() .
Definition: sim_rms_x.hpp:34
FIR filter Core function: SIM::fir.process() .
Definition: sim_fir.hpp:28
SIM layer implements low level simulation models with itpp base classes as operational types...
Definition: sim_amp.hpp:15
~rms_x()
Definition: sim_rms_x.hpp:47
Definition: _sci_assert.cpp:35
rms_x()
Definition: sim_rms_x.hpp:42