Exemplo n.º 1
0
        public PacketLocation(List <byte> data)
        {
            if (Parsing(ref data) == false)
            {
                MessageBox.Show("Not correct data", "Warning", MessageBoxButton.OK);
                return;
            }
            VerPack     = WorkBuffer.GetByte(ref data);
            Packet_Time = WorkBuffer.GetUInt64(ref data);
            Latitude    = WorkBuffer.GetFloat(ref data);
            Longitude   = WorkBuffer.GetFloat(ref data);
            Altitude    = WorkBuffer.GetUInt16(ref data);
            Fix         = WorkBuffer.GetByte(ref data);
            Hdop        = WorkBuffer.GetByte(ref data);
            Num         = WorkBuffer.GetByte(ref data);
            Num        &= 0x7F;

            PLMN = WorkBuffer.GetUInt32(ref data);
            for (int i = 0; i < CCID.Length; i++)
            {
                CCID[i] = WorkBuffer.GetByte(ref data);
            }

            for (int i = 0; i < (Num); i++)
            {
                cellInfo.Add(new CellInfo(data));
            }

            CRC32 = WorkBuffer.GetUInt32(ref data);
        }
        public PacketResponseOptions(List <byte> data)
        {
            if (Parsing(ref data) == false)
            {
                MessageBox.Show("Not correct data", "Warning", MessageBoxButton.OK);
                return;
            }

            NewTime = WorkBuffer.GetUInt64(ref data);

            ActivityPeriod  = WorkBuffer.GetByte(ref data);
            Indication      = WorkBuffer.GetByte(ref data);
            TelemetryPeriod = WorkBuffer.GetUInt16(ref data);
            ComServer       = new CommandFromServer(data);

            CRC32 = WorkBuffer.GetUInt32(ref data);
        }
Exemplo n.º 3
0
        private byte[] CCID = new byte[20]; // CCID of device

        public PacketActivity(List <byte> data)
        {
            if (Parsing(ref data) == false)
            {
                MessageBox.Show("Not correct data", "Warning", MessageBoxButton.OK);
                return;
            }
            Packet_Time  = WorkBuffer.GetUInt64(ref data);
            Step         = WorkBuffer.GetUInt16(ref data);
            Hi_Act_Time  = WorkBuffer.GetUInt16(ref data);
            Low_Act_Time = WorkBuffer.GetUInt16(ref data);
            CSQ          = WorkBuffer.GetFloat(ref data);
            Charge       = WorkBuffer.GetByte(ref data);
            for (int i = 0; i < CCID.Length; i++)
            {
                CCID[i] = WorkBuffer.GetByte(ref data);
            }
            CRC32 = WorkBuffer.GetUInt32(ref data);
        }
        public PacketTelemetry(List <byte> data)
        {
            if (Parsing(ref data) == false)
            {
                MessageBox.Show("Not correct data", "Warning", MessageBoxButton.OK);
                return;
            }
            Packet_Time = WorkBuffer.GetUInt64(ref data);
            Num         = WorkBuffer.GetUInt16(ref data);

            for (int i = 0; i < CCID.Length; i++)
            {
                CCID[i] = WorkBuffer.GetByte(ref data);
            }

            for (int i = 0; i < Num; i++)
            {
                TMList.Add(new TelemetryType(data));
            }

            CRC32 = WorkBuffer.GetUInt32(ref data);
        }
Exemplo n.º 5
0
        }                                          // RSSI base station

        public CellInfo(List <byte> data)
        {
            LAC     = WorkBuffer.GetUInt16(ref data);
            CELL_ID = WorkBuffer.GetUInt32(ref data);
            RSSI    = WorkBuffer.GetByte(ref data);
        }