From Stephan Huber, further work on osc plugin

This commit is contained in:
Robert Osfield
2012-11-21 15:19:58 +00:00
parent 4b4327aaae
commit f0b3a47735
2 changed files with 17 additions and 0 deletions

View File

@@ -397,6 +397,22 @@ void OscDevice::ProcessMessage( const osc::ReceivedMessage& m, const IpEndpointN
}
void OscDevice::ProcessPacket( const char *data, int size, const IpEndpointName& remoteEndpoint )
{
OSG_INFO << "OscDevice :: receiving " << size << " bytes of data ..." << std::endl;
try {
osc::OscPacketListener::ProcessPacket(data, size, remoteEndpoint);
}
catch(const osc::Exception& e) {
OSG_WARN << "OscDevice :: could not process UDP-packet: " << e.what() << std::endl;
}
catch(...) {
OSG_WARN << "OscDevice :: could not process UDP-packet because of an exception!" << std::endl;
}
}
void OscDevice::addRequestHandler(RequestHandler* handler)
{
if (handler)

View File

@@ -70,6 +70,7 @@ public:
virtual void run();
virtual void ProcessMessage( const osc::ReceivedMessage& m, const IpEndpointName& remoteEndpoint );
virtual void ProcessPacket( const char *data, int size, const IpEndpointName& remoteEndpoint );
void addRequestHandler(RequestHandler* handler);