GNU Radio Manual and C++ API Reference  3.8.1.0
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

◆ rpcbasic_register_handler()

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 available 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().

◆ ~rpcbasic_register_handler()

Member Function Documentation

◆ default_display() [1/2]

template<typename T >
DisplayType rpcbasic_register_handler< T >::default_display ( ) const
inline

◆ default_display() [2/2]

template<typename T >
void rpcbasic_register_handler< T >::default_display ( DisplayType  d)
inline

◆ description() [1/2]

template<typename T >
std::string rpcbasic_register_handler< T >::description ( ) const
inline

◆ description() [2/2]

template<typename T >
void rpcbasic_register_handler< T >::description ( std::string  d)
inline

◆ privilege_level() [1/2]

template<typename T >
priv_lvl_t rpcbasic_register_handler< T >::privilege_level ( ) const
inline

◆ privilege_level() [2/2]

template<typename T >
void rpcbasic_register_handler< T >::privilege_level ( priv_lvl_t  p)
inline

◆ units() [1/2]

template<typename T >
std::string rpcbasic_register_handler< T >::units ( ) const
inline

◆ units() [2/2]

template<typename T >
void rpcbasic_register_handler< T >::units ( std::string  u)
inline

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