23 #ifndef NEIGHBOR_COMM_H_ 24 #define NEIGHBOR_COMM_H_ 31 #include "gsdf_msgs/NeighborBroadcastKeyValue.h" 54 gsdf_msgs::NeighborBroadcastKeyValue nbkv;
57 nbkv.value = value_vec;
60 gsdf_msgs::CommPacket p;
61 p.header.source =
rth_->getRobotID();
63 p.header.data_len = nbkv_vec.size();
65 p.header.checksum = 0;
66 p.content.buf = nbkv_vec;
68 mqm_->getOutMsgQueue(
"nc")->push(msg_data);
76 template<
typename Type>
79 Listener(
const std::string& key,
const boost::function<
void(
const Type&)>& callback)
85 rth_->insertOrUpdateListenerHelper(
key_, helper_);
boost::shared_ptr< micros_swarm::MsgQueueManager > mqm_
Listener(const std::string &key, const boost::function< void(const Type &)> &callback)
std::vector< uint8_t > serialize_ros(T t)
Broadcaster(const std::string &key)
static boost::shared_ptr< T > getSingleton()
boost::shared_ptr< ListenerHelper > helper_
boost::shared_ptr< RuntimeHandle > rth_
boost::shared_ptr< RuntimeHandle > rth_
void broadcast(const Type &value)