GNU Radio C++ API Reference: rpcbasic_register_handler< T > Class Template Reference

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

Loading...
Searching...
No Matches
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.
| ~rpcbasic_register_handler () override
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_alias | Alias of the block
  handler | The 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(), DISPNULL, rpcmanager::get(), global_block_registry, rpcserver_booter_base::i(), pmt::intern(), rpcserver_base::registerHandlerCallback(), and RPC_PRIVLVL_MIN.

## ◆ ~rpcbasic_register_handler()

template<typename T>

rpcbasic_register_handler< T >::~rpcbasic_register_handler | ( |  | ) |
| inlineoverride

References rpcmanager::get(), rpcserver_booter_base::i(), and rpcserver_base::unregisterHandlerCallback().

## 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:

- rpcregisterhelpers.h