Loading...
Searching...
No Matches
block_registry.h
Go to the documentation of this file.
/* -*- c++ -*- */
/*
* Copyright 2012-2013 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
* SPDX-License-Identifier: GPL-3.0-or-later
*
*/
#ifndef GR_RUNTIME_BLOCK_REGISTRY_H
#define GR_RUNTIME_BLOCK_REGISTRY_H
#include <gnuradio/api.h>
#include <gnuradio/basic_block.h>
#include <gnuradio/thread/thread.h>
#include <map>
namespace gr {
#ifndef GR_BASIC_BLOCK_H
class basic_block;
class block;
#endif
class GR_RUNTIME_API block_registry
{
public:
block_registry();
long block_register(basic_block* block);
void block_unregister(basic_block* block);
std::string register_symbolic_name(basic_block* block);
void register_symbolic_name(basic_block* block, std::string name);
void update_symbolic_name(basic_block* block, std::string name);
basic_block_sptr block_lookup(pmt::pmt_t symbol);
void register_primitive(std::string blk, gr::block* ref);
void unregister_primitive(std::string blk);
void notify_blk(std::string blk);
private:
// typedef std::map< long, basic_block_sptr > blocksubmap_t;
typedef std::map<long, basic_block*> blocksubmap_t;
typedef std::map<std::string, blocksubmap_t> blockmap_t;
blockmap_t d_map;
pmt::pmt_t d_ref_map;
std::map<std::string, block*> primitive_map;
gr::thread::mutex d_mutex;
};
} /* namespace gr */
GR_RUNTIME_API extern gr::block_registry global_block_registry;
#endif /* GR_RUNTIME_BLOCK_REGISTRY_H */
basic_block.h
global_block_registry
GR_RUNTIME_API gr::block_registry global_block_registry
gr::basic_block
The abstract base class for all signal processing blocks.
Definition basic_block.h:63
gr::block_registry
Definition block_registry.h:27
gr::block_registry::register_symbolic_name
std::string register_symbolic_name(basic_block *block)
gr::block_registry::block_register
long block_register(basic_block *block)
gr::block_registry::block_registry
block_registry()
gr::block_registry::register_symbolic_name
void register_symbolic_name(basic_block *block, std::string name)
gr::block_registry::block_lookup
basic_block_sptr block_lookup(pmt::pmt_t symbol)
gr::block_registry::unregister_primitive
void unregister_primitive(std::string blk)
gr::block_registry::notify_blk
void notify_blk(std::string blk)
gr::block_registry::update_symbolic_name
void update_symbolic_name(basic_block *block, std::string name)
gr::block_registry::block_unregister
void block_unregister(basic_block *block)
gr::block_registry::register_primitive
void register_primitive(std::string blk, gr::block *ref)
gr::block
The abstract base class for all 'terminal' processing blocks.
Definition gnuradio-runtime/include/gnuradio/block.h:63
api.h
GR_RUNTIME_API
#define GR_RUNTIME_API
Definition gnuradio-runtime/include/gnuradio/api.h:18
gr::thread::mutex
boost::mutex mutex
Definition thread.h:37
gr
GNU Radio logging wrapper.
Definition basic_block.h:29
pmt::pmt_t
std::shared_ptr< pmt_base > pmt_t
typedef for shared pointer (transparent reference counting).
Definition pmt.h:83
thread.h