GNU Radio Manual and C++ API Reference  3.10.9.1
The Free & Open Software Radio Ecosystem
file_descriptor_sink.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2004,2013 Free Software Foundation, Inc.
4  *
5  * This file is part of GNU Radio
6  *
7  * SPDX-License-Identifier: GPL-3.0-or-later
8  *
9  */
10 
11 #ifndef INCLUDED_GR_FILE_DESCRIPTOR_SINK_H
12 #define INCLUDED_GR_FILE_DESCRIPTOR_SINK_H
13 
14 #include <gnuradio/blocks/api.h>
15 #include <gnuradio/sync_block.h>
16 
17 namespace gr {
18 namespace blocks {
19 
20 /*!
21  * \brief Write stream to file descriptor.
22  * \ingroup file_operators_blk
23  */
25 {
26 public:
27  // gr::blocks::file_descriptor_sink::sptr
28  typedef std::shared_ptr<file_descriptor_sink> sptr;
29 
30  /*!
31  * Build a file descriptor sink block. The provided file descriptor will
32  * be closed when the sink is destroyed.
33  *
34  * \param itemsize item size of the incoming data stream.
35  * \param fd file descriptor (as an integer).
36  */
37  static sptr make(size_t itemsize, int fd);
38 };
39 
40 } /* namespace blocks */
41 } /* namespace gr */
42 
43 #endif /* INCLUDED_GR_FILE_DESCRIPTOR_SINK_H */
Write stream to file descriptor.
Definition: file_descriptor_sink.h:25
static sptr make(size_t itemsize, int fd)
std::shared_ptr< file_descriptor_sink > sptr
Definition: file_descriptor_sink.h:28
synchronous 1:1 input to output with history
Definition: sync_block.h:26
#define BLOCKS_API
Definition: gr-blocks/include/gnuradio/blocks/api.h:18
GR_RUNTIME_API size_t itemsize(types::vector_type type)
GNU Radio logging wrapper.
Definition: basic_block.h:29