Esempio n. 1
1
        public static ArtNetPacket Create(ArtNetReceiveData data)
        {
            switch ((ArtNetOpCodes)data.OpCode)
            {
                case ArtNetOpCodes.Poll:
                    return new ArtPollPacket(data);
                case ArtNetOpCodes.PollReply:
                    return new ArtPollReplyPacket(data);
                case ArtNetOpCodes.Dmx:
                    return new ArtNetDmxPacket(data);
                case ArtNetOpCodes.TodRequest:
                    return new ArtTodRequestPacket(data);
                case ArtNetOpCodes.TodData:
                    return new ArtTodDataPacket(data);
                case ArtNetOpCodes.TodControl:
                    return new ArtTodControlPacket(data);
            }

            return null;

        }
        public ArtTodDataPacket(ArtNetReceiveData data)
            : base(data)
        {

        }
        public ArtTodRequestPacket(ArtNetReceiveData data)
            : base(data)
        {

        }
Esempio n. 4
0
 public void StartRecieve()
 {
     try
     {
         EndPoint localPort = new IPEndPoint(IPAddress.Any, Port);
         ArtNetReceiveData recieveState = new ArtNetReceiveData();
         BeginReceiveFrom(recieveState.buffer, 0, recieveState.bufferSize, SocketFlags.None, ref localPort, new AsyncCallback(OnRecieve), recieveState);
     }
     catch (Exception ex)
     {
         OnUnhandledException(new ApplicationException("An error ocurred while trying to start recieving ArtNet.", ex));
     }
 }
        public ArtTodControlPacket(ArtNetReceiveData data)
            : base(data)
        {

        }
Esempio n. 6
0
 public ArtNetPacket(ArtNetReceiveData data)
 {
     ArtNetBinaryReader packetReader = new ArtNetBinaryReader(new MemoryStream(data.buffer));
     ReadData(packetReader);
 }
        public ArtPollReplyPacket(ArtNetReceiveData data)
            : base(data)
        {

        }
Esempio n. 8
0
        public ArtNetDmxPacket(ArtNetReceiveData data)
            : base(data)
        {

        }