Ejemplo n.º 1
0
 void oscReceiver_ReceivedBundle(object sender, OscBundleEventArgs e)
 {
     e.AutoUnpack = false;
     if (topic == null || e.Bundle.FirstAddress.StartsWith(topic))
     {
         T packet = packetConverter.FromOscBundle(e.Bundle, topic);
         if (packet != null)
         {
             OnReceivedPacket(packet);
         }
     }
 }
Ejemplo n.º 2
0
 // Invoke the ReceivedBundle event
 protected virtual void OnReceivedBundle(OscBundleEventArgs e)
 {
     if (ReceivedBundle != null)
     {
         ReceivedBundle(this, e);
     }
     if (e.AutoUnpack)
     {
         foreach (OscData part in e.Bundle.Parts)
         {
             if (part is OscMessage)
             {
                 OnReceivedMessage(new OscMessageEventArgs(e.Timestamp, (OscMessage)part));
             }
             else if (part is OscBundle)
             {
                 OnReceivedBundle(new OscBundleEventArgs(e.Timestamp, (OscBundle)part));
             }
         }
     }
 }
Ejemplo n.º 3
0
 // Invoke the ReceivedBundle event
 protected virtual void OnReceivedBundle(OscBundleEventArgs e)
 {
     if (ReceivedBundle != null) { ReceivedBundle(this, e); }
     if (e.AutoUnpack)
     {
         foreach (OscData part in e.Bundle.Parts)
         {
             if (part is OscMessage)
             {
                 OnReceivedMessage(new OscMessageEventArgs(e.Timestamp, (OscMessage)part));
             }
             else if (part is OscBundle)
             {
                 OnReceivedBundle(new OscBundleEventArgs(e.Timestamp, (OscBundle)part));
             }
         }
     }
 }