Loading...
Searching...
No Matches
buffer_reader_sm.h
Go to the documentation of this file.
/* -*- c++ -*- */
/*
* Copyright 2004,2009-2011,2013 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
* SPDX-License-Identifier: GPL-3.0-or-later
*
*/
#ifndef INCLUDED_GR_RUNTIME_BUFFER_READER_SM_H
#define INCLUDED_GR_RUNTIME_BUFFER_READER_SM_H
#include <gnuradio/api.h>
#include <gnuradio/buffer.h>
#include <gnuradio/buffer_reader.h>
#include <gnuradio/runtime_types.h>
namespace gr {
class GR_RUNTIME_API buffer_reader_sm : public buffer_reader
{
public:
~buffer_reader_sm() override;
/*!
* \brief Return number of items available for reading.
*/
int items_available() const override;
/*!
* \brief Return true if thread is ready to call input_blocked_callback,
* false otherwise; delegate calls to buffer class's input_blkd_cb_ready()
*/
bool input_blkd_cb_ready(int items_required) const override;
/*!
* \brief Callback function that the scheduler will call when it determines
* that the input is blocked; delegate calls to buffer class's
* input_blocked_callback()
*/
bool input_blocked_callback(int items_required, int items_avail) override;
private:
friend class buffer;
friend class buffer_single_mapped;
friend GR_RUNTIME_API buffer_reader_sptr buffer_add_reader(buffer_sptr buf,
int nzero_preload,
block_sptr link,
int delay);
//! constructor is private. Use gr::buffer::add_reader to create instances
buffer_reader_sm(buffer_sptr buffer, unsigned int read_index, block_sptr link);
};
} // namespace gr
#endif /* INCLUDED_GR_RUNTIME_BUFFER_READER_SM_H */
buffer.h
buffer_reader.h
gr::buffer_reader_sm::input_blocked_callback
bool input_blocked_callback(int items_required, int items_avail) override
Callback function that the scheduler will call when it determines that the input is blocked; delegate...
gr::buffer_reader_sm::buffer_single_mapped
friend class buffer_single_mapped
Definition buffer_reader_sm.h:46
gr::buffer_reader_sm::input_blkd_cb_ready
bool input_blkd_cb_ready(int items_required) const override
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::items_available
int items_available() const override
Return number of items available for reading.
gr::buffer_reader_sm::buffer
friend class buffer
Definition buffer_reader_sm.h:45
gr::buffer_reader_sm::~buffer_reader_sm
~buffer_reader_sm() override
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