32 UDPBCBroker::UDPBCBroker()
46 void UDPBCBroker::broadcast(
const std::vector<uint8_t>& msg_data)
48 int len = msg_data.size();
49 char *data =
new char[len];
50 for(
int i = 0; i < len; i++) {
51 *(data + i) = (
char)(msg_data[i]);
53 sender_->send(data, len);
58 parser_.parse(msg_vec);
61 void UDPBCBroker::receive()
63 boost::function<void(const std::vector<uint8_t>&)> func = boost::bind(&
UDPBCBroker::callback,
this, _1);
64 recver_->receive(func);
void callback(const vector< uint8_t > &msg)
static boost::shared_ptr< T > getSingleton()
#define PLUGINLIB_EXPORT_CLASS(class_type, base_class_type)