GNU Radio C++ API Reference: buffer_reader_sm.h Source File

| GNU Radio C++ API Reference 3.10.12.0 The Free & Open Software Radio Ecosystem |

Loading...
Searching...
No Matches
buffer_reader_sm.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * Copyright 2004,2009-2011,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_RUNTIME_BUFFER_READER_SM_H
12#define INCLUDED_GR_RUNTIME_BUFFER_READER_SM_H
13
14#include <gnuradio/api.h>
15#include <gnuradio/buffer.h>
16#include <gnuradio/buffer_reader.h>
17#include <gnuradio/runtime_types.h>
18
19namespace gr {
20
21 class GR_RUNTIME_API buffer_reader_sm : public buffer_reader
22{
23public:
24 ~buffer_reader_sm();
25
26 /*!
27 * \brief Return number of items available for reading.
28 */
29 virtual int items_available() const;
30
31 /*!
32 * \brief Return true if thread is ready to call input_blocked_callback,
33 * false otherwise; delegate calls to buffer class's input_blkd_cb_ready()
34 */
35 virtual bool input_blkd_cb_ready(int items_required) const;
36
37 /*!
38 * \brief Callback function that the scheduler will call when it determines
39 * that the input is blocked; delegate calls to buffer class's
40 * input_blocked_callback()
41 */
42 virtual bool input_blocked_callback(int items_required, int items_avail);
43
44private:
45 friend class buffer;
46 friend class buffer_single_mapped;
47
48 friend GR_RUNTIME_API buffer_reader_sptr buffer_add_reader(buffer_sptr buf,
49 int nzero_preload,
50 block_sptr link,
51 int delay);
52
53 //! constructor is private. Use gr::buffer::add_reader to create instances
54 buffer_reader_sm(buffer_sptr buffer, unsigned int read_index, block_sptr link);
55};
56
57} // namespace gr
58
59#endif /* INCLUDED_GR_RUNTIME_BUFFER_READER_SM_H */
buffer.h
buffer_reader.h
gr::buffer_reader_sm::buffer_single_mapped
friend class buffer_single_mapped
Definition buffer_reader_sm.h:46
gr::buffer_reader_sm::items_available
virtual int items_available() const
Return number of items available for reading.
gr::buffer_reader_sm::input_blkd_cb_ready
virtual bool input_blkd_cb_ready(int items_required) const
Return true if thread is ready to call input_blocked_callback, false otherwise; delegate calls to buf...
gr::buffer_reader_sm::buffer_add_reader
friend GR_RUNTIME_API buffer_reader_sptr buffer_add_reader(buffer_sptr buf, int nzero_preload, block_sptr link, int delay)
Create a new gr::buffer_reader and attach it to buffer buf.
gr::buffer_reader_sm::input_blocked_callback
virtual bool input_blocked_callback(int items_required, int items_avail)
Callback function that the scheduler will call when it determines that the input is blocked; delegate...
gr::buffer_reader_sm::~buffer_reader_sm
~buffer_reader_sm()
gr::buffer_reader_sm::buffer
friend class buffer
Definition buffer_reader_sm.h:45
gr::buffer_reader::link
block_sptr link() const
Return the block that reads via this reader.
Definition buffer_reader.h:121
gr::buffer_reader::buffer_reader
buffer_reader(buffer_sptr buffer, unsigned int read_index, block_sptr link)
constructor is private. Use gr::buffer::add_reader to create instances
api.h
GR_RUNTIME_API
#define GR_RUNTIME_API
Definition gnuradio-runtime/include/gnuradio/api.h:18
gr
GNU Radio logging wrapper.
Definition basic_block.h:29
runtime_types.h