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 <gnuradio/block.h>
26#include <string>
27namespace gr {
28namespace 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 */
37class SATNOGS_API json_converter : virtual public gr::block
38{
39public:
40 typedef std::shared_ptr<json_converter> sptr;
41
42
43 /**
44 * This block takes a PMT message from the SatNOGS decoders
45 * and converts it a PMT containing the same message in JSON form.
46 * This can be used for debugging and stream operations.
47 *
48 * @param extra every JSON frame can contain an arbitrary amount of extra information.
49 * Use this fill to provide a JSON-valid string with such information.
50 *
51 * @return shared pointer of the block instance
52 */
53 static sptr make(const std::string& extra = "");
54};
55
56} // namespace satnogs
57} // namespace gr
58
59#endif /* INCLUDED_SATNOGS_JSON_CONVERTER_H */
#define SATNOGS_API
Definition: api.h:19
This block takes a PMT message from the SatNOGS decoders and converts it a PMT containing the same me...
Definition: json_converter.h:38
static sptr make(const std::string &extra="")
std::shared_ptr< json_converter > sptr
Definition: json_converter.h:40
Definition: amsat_duv_decoder.h:29