void ProxyV2V::nextPacket(const odcore::data::Packet &p) { if(m_debug) { cout << "[" << getName() << "] Received a packet from " << p.getSender() << ", " << "with " << p.getData().length() // << " bytes containing '" // << p.getData() << "'" << endl; } opendlv::proxy::V2vReading nextMessage; nextMessage.setSize(p.getData().length()); nextMessage.setData(p.getData()); odcore::data::Container c(nextMessage); getConference().send(c); }
void UDPReceiver::nextPacket(const odcore::data::Packet &p) { Lock l(m_listenerMutex); // Pass packet either to string listner, the synchronous packet // listener, or to packet pipeline. if (m_stringListener != NULL) { m_stringListener->nextString(p.getData()); } else if (m_synchronousPacketListener != NULL) { m_synchronousPacketListener->nextPacket(p); } else { m_packetPipeline.nextPacket(p); } }