Esempio n. 1
0
 /// <summary>
 /// Start the artnet engine.
 /// Throw excpetion if start failed
 /// </summary>
 public void Start()
 {
     if (poller == null)
     {
         ArtNetPoller.DelayBetweenPoll = 30000;
         poller = new ArtNetPoller();
         poller.Start();
     }
     if (dmxSender == null)
     {
         dmxSender = new ArtNetDmxSender(copyDmxBufferCallback);
         dmxSender.TargetNodeIp = null; // no artnet node selected
         dmxSender.Start();
     }
     StartListener();
 }
Esempio n. 2
0
 /// <summary>
 /// Stop the current ArtNet engine. NEver failed
 /// </summary>
 public void Stop()
 {
     try
     {
         if (poller != null)
         {
             poller.Stop();
             poller = null;
         }
         if (dmxSender != null)
         {
             dmxSender.Stop();
             dmxSender = null;
         }
         StopListener();
     }
     catch (Exception ex)
     {
         // TODO : log excpetion in Stop
         Debug.WriteLine($"EXCEPTION in SimplateArtNetEngine.Stop() : {ex.ToString()}");
     }
 }