private UdpPacket GetResponse(byte[] bytes) { UdpPacket packet = UdpPacket.ParseData(bytes); if (packet != null) { byte id = packet.Id; //packet.Data[0]; if (registers[id] != null) { if (registers[id].Update(packet.Data)) { byte[] data = registers[id].SendUpdate; if (data == null) { data = registers[id].ResendUpdate; } if (data == null) { return(null); } return(new UdpPacket(id, data)); } } } return(null); }