GNU Radio's SATNOGS Package
cw_encoder_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) 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_CW_ENCODER_IMPL_H
23#define INCLUDED_SATNOGS_CW_ENCODER_IMPL_H
24
25#include <gnuradio/fxpt_nco.h>
28#include <string>
29#include <vector>
30
31namespace gr {
32namespace satnogs {
33
35{
36private:
37 const double d_samp_rate;
38 const double d_cw_freq;
39 const size_t d_wpm;
40 const size_t d_dot_samples;
41 size_t d_window_size;
42 size_t d_windows_remaining;
43 morse_symbol_t d_cw_symbol;
44 gr::fxpt_nco d_nco;
45 gr::logger_ptr d_logger;
46
47
48 std::string get_cw_symbol(char c);
49
50public:
51 cw_encoder_impl(double samp_rate, double cw_freq, size_t wpm);
53
54 // Where all the action really happens
55 int work(int noutput_items,
56 gr_vector_const_void_star& input_items,
57 gr_vector_void_star& output_items);
58};
59
60} // namespace satnogs
61} // namespace gr
62
63#endif /* INCLUDED_SATNOGS_CW_ENCODER_IMPL_H */
Definition: cw_encoder_impl.h:35
int work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
cw_encoder_impl(double samp_rate, double cw_freq, size_t wpm)
CW encoder block, mainly for debugging and testing purposes. It accepts a CW word via a message sourc...
Definition: cw_encoder.h:39
morse_symbol_t
Definition: morse.h:28
Definition: amsat_duv_decoder.h:29