Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

From Stephan Huber, further work on osc plugin

  • Loading branch information...
commit a219edf259c0994c5c86b4e981eeea5949c17757 1 parent 511db76
Robert OSFIELD authored
View
16 src/osgPlugins/osc/OscDevice.cpp
@@ -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
1  src/osgPlugins/osc/OscDevice.hpp
@@ -70,6 +70,7 @@ class OscDevice : public osgGA::Device, OpenThreads::Thread, osc::OscPacketListe
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);
Please sign in to comment.
Something went wrong with that request. Please try again.