GNU Radio's SATNOGS Package
json_converter.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) 2019, Libre Space Foundation <http://libre.space>
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  */
20 
21 #ifndef INCLUDED_SATNOGS_JSON_CONVERTER_H
22 #define INCLUDED_SATNOGS_JSON_CONVERTER_H
23 
24 #include <satnogs/api.h>
25 #include <gnuradio/block.h>
26 #include <string>
27 namespace gr {
28 namespace satnogs {
29 
30 /*!
31  * \brief This block takes a PMT message from the SatNOGS decoders
32  * and converts it a PMT containing the same message in JSON form.
33  * This can be used for debugging and stream operations.
34  * \ingroup satnogs
35  *
36  */
37 class SATNOGS_API json_converter : virtual public gr::block {
38 public:
39  typedef boost::shared_ptr<json_converter> sptr;
40 
41 
42  /**
43  * This block takes a PMT message from the SatNOGS decoders
44  * and converts it a PMT containing the same message in JSON form.
45  * This can be used for debugging and stream operations.
46  *
47  * @param extra every JSON frame can contain an arbitrary amount of extra information.
48  * Use this fill to provide a JSON-valid string with such information.
49  *
50  * @return shared pointer of the block instance
51  */
52  static sptr
53  make(const std::string &extra = "");
54 };
55 
56 } // namespace satnogs
57 } // namespace gr
58 
59 #endif /* INCLUDED_SATNOGS_JSON_CONVERTER_H */
60 
boost::shared_ptr< json_converter > sptr
Definition: json_converter.h:39
Definition: amsat_duv_decoder.h:29
#define SATNOGS_API
Definition: api.h:30
This block takes a PMT message from the SatNOGS decoders and converts it a PMT containing the same me...
Definition: json_converter.h:37