GNU Radio's SATNOGS Package
morse_debug_source_impl.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * gr-satnogs: SatNOGS GNU Radio Out-Of-Tree Module
4  *
5  * Copyright (C) 2016, 2017
6  * Libre Space Foundation <http://librespacefoundation.org/>
7  *
8  * This program is free software: you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation, either version 3 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program. If not, see <http://www.gnu.org/licenses/>.
20  */
21 
22 #ifndef INCLUDED_SATNOGS_MORSE_DEBUG_SOURCE_IMPL_H
23 #define INCLUDED_SATNOGS_MORSE_DEBUG_SOURCE_IMPL_H
24 
26 #include <thread>
27 #include <algorithm>
28 #include <vector>
29 
30 namespace gr {
31 namespace satnogs {
32 
33 class morse_debug_source_impl : public morse_debug_source {
34 private:
35  const size_t d_wpm;
36  const bool d_inject_errors;
37  const float d_p;
38  const size_t d_seq_pause_ms;
39  bool d_run;
40  const char d_chars[36];
41  const std::vector<std::string> d_symbols;
42  std::thread d_thread;
43 
44  void
45  send_debug_msg(std::string sentence);
46 
47 public:
48  morse_debug_source_impl(const size_t wpm, std::string debug_seq,
49  bool inject_errors,
50  float error_prob, size_t seq_pause_ms);
51  ~morse_debug_source_impl();
52 };
53 
54 } // namespace satnogs
55 } // namespace gr
56 
57 #endif /* INCLUDED_SATNOGS_MORSE_DEBUG_SOURCE_IMPL_H */
58 
Definition: amsat_duv_decoder.h:29