GNU Radio's OWC Package
OOK_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_OOK_MODULATOR_ONE_IMPL_H
24 #define INCLUDED_OWC_OOK_MODULATOR_ONE_IMPL_H
25 
26 #include <owc/OOK_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 
38  public:
41 
42  void set_max_magnitude(float max_magnitude) { d_max_magnitude = max_magnitude; }
43  float max_magnitude() { return d_max_magnitude; }
44 
45  void set_min_magnitude(float min_magnitude) { d_min_magnitude = min_magnitude; }
46  float min_magnitude() { return d_min_magnitude; }
47 
48  void set_samples_per_symbol(int samples_per_symbol) { d_samples_per_symbol = samples_per_symbol; }
49  int samples_per_symbol() { return d_samples_per_symbol; }
50 
51  // Where all the action really happens
52  int work(
53  int noutput_items,
54  gr_vector_const_void_star &input_items,
55  gr_vector_void_star &output_items
56  );
57  };
58 
59  } // namespace owc
60 } // namespace gr
61 
62 #endif /* INCLUDED_OWC_OOK_MODULATOR_ONE_IMPL_H */
63 
Definition: OOK_Modulator_one_impl.h:31
int samples_per_symbol()
Definition: OOK_Modulator_one_impl.h:49
void set_max_magnitude(float max_magnitude)
Definition: OOK_Modulator_one_impl.h:42
void set_min_magnitude(float min_magnitude)
Definition: OOK_Modulator_one_impl.h:45
void set_samples_per_symbol(int samples_per_symbol)
Definition: OOK_Modulator_one_impl.h:48
float min_magnitude()
Definition: OOK_Modulator_one_impl.h:46
<+description of block+>
Definition: OOK_Modulator_one.h:37
float max_magnitude()
Definition: OOK_Modulator_one_impl.h:43
Definition: binary_to_decimal_mapper.h:29
OOK_Modulator_one_impl(float max_magnitude, float min_magnitude, int samples_per_symbol)
int work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)