Пример #1
0
        private void Stop()
        {
            if (acnPortExplorer != null)
            {
                acnPortExplorer.Stop();
                acnPortExplorer = null;
            }

            if (Sockets != null)
            {
                foreach (StreamingAcnSocket curr in Sockets)
                {
                    curr.Close();
                }
                Sockets = null;
            }
        }
Пример #2
0
        private void Start(CardInfo networkCard, IEnumerable <int> universes)
        {
            //socket = new StreamingAcnSocket(Guid.NewGuid(), "Acn Data Matrix", callBackClass);

            //socket.Open(networkCard.IpAddress);

            Sockets = new List <StreamingAcnSocket>();
            foreach (int universe in universes)
            {
                StreamingAcnSocket newSocket = new StreamingAcnSocket(Guid.NewGuid(), "Acn Data Matrix");
                newSocket.Open(networkCard.IpAddress);
                newSocket.JoinDmxUniverse(universe);
                Sockets.Add(newSocket);
            }

            acnPortExplorer = new RdmNetEndPointExplorer();
            acnPortExplorer.LocalAdapter      = networkCard.IpAddress;
            acnPortExplorer.NewEndpointFound += acnPortExplorer_NewEndpointFound;
            acnPortExplorer.Start();
        }