diff options
author | Tim O'Shea <tim.oshea753@gmail.com> | 2013-03-18 10:14:25 -0700 |
---|---|---|
committer | Johnathan Corgan <johnathan@corganlabs.com> | 2013-03-18 10:14:25 -0700 |
commit | 9954d0394f7ba5c301f3e6d3e4fccdc90ad1d3c8 (patch) | |
tree | 9224501237db49cb109b31987c02780b90c53729 /gnuradio-core/src | |
parent | 93192a843433d79e134719050d0a466aa47c4f4c (diff) |
core: fix use of inaccesible methods in pycallback
Diffstat (limited to 'gnuradio-core/src')
-rw-r--r-- | gnuradio-core/src/lib/runtime/pycallback_object.h | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/gnuradio-core/src/lib/runtime/pycallback_object.h b/gnuradio-core/src/lib/runtime/pycallback_object.h index f6247c0c6d..f2cd085641 100644 --- a/gnuradio-core/src/lib/runtime/pycallback_object.h +++ b/gnuradio-core/src/lib/runtime/pycallback_object.h @@ -25,6 +25,7 @@ #include <ice_application_base.h> #include <IcePy_Communicator.h> #include <pythread.h> +#include <boost/format.hpp> enum pyport_t { PYPORT_STRING, @@ -78,11 +79,17 @@ public: DisplayType dtype) : d_callback(NULL), d_functionbase(functionbase), d_units(units), d_desc(desc), - d_min(min), d_max(max), d_deflt(deflt), d_dtype(dtype) + d_min(min), d_max(max), d_deflt(deflt), d_dtype(dtype), + d_name(name), d_id(pycallback_object_count++) { d_callback = NULL; } - + + void add_rpc_variable(rpcbasic_sptr s) + { + d_rpc_vars.push_back(s); + } + myType get() { myType rVal; if(d_callback == NULL) { @@ -123,7 +130,7 @@ public: #ifdef GR_CTRLPORT add_rpc_variable( rpcbasic_sptr(new rpcbasic_register_get<pycallback_object, myType>( - alias(), d_functionbase.c_str(), + (boost::format("%s%d") % d_name % d_id).str() , d_functionbase.c_str(), &pycallback_object::get, pmt_assist<myType>::make(d_min), pmt_assist<myType>::make(d_max), pmt_assist<myType>::make(d_deflt), d_units.c_str(), d_desc.c_str(), RPC_PRIVLVL_MIN, d_dtype))); @@ -140,6 +147,10 @@ private: printf("TYPE NOT IMPLEMENTED!\n"); assert(0); }; + std::vector<boost::any> d_rpc_vars; // container for all RPC variables + std::string d_name; + int d_id; + }; |