GNU Radio's OWC Package
VPPM_Modulator_one_impl.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /* gr-owc OOT module for optical wireless communications.
3  *
4  * Copyright 2021 Arsalan Ahmed from The Ubiquitous Communications and Networking (UCAN) Lab, University of Massachusetts, Boston.
5  *
6  * This is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 3, or (at your option)
9  * any later version.
10  *
11  * This software is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this software; see the file COPYING. If not, write to
18  * the Free Software Foundation, Inc., 51 Franklin Street,
19  * Boston, MA 02110-1301, USA.
20  *
21  */
22 
23 #ifndef INCLUDED_OWC_VPPM_MODULATOR_ONE_IMPL_H
24 #define INCLUDED_OWC_VPPM_MODULATOR_ONE_IMPL_H
25 
26 #include <owc/VPPM_Modulator_one.h>
27 
28 namespace gr {
29  namespace owc {
30 
32  {
33  private:
34  float d_max_magnitude;
35  float d_min_magnitude;
36  int d_samples_per_symbol;
37  int d_samples_per_pulse;
38 
39  public:
42 
43  void set_max_magnitude(float max_magnitude) { d_max_magnitude = max_magnitude; }
44  float max_magnitude() { return d_max_magnitude; }
45 
46  void set_min_magnitude(float min_magnitude) { d_min_magnitude = min_magnitude; }
47  float min_magnitude() { return d_min_magnitude; }
48 
49  void set_samples_per_symbol(int samples_per_symbol) { d_samples_per_symbol = samples_per_symbol; }
50  int samples_per_symbol() { return d_samples_per_symbol; }
51 
52  void set_samples_per_pulse(int samples_per_pulse) { d_samples_per_pulse = samples_per_pulse; }
53  int samples_per_pulse() { return d_samples_per_pulse; }
54 
55  // Where all the action really happens
56  int work(
57  int noutput_items,
58  gr_vector_const_void_star &input_items,
59  gr_vector_void_star &output_items
60  );
61  };
62 
63  } // namespace owc
64 } // namespace gr
65 
66 #endif /* INCLUDED_OWC_VPPM_MODULATOR_ONE_IMPL_H */
67 
int work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
Definition: VPPM_Modulator_one_impl.h:31
int samples_per_symbol()
Definition: VPPM_Modulator_one_impl.h:50
float min_magnitude()
Definition: VPPM_Modulator_one_impl.h:47
int samples_per_pulse()
Definition: VPPM_Modulator_one_impl.h:53
void set_max_magnitude(float max_magnitude)
Definition: VPPM_Modulator_one_impl.h:43
<+description of block+>
Definition: VPPM_Modulator_one.h:37
float max_magnitude()
Definition: VPPM_Modulator_one_impl.h:44
Definition: binary_to_decimal_mapper.h:29
VPPM_Modulator_one_impl(float max_magnitude, float min_magnitude, int samples_per_symbol, int samples_per_pulse)
void set_samples_per_pulse(int samples_per_pulse)
Definition: VPPM_Modulator_one_impl.h:52
void set_min_magnitude(float min_magnitude)
Definition: VPPM_Modulator_one_impl.h:46
void set_samples_per_symbol(int samples_per_symbol)
Definition: VPPM_Modulator_one_impl.h:49