Hi all.
I'm trying to get the car of a PMT message. And later in the car, the value associated to a specific key.
I'm receiving it:
(((dlt . 105) (freqofs . -0.00015152) (nomfreq . 5.89e+09) (snr . 144.985) (encoding . 0)) . #[1 2 3 4 5 6 7 8 9 0])
I want to get the car:
((dlt . 105) (freqofs . -0.00015152) (nomfreq . 5.89e+09) (snr . 144.985) (encoding . 0))
And later get the value of the key "snr":
144.985
I'm doing that with the next code: msg is the message that I receive.
pmt::pmt_t dict = pmt::car(msg);
pmt::pmt_t snrf =pmt::dict_ref(dict, pmt::mp("snr"), pmt::from_double(10));
message_port_pub(pmt::mp("SNR out"), snrf);
If I public dict, I get in console:
pmt_uniform_vector_elements: wrong_type : ((freqofs . -0.00015152) (nomfreq . 5.89e+09) (snr . 144.985) (encoding . 0))
If I public snrf, I get in console:
pmt_car: wrong_type : 144.985
In general, it is working, but I don't understand why these messages appears.