void ConcreteOscFunction_onOscEventReceived(object sender, OscEventReceivedEventArgs e)
 {
     if ((String.Compare(_function.OscLabel, e.OscEvent.OscLabel) == 0) && (String.Compare(_function.OscEvent, e.OscEvent.OscCommand.ToString()) == 0))
     {
         if ((_function.OscValue == -1) || (_function.OscValue == e.OscEvent.getOscData))
         {
             LogHelper.Log(LogLevel.Info, String.Format("---   [{0}]  Device={1} OscEvent:{2}", DateTime.Now.ToShortTimeString(), e.OscDevice, (e.OscEvent == null ? "<null>" : e.OscEvent.ToString())));
             onFunctionStart();
         }
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Private event handler method, to handle an osc nuvo event message.
        /// NOTE: Only osc servers with a defined <ListenPort> will received osc messages.
        /// Simple clients with <SendPort> only, will not receive messages.
        /// </summary>
        /// <param name="sender">Pointer, to the sender of the event.</param>
        /// <param name="e">Event Argument, contains the osc nuvo event message.</param>
        private void _oscDriver_onOscNuvoEventReceived(object sender, OscEventReceivedEventArgs e)
        {
            _log.Trace(m => m("OSCC.onOscNuvoEventReceived: Osc Device (with id {0}) osc event received: {1}", e.OscDevice, e.OscEvent.ToString()));

            if (e.OscEvent.OscLabel.Contains("/Generic"))
            {
                if (_genericZoneId > -1)
                {
                    processOscNuvoEventAsServer(new Address(e.OscDeviceId, _genericZoneId), e.OscEvent);
                }
            }
            else
            {
                processOscNuvoEventAsServer(new Address(e.OscDeviceId, e.OscEvent.getZoneId), e.OscEvent);
            }
        }
Ejemplo n.º 3
0
 static void HostConsole_onOscEventReceived(object sender, OscEventReceivedEventArgs e)
 {
     LogHelper.Log(LogLevel.Info, String.Format(">->   [{0}]  Device={1} OscEvent:{2}", DateTime.Now.ToShortTimeString(), e.OscDevice, (e.OscEvent == null?"<null>":e.OscEvent.ToString())));
 }