예제 #1
0
        private void HandleXNLDataPacket(object sender, XNLEventArgs e)
        {
            XNLPacket pkt = e.Packet;

            if (pkt.IsXCMP)
            {
                DataPacket dp   = (DataPacket)pkt;
                XCMPPacket xcmp = dp.XCMP;
                switch (xcmp.OpCode)
                {
                case XCMPOpCode.DeviceinitStatusBroadcast:
                    DeviceInitStatusBroadcast disb = (DeviceInitStatusBroadcast)xcmp;
                    version = disb.Version;
                    if (disb.InitComplete)
                    {
                        this.ready = true;
                    }
                    break;

                default:
                    //Console.WriteLine("Got Unknown XCMP Packet {0}", dp.XCMP);
                    this.receivedQueue.Add(xcmp);
                    break;
                }
            }
        }
예제 #2
0
 public XNLXCMPPacket(RadioID id, XNLPacket pkt) : base(PacketType.XnlXCMPPacket)
 {
     this.id   = id;
     this.data = pkt.Encode();
 }
예제 #3
0
 public XNLXCMPPacket(byte[] data) : base(data)
 {
     this.xnl = XNLPacket.Decode(this.data);
 }