Beispiel #1
0
 public void Serialize(System.IO.BinaryWriter writer, MavLink4Net.Messages.IMessage message)
 {
     MavLink4Net.Messages.Common.CommandLongMessage tMessage = message as MavLink4Net.Messages.Common.CommandLongMessage;
     writer.Write(tMessage.Param1);
     writer.Write(tMessage.Param2);
     writer.Write(tMessage.Param3);
     writer.Write(tMessage.Param4);
     writer.Write(tMessage.Param5);
     writer.Write(tMessage.Param6);
     writer.Write(tMessage.Param7);
     writer.Write(((ushort)(tMessage.Command)));
     writer.Write(tMessage.TargetSystem);
     writer.Write(tMessage.TargetComponent);
     writer.Write(tMessage.Confirmation);
 }
Beispiel #2
0
 public MavLink4Net.Messages.IMessage Deserialize(System.IO.BinaryReader reader)
 {
     MavLink4Net.Messages.Common.CommandLongMessage message = new MavLink4Net.Messages.Common.CommandLongMessage();
     message.Param1          = reader.ReadSingle();
     message.Param2          = reader.ReadSingle();
     message.Param3          = reader.ReadSingle();
     message.Param4          = reader.ReadSingle();
     message.Param5          = reader.ReadSingle();
     message.Param6          = reader.ReadSingle();
     message.Param7          = reader.ReadSingle();
     message.Command         = ((MavLink4Net.Messages.Common.Cmd)(reader.ReadUInt16()));
     message.TargetSystem    = reader.ReadByte();
     message.TargetComponent = reader.ReadByte();
     message.Confirmation    = reader.ReadByte();
     return(message);
 }