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 <algorithm>
27#include <thread>
28#include <vector>
29
30namespace gr {
31namespace satnogs {
32
33class morse_debug_source_impl : public morse_debug_source
34{
35private:
36 const size_t d_wpm;
37 const bool d_inject_errors;
38 const float d_p;
39 const size_t d_seq_pause_ms;
40 bool d_run;
41 const char d_chars[36];
42 const std::vector<std::string> d_symbols;
43 std::thread d_thread;
44
45 void send_debug_msg(std::string sentence);
46
47public:
48 morse_debug_source_impl(const size_t wpm,
49 std::string debug_seq,
50 bool inject_errors,
51 float error_prob,
52 size_t seq_pause_ms);
53 ~morse_debug_source_impl();
54};
55
56} // namespace satnogs
57} // namespace gr
58
59#endif /* INCLUDED_SATNOGS_MORSE_DEBUG_SOURCE_IMPL_H */
Definition: amsat_duv_decoder.h:29