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; } } }
public XNLXCMPPacket(RadioID id, XNLPacket pkt) : base(PacketType.XnlXCMPPacket) { this.id = id; this.data = pkt.Encode(); }
public XNLXCMPPacket(byte[] data) : base(data) { this.xnl = XNLPacket.Decode(this.data); }