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); }
private byte[] CCID = new byte[20]; // CCID of device public PacketRequestOptions(List <byte> data) { if (Parsing(ref data) == false) { MessageBox.Show("Not correct data", "Warning", MessageBoxButton.OK); return; } Packet_Time = WorkBuffer.GetUInt64(ref data); for (int i = 0; i < CCID.Length; i++) { CCID[i] = WorkBuffer.GetByte(ref data); } CRC32 = WorkBuffer.GetUInt32(ref data); }
public bool Parsing(ref List <byte> data) { int length = data.Count; Type.Check(WorkBuffer.GetByte(ref data)); if (Type.type == PacketType.TypePacket.Null) { return(false); } Seq = WorkBuffer.GetUInt32(ref data); return(true); }
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); }
private E_Event_Result Update; // State update (#EER_TRUE if update is need, else #EER_FALSE) public PacketUpdateResponse(List <byte> data) { if (Parsing(ref data) == false) { MessageBox.Show("Not correct data", "Warning", MessageBoxButton.OK); return; } FileSize = WorkBuffer.GetUInt32(ref data); FileCRC = WorkBuffer.GetUInt32(ref data); for (int i = 0; i < Version.Length; i++) { Version[i] = WorkBuffer.GetByte(ref data); } Update = (E_Event_Result)WorkBuffer.GetByte(ref data); CRC32 = WorkBuffer.GetUInt32(ref data); }
private byte[] CCID = new byte[20]; // CCID of device public PacketStatistic(List <byte> data) { if (Parsing(ref data) == false) { MessageBox.Show("Not correct data", "Warning", MessageBoxButton.OK); return; } Mode = (CommandFromServer.Type)WorkBuffer.GetByte(ref data); RX_packets = WorkBuffer.GetUInt32(ref data); TX_packets = WorkBuffer.GetUInt32(ref data); Out_bytes = WorkBuffer.GetUInt32(ref data); In_bytes = WorkBuffer.GetUInt32(ref data); for (int i = 0; i < CCID.Length; i++) { CCID[i] = WorkBuffer.GetByte(ref data); } CRC32 = WorkBuffer.GetUInt32(ref data); }
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); }
private byte[] CCID = new byte[20]; // CCID of device public PacketResultUpdate(List<byte> data) { if (Parsing(ref data) == false) { MessageBox.Show("Not correct data", "Warning", MessageBoxButton.OK); return; } Packet_Time = WorkBuffer.GetUInt64(ref data); for (int i = 0; i < Version.Length; i++) { Version[i] = WorkBuffer.GetByte(ref data); } Update = (E_Status_Update)WorkBuffer.GetByte(ref data); for (int i = 0; i < CCID.Length; i++) { CCID[i] = WorkBuffer.GetByte(ref data); } CRC32 = WorkBuffer.GetUInt32(ref data); }
private byte[] CCID = new byte[20]; // CCID of device public PacketDeviceInfo(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.GetByte(ref data); Error = (E_Device_Error)WorkBuffer.GetByte(ref data); Warning = (E_Device_Warning)WorkBuffer.GetByte(ref data); Info = (E_Device_Info)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); }
} /*!< Number of point*/ public GeoFence(List <byte> data) { Latitude = WorkBuffer.GetFloat(ref data); Longitude = WorkBuffer.GetFloat(ref data); Index = WorkBuffer.GetByte(ref data); }
} // RSSI base station public CellInfo(List <byte> data) { LAC = WorkBuffer.GetUInt16(ref data); CELL_ID = WorkBuffer.GetUInt32(ref data); RSSI = WorkBuffer.GetByte(ref data); }