| | |
| | | printf("proc [%d] %s, %s, %s\n\ttopics\n", i, |
| | | (info.online() ? "online" : "offline"), |
| | | info.proc().proc_id().c_str(), info.proc().name().c_str()); |
| | | for (auto &t : info.topics().topic_list()) { |
| | | printf("\t\t %s\n", t.c_str()); |
| | | auto PrintTopics = [](std::string const &name, auto &topic_list) { |
| | | printf("%s:[", name.c_str()); |
| | | for (auto &t : topic_list) { |
| | | printf("%s,", t.c_str()); |
| | | } |
| | | printf("]\n"); |
| | | }; |
| | | PrintTopics("service", info.service().topic_list()); |
| | | PrintTopics("local_sub", info.local_sub().topic_list()); |
| | | PrintTopics("net_sub", info.net_sub().topic_list()); |
| | | printf("\n"); |
| | | } |
| | | printf("\n"); |
| | | }; |
| | | if (0) { |
| | | if (1) { |
| | | // query procs |
| | | std::string dest(BHAddress().SerializeAsString()); |
| | | MsgQueryProc query; |