diff options
Diffstat (limited to 'gr-blocks/include/gnuradio/blocks/file_descriptor_source.h')
-rw-r--r-- | gr-blocks/include/gnuradio/blocks/file_descriptor_source.h | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/gr-blocks/include/gnuradio/blocks/file_descriptor_source.h b/gr-blocks/include/gnuradio/blocks/file_descriptor_source.h index d78b10a84f..12f03bb84d 100644 --- a/gr-blocks/include/gnuradio/blocks/file_descriptor_source.h +++ b/gr-blocks/include/gnuradio/blocks/file_descriptor_source.h @@ -28,35 +28,35 @@ namespace gr { - namespace blocks { +namespace blocks { + +/*! + * \brief Read stream from file descriptor. + * \ingroup file_operators_blk + */ +class BLOCKS_API file_descriptor_source : virtual public sync_block +{ +protected: + virtual int read_items(char* buf, int nitems) = 0; + virtual int handle_residue(char* buf, int nbytes_read) = 0; + virtual void flush_residue() = 0; + +public: + // gr::blocks::file_descriptor_source::sptr + typedef boost::shared_ptr<file_descriptor_source> sptr; /*! - * \brief Read stream from file descriptor. - * \ingroup file_operators_blk + * Build a file descriptor source block. The provided file descriptor will + * be closed when the sink is destroyed. + * + * \param itemsize item size of the incoming data stream. + * \param fd file descriptor (as an integer). + * \param repeat repeat the data stream continuously. */ - class BLOCKS_API file_descriptor_source : virtual public sync_block - { - protected: - virtual int read_items(char *buf, int nitems) = 0; - virtual int handle_residue(char *buf, int nbytes_read) = 0; - virtual void flush_residue() = 0; - - public: - // gr::blocks::file_descriptor_source::sptr - typedef boost::shared_ptr<file_descriptor_source> sptr; - - /*! - * Build a file descriptor source block. The provided file descriptor will - * be closed when the sink is destroyed. - * - * \param itemsize item size of the incoming data stream. - * \param fd file descriptor (as an integer). - * \param repeat repeat the data stream continuously. - */ - static sptr make(size_t itemsize, int fd, bool repeat=false); - }; - - } /* namespace blocks */ + static sptr make(size_t itemsize, int fd, bool repeat = false); +}; + +} /* namespace blocks */ } /* namespace gr */ #endif /* INCLUDED_GR_FILE_DESCRIPTOR_SOURCE_H */ |