Wednesday, August 27, 2014

[Discuss-gnuradio] GRCP Monitor and Non-Numbers (C++ rpc register)

Hello

I am attempting to get and set strings via ControlPort, but I keep getting
the traceback error below when I right-click to set a value in the
ControlPort monitor (which I am using to ensure I am setting up the RPC
calls properly). Getting and setting a number works fine, but strings (and
vectors) keep giving me a traceback; the monitor doesn't crash, though, but
I still can't set the string.

rpcbasic_register_set<a_class, std::string> get_some_string
rpcbasic_register_set<a_class, std::string> set_some_string

Traceback (most recent call last):
File "/opt/gnuradio3.7/bin/gr-ctrlport-monitor", line 744, in openMenu
self.parent.propertiesMenu(itemname, self.radio, self.uid)
File "/opt/gnuradio3.7/bin/gr-ctrlport-monitor", line 124, in
propertiesMenu
pmin = 1.1*abs(pmin)
TypeError: bad operand type for abs(): 'str'

I am not sure if it's important, but I the setup the polymorphic types as
follows:

pmt::string_to_symbol(std::string("")) for the getter
and
pmt::mp("") for the setter


Thank you in advance,
JT



--
View this message in context: http://gnuradio.4.n7.nabble.com/GRCP-Monitor-and-Non-Numbers-C-rpc-register-tp50135.html
Sent from the GnuRadio mailing list archive at Nabble.com.

_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

No comments:

Post a Comment