Example #1
0
 public void Parse(Encoder s)
 {
     cmdId = s.ReadUshort();
 }
Example #2
0
 public void Parse(Encoder s)
 {
     id = s.ReadChar();
     capab = s.ReadUshort();
 }
Example #3
0
 public void Parse(Encoder s)
 {
     productId = s.ReadUshort();
     swVersion = s.ReadUshort();
     string str;
     while ((str = s.ReadString()) != null)
         info.Add(str);
 }
Example #4
0
 public void Parse(Encoder s)
 {
     records = s.ReadUshort();
 }
Example #5
0
        public void Parse(Encoder s)
        {
            packetType = s.Read<PacketType>();
            reserved1 = s.ReadByte();
            reserved2 = s.ReadByte();
            reserved3 = s.ReadByte();
            packetId = s.Read<PacketId>();
            reserved = s.ReadUshort();
            dataSize = s.ReadUint();

            switch (packetId)
            {
                case PacketId.StartSession:
                    data = new PSessionStarted();
                    data.Parse(s);
                    break;
                case PacketId.ProductData:
                    data = new PProductData();
                    data.Parse(s);
                    break;
                case PacketId.ProtocolArray:
                    data = new PProtocolArray();
                    data.Parse(s);
                    break;
                case PacketId.RecordCount:
                    data = new PRecords();
                    data.Parse(s);
                    break;
                case PacketId.TrackData:
                    data = new PTrkData();
                    data.Parse(s);
                    break;
                case PacketId.TrackHeader:
                    data = new PTrackHeader();
                    data.Parse(s);
                    break;
                case PacketId.TransferComplete:
                    data = new PXferComplete();
                    data.Parse(s);
                    break;
                case PacketId.CourseTrackData:
                    data = new PTrkData();
                    data.Parse(s);
                    break;
            }
        }