Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dictionary read wrong in cpp #3

Open
ahmadsj94 opened this issue May 15, 2017 · 0 comments
Open

Dictionary read wrong in cpp #3

ahmadsj94 opened this issue May 15, 2017 · 0 comments

Comments

@ahmadsj94
Copy link

Reading the PMT in c++ gives the wrong key value pairs, like so

******* MESSAGE DEBUG PRINT ********

Dictionary Keys: ((gps_time . 2017-05-15 12:23:41))

Dictionary Values: (((longitude . 23.8505) (latitude . 38.0829) (valid . #t) (host_time . 2017-05-15 12:23:41.843005) (protocol . nmea) (id . RMC)))
(((gps_time . 2017-05-15 12:23:41) (longitude . 23.8505) (latitude . 38.0829) (valid . #t) (host_time . 2017-05-15 12:23:41.843005) (protocol . nmea) (id . RMC)))


This output results from reading the keys, then values, then printing, like so

void reader_impl::print(pmt::pmt_t msg)
{
std::cout << "******* MESSAGE DEBUG PRINT ********\n";

  std::cout<<"\nDictionary Keys: "<<pmt::dict_keys(msg)<<"\n";
std::cout<<"\nDictionary Values: "<<pmt::dict_values(msg)<<"\n";
//auto m = mappify1(pmt::symbol_to_string(msg));
//for(auto const& p: m)
//    std::cout << '{' << p.first << " => " << p.second << '}' << '\n';
  pmt::print(msg);
  std::cout << "************************************\n";
}

Am I doing something wrong? Or are pmts read differently in python and cpp?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant