GNU Radio's SATNOGS Package
iq_sink.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, Libre Space Foundation <http://librespacefoundation.org/>
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_IQ_SINK_H
22#define INCLUDED_SATNOGS_IQ_SINK_H
23
25#include <gnuradio/sync_block.h>
26
27namespace gr {
28namespace satnogs {
29
30/*!
31 * \brief This block converts a complex float input stream to short and stores
32 * it to a file. If the value of status argument is zero the block behaves
33 * as a null sink block.
34 *
35 * \ingroup satnogs
36 *
37 */
38class SATNOGS_API iq_sink : virtual public gr::sync_block
39{
40public:
41 typedef std::shared_ptr<iq_sink> sptr;
42
43 /**
44 * This block converts a complex float input stream to short and stores
45 * it to a file. If the value of status argument is zero the block behaves
46 * as a null sink block.
47 *
48 * @param scale the value multiplied against each point in the input stream
49 * @param filename name of the file to open and write output to.
50 * @param append if true, data is appended to the file instead of
51 * overwriting the initial content.
52 * @param status the status of the block.
53 * - 0: Block acts as a null sink
54 * - 1: Active
55 *
56 * @return a shared_ptr to a new instance of satnogs::iq_sink.
57 */
58 static sptr make(const float scale,
59 const char* filename,
60 bool append = false,
61 const int status = 0);
62};
63
64} // namespace satnogs
65// namespace satnogs
66} // namespace gr
67
68#endif /* INCLUDED_SATNOGS_IQ_SINK_H */
#define SATNOGS_API
Definition: api.h:19
This block converts a complex float input stream to short and stores it to a file....
Definition: iq_sink.h:39
std::shared_ptr< iq_sink > sptr
Definition: iq_sink.h:41
static sptr make(const float scale, const char *filename, bool append=false, const int status=0)
Definition: amsat_duv_decoder.h:29