GNU Radio Manual and C++ API Reference  3.7.13.4
The Free & Open Software Radio Ecosystem
rpcbasic_register_handler< T > Class Template Reference

Registers a message handler function to post a message to a block's handler. More...

#include <gnuradio/rpcregisterhelpers.h>

Public Member Functions

 rpcbasic_register_handler (const std::string &block_alias, const char *handler, const char *units_="", const char *desc_="", priv_lvl_t minpriv_=RPC_PRIVLVL_MIN, DisplayType display_=DISPNULL)
 Adds the ability to pass a message over ControlPort. More...
 
 ~rpcbasic_register_handler ()
 
std::string units () const
 
std::string description () const
 
priv_lvl_t privilege_level () const
 
DisplayType default_display () const
 
void units (std::string u)
 
void description (std::string d)
 
void privilege_level (priv_lvl_t p)
 
void default_display (DisplayType d)
 
- Public Member Functions inherited from rpcbasic_base
 rpcbasic_base ()
 
virtual ~rpcbasic_base ()
 

Detailed Description

template<typename T>
class rpcbasic_register_handler< T >

Registers a message handler function to post a message to a block's handler.

Constructor & Destructor Documentation

template<typename T >
rpcbasic_register_handler< T >::rpcbasic_register_handler ( const std::string &  block_alias,
const char *  handler,
const char *  units_ = "",
const char *  desc_ = "",
priv_lvl_t  minpriv_ = RPC_PRIVLVL_MIN,
DisplayType  display_ = DISPNULL 
)
inline

Adds the ability to pass a message over ControlPort.

This makes any message handler function avialable over ControlPort. Since message handlers always take in a single PMT message input, this interface provides a very generic way of setting values in a block in a flowgraph.

Parameters
block_aliasAlias of the block
handlerThe name of the message port in the block
units_A string to describe what units to represent the variable with
desc_A string to describing the variable.
minpriv_The required minimum privilege level
display_The display mask

References gr::block_registry::block_lookup(), rpcmanager::get(), global_block_registry, rpcserver_booter_base::i(), pmt::intern(), and rpcserver_base::registerHandlerCallback().

Member Function Documentation

template<typename T >
DisplayType rpcbasic_register_handler< T >::default_display ( ) const
inline
template<typename T >
void rpcbasic_register_handler< T >::default_display ( DisplayType  d)
inline
template<typename T >
std::string rpcbasic_register_handler< T >::description ( ) const
inline
template<typename T >
void rpcbasic_register_handler< T >::description ( std::string  d)
inline
template<typename T >
priv_lvl_t rpcbasic_register_handler< T >::privilege_level ( ) const
inline
template<typename T >
void rpcbasic_register_handler< T >::privilege_level ( priv_lvl_t  p)
inline
template<typename T >
std::string rpcbasic_register_handler< T >::units ( ) const
inline
template<typename T >
void rpcbasic_register_handler< T >::units ( std::string  u)
inline

The documentation for this class was generated from the following file: