public MavLink4Net.Messages.IMessage Deserialize(System.IO.BinaryReader reader)
 {
     MavLink4Net.Messages.Common.SerialControlMessage message = new MavLink4Net.Messages.Common.SerialControlMessage();
     message.Baudrate = reader.ReadUInt32();
     message.Timeout  = reader.ReadUInt16();
     message.Device   = ((MavLink4Net.Messages.Common.SerialControlDev)(reader.ReadByte()));
     message.Flags    = ((MavLink4Net.Messages.Common.SerialControlFlag)(reader.ReadByte()));
     message.Count    = reader.ReadByte();
     message.Data[0]  = reader.ReadByte();
     message.Data[1]  = reader.ReadByte();
     message.Data[2]  = reader.ReadByte();
     message.Data[3]  = reader.ReadByte();
     message.Data[4]  = reader.ReadByte();
     message.Data[5]  = reader.ReadByte();
     message.Data[6]  = reader.ReadByte();
     message.Data[7]  = reader.ReadByte();
     message.Data[8]  = reader.ReadByte();
     message.Data[9]  = reader.ReadByte();
     message.Data[10] = reader.ReadByte();
     message.Data[11] = reader.ReadByte();
     message.Data[12] = reader.ReadByte();
     message.Data[13] = reader.ReadByte();
     message.Data[14] = reader.ReadByte();
     message.Data[15] = reader.ReadByte();
     message.Data[16] = reader.ReadByte();
     message.Data[17] = reader.ReadByte();
     message.Data[18] = reader.ReadByte();
     message.Data[19] = reader.ReadByte();
     message.Data[20] = reader.ReadByte();
     message.Data[21] = reader.ReadByte();
     message.Data[22] = reader.ReadByte();
     message.Data[23] = reader.ReadByte();
     message.Data[24] = reader.ReadByte();
     message.Data[25] = reader.ReadByte();
     message.Data[26] = reader.ReadByte();
     message.Data[27] = reader.ReadByte();
     message.Data[28] = reader.ReadByte();
     message.Data[29] = reader.ReadByte();
     message.Data[30] = reader.ReadByte();
     message.Data[31] = reader.ReadByte();
     message.Data[32] = reader.ReadByte();
     message.Data[33] = reader.ReadByte();
     message.Data[34] = reader.ReadByte();
     message.Data[35] = reader.ReadByte();
     message.Data[36] = reader.ReadByte();
     message.Data[37] = reader.ReadByte();
     message.Data[38] = reader.ReadByte();
     message.Data[39] = reader.ReadByte();
     message.Data[40] = reader.ReadByte();
     message.Data[41] = reader.ReadByte();
     message.Data[42] = reader.ReadByte();
     message.Data[43] = reader.ReadByte();
     message.Data[44] = reader.ReadByte();
     message.Data[45] = reader.ReadByte();
     message.Data[46] = reader.ReadByte();
     message.Data[47] = reader.ReadByte();
     message.Data[48] = reader.ReadByte();
     message.Data[49] = reader.ReadByte();
     message.Data[50] = reader.ReadByte();
     message.Data[51] = reader.ReadByte();
     message.Data[52] = reader.ReadByte();
     message.Data[53] = reader.ReadByte();
     message.Data[54] = reader.ReadByte();
     message.Data[55] = reader.ReadByte();
     message.Data[56] = reader.ReadByte();
     message.Data[57] = reader.ReadByte();
     message.Data[58] = reader.ReadByte();
     message.Data[59] = reader.ReadByte();
     message.Data[60] = reader.ReadByte();
     message.Data[61] = reader.ReadByte();
     message.Data[62] = reader.ReadByte();
     message.Data[63] = reader.ReadByte();
     message.Data[64] = reader.ReadByte();
     message.Data[65] = reader.ReadByte();
     message.Data[66] = reader.ReadByte();
     message.Data[67] = reader.ReadByte();
     message.Data[68] = reader.ReadByte();
     message.Data[69] = reader.ReadByte();
     return(message);
 }
 public void Serialize(System.IO.BinaryWriter writer, MavLink4Net.Messages.IMessage message)
 {
     MavLink4Net.Messages.Common.SerialControlMessage tMessage = message as MavLink4Net.Messages.Common.SerialControlMessage;
     writer.Write(tMessage.Baudrate);
     writer.Write(tMessage.Timeout);
     writer.Write(((byte)(tMessage.Device)));
     writer.Write(((byte)(tMessage.Flags)));
     writer.Write(tMessage.Count);
     writer.Write(tMessage.Data[0]);
     writer.Write(tMessage.Data[1]);
     writer.Write(tMessage.Data[2]);
     writer.Write(tMessage.Data[3]);
     writer.Write(tMessage.Data[4]);
     writer.Write(tMessage.Data[5]);
     writer.Write(tMessage.Data[6]);
     writer.Write(tMessage.Data[7]);
     writer.Write(tMessage.Data[8]);
     writer.Write(tMessage.Data[9]);
     writer.Write(tMessage.Data[10]);
     writer.Write(tMessage.Data[11]);
     writer.Write(tMessage.Data[12]);
     writer.Write(tMessage.Data[13]);
     writer.Write(tMessage.Data[14]);
     writer.Write(tMessage.Data[15]);
     writer.Write(tMessage.Data[16]);
     writer.Write(tMessage.Data[17]);
     writer.Write(tMessage.Data[18]);
     writer.Write(tMessage.Data[19]);
     writer.Write(tMessage.Data[20]);
     writer.Write(tMessage.Data[21]);
     writer.Write(tMessage.Data[22]);
     writer.Write(tMessage.Data[23]);
     writer.Write(tMessage.Data[24]);
     writer.Write(tMessage.Data[25]);
     writer.Write(tMessage.Data[26]);
     writer.Write(tMessage.Data[27]);
     writer.Write(tMessage.Data[28]);
     writer.Write(tMessage.Data[29]);
     writer.Write(tMessage.Data[30]);
     writer.Write(tMessage.Data[31]);
     writer.Write(tMessage.Data[32]);
     writer.Write(tMessage.Data[33]);
     writer.Write(tMessage.Data[34]);
     writer.Write(tMessage.Data[35]);
     writer.Write(tMessage.Data[36]);
     writer.Write(tMessage.Data[37]);
     writer.Write(tMessage.Data[38]);
     writer.Write(tMessage.Data[39]);
     writer.Write(tMessage.Data[40]);
     writer.Write(tMessage.Data[41]);
     writer.Write(tMessage.Data[42]);
     writer.Write(tMessage.Data[43]);
     writer.Write(tMessage.Data[44]);
     writer.Write(tMessage.Data[45]);
     writer.Write(tMessage.Data[46]);
     writer.Write(tMessage.Data[47]);
     writer.Write(tMessage.Data[48]);
     writer.Write(tMessage.Data[49]);
     writer.Write(tMessage.Data[50]);
     writer.Write(tMessage.Data[51]);
     writer.Write(tMessage.Data[52]);
     writer.Write(tMessage.Data[53]);
     writer.Write(tMessage.Data[54]);
     writer.Write(tMessage.Data[55]);
     writer.Write(tMessage.Data[56]);
     writer.Write(tMessage.Data[57]);
     writer.Write(tMessage.Data[58]);
     writer.Write(tMessage.Data[59]);
     writer.Write(tMessage.Data[60]);
     writer.Write(tMessage.Data[61]);
     writer.Write(tMessage.Data[62]);
     writer.Write(tMessage.Data[63]);
     writer.Write(tMessage.Data[64]);
     writer.Write(tMessage.Data[65]);
     writer.Write(tMessage.Data[66]);
     writer.Write(tMessage.Data[67]);
     writer.Write(tMessage.Data[68]);
     writer.Write(tMessage.Data[69]);
 }