45    void getKnobs(GNURadio::KnobMap&, 
const GNURadio::KnobIDList&);
 
   46    void getRe(GNURadio::KnobMap&, 
const GNURadio::KnobIDList&);
 
   47    void properties(GNURadio::KnobPropMap&, 
const GNURadio::KnobIDList& knobs);
 
   74                     const std::string& port,
 
   75                     const std::string& msg);
 
   83    std::mutex d_callback_map_lock;
 
   85    typedef std::map<std::string, configureCallback_t> ConfigureCallbackMap_t;
 
   86    ConfigureCallbackMap_t d_setcallbackmap;
 
   88    typedef std::map<std::string, queryCallback_t> QueryCallbackMap_t;
 
   89    QueryCallbackMap_t d_getcallbackmap;
 
   91    typedef std::map<std::string, handlerCallback_t> HandlerCallbackMap_t;
 
   92    HandlerCallbackMap_t d_handlercallbackmap;
 
  103            _handlerCallback.callback->post(port, msg);
 
  105            std::ostringstream msg;
 
  107                << 
" requires PRIVLVL <= " << _handlerCallback.
priv 
  108                << 
" to set, currently at: " << 
cur_priv;
 
  114    template <
typename T, 
typename TMap>
 
  115    struct set_f : 
public std::function<void(T)> {
 
  116        set_f(TMap& _setcallbackmap, 
const priv_lvl_t& _cur_priv)
 
  117            : d_setcallbackmap(_setcallbackmap), cur_priv(_cur_priv)
 
  122        void operator()(
const T& p)
 
  124            ConfigureCallbackMap_t::const_iterator iter(d_setcallbackmap.find(p.first));
 
  125            if (iter != d_setcallbackmap.end()) {
 
  127                    (*iter->second.callback)
 
  130                    std::ostringstream 
msg;
 
  131                    msg << 
"Key " << p.first
 
  132                        << 
" requires PRIVLVL <= " << iter->second.priv
 
  133                        << 
" to set, currently at: " << cur_priv;
 
  137                throw apache::thrift::TApplicationException(__FILE__ 
" " S__LINE__);
 
  141        TMap& d_setcallbackmap;
 
  145    template <
typename T, 
typename TMap>
 
  146    struct get_f : 
public std::function<void(T)> {
 
  147        get_f(TMap& _getcallbackmap,
 
  149              GNURadio::KnobMap& _outknobs)
 
  150            : d_getcallbackmap(_getcallbackmap), cur_priv(_cur_priv), outknobs(_outknobs)
 
  154        void operator()(
const T& p)
 
  156            QueryCallbackMap_t::const_iterator iter(d_getcallbackmap.find(p));
 
  157            if (iter != d_getcallbackmap.end()) {
 
  162                    std::ostringstream 
msg;
 
  163                    msg << 
"Key " << iter->first
 
  164                        << 
" requires PRIVLVL: <= " << iter->second.priv
 
  165                        << 
" to get, currently at: " << cur_priv;
 
  169                std::ostringstream smsgs;
 
  170                smsgs << 
"Ctrlport Key called with unregistered key (" << p << 
")\n";
 
  172                throw apache::thrift::TApplicationException(__FILE__ 
" " S__LINE__);
 
  176        TMap& d_getcallbackmap;
 
  178        GNURadio::KnobMap& outknobs;
 
  181    template <
typename T, 
typename TMap, 
typename TKnobMap>
 
  182    struct get_all_f : 
public std::function<void(T)> {
 
  183        get_all_f(TMap& _getcallbackmap, 
const priv_lvl_t& _cur_priv, TKnobMap& _outknobs)
 
  184            : d_getcallbackmap(_getcallbackmap), cur_priv(_cur_priv), outknobs(_outknobs)
 
  189        void operator()(
const T& p)
 
  191            if (cur_priv <= p.second.priv) {
 
  195                std::ostringstream 
msg;
 
  196                msg << 
"Key " << p.first << 
" requires PRIVLVL: <= " << p.second.priv
 
  197                    << 
" to get, currently at: " << cur_priv;
 
  202        TMap& d_getcallbackmap;
 
  207    template <
typename T, 
typename TMap, 
typename TKnobMap>
 
  208    struct properties_all_f : 
public std::function<void(T)> {
 
  209        properties_all_f(QueryCallbackMap_t& _getcallbackmap,
 
  211                         GNURadio::KnobPropMap& _outknobs)
 
  212            : d_getcallbackmap(_getcallbackmap), cur_priv(_cur_priv), outknobs(_outknobs)
 
  217        void operator()(
const T& p)
 
  219            if (cur_priv <= p.second.priv) {
 
  220                GNURadio::KnobProp prop;
 
  221                prop.type = GNURadio::KnobType::KNOBDOUBLE;
 
  222                prop.units = p.second.units;
 
  223                prop.description = p.second.description;
 
  226                prop.display = 
static_cast<uint32_t
>(p.second.display);
 
  227                outknobs[p.first] = prop;
 
  229                std::ostringstream 
msg;
 
  230                msg << 
"Key " << p.first << 
" requires PRIVLVL: <= " << p.second.priv
 
  231                    << 
" to get, currently at: " << cur_priv;
 
  236        TMap& d_getcallbackmap;
 
  241    template <
class T, 
typename TMap, 
typename TKnobMap>
 
  242    struct properties_f : 
public std::function<void(T)> {
 
  243        properties_f(TMap& _getcallbackmap,
 
  246            : d_getcallbackmap(_getcallbackmap), cur_priv(_cur_priv), outknobs(_outknobs)
 
  251        void operator()(
const T& p)
 
  253            typename TMap::const_iterator iter(d_getcallbackmap.find(p));
 
  254            if (iter != d_getcallbackmap.end()) {
 
  256                    GNURadio::KnobProp prop;
 
  257                    prop.type = GNURadio::KnobType::KNOBDOUBLE;
 
  258                    prop.units = iter->second.units;
 
  259                    prop.description = iter->second.description;
 
  262                    prop.display = 
static_cast<uint32_t
>(iter->second.display);
 
  265                    std::ostringstream 
msg;
 
  266                    msg << 
"Key " << iter->first
 
  267                        << 
" requires PRIVLVL: <= " << iter->second.priv
 
  268                        << 
" to get, currently at: " << cur_priv;
 
  272                throw apache::thrift::TApplicationException(__FILE__ 
" " S__LINE__);
 
  276        TMap& d_getcallbackmap;