public void Serialize(System.IO.BinaryWriter writer, MavLink4Net.Messages.IMessage message) { MavLink4Net.Messages.Common.SetPositionTargetLocalNedMessage tMessage = message as MavLink4Net.Messages.Common.SetPositionTargetLocalNedMessage; writer.Write(tMessage.TimeBootMs); writer.Write(tMessage.X); writer.Write(tMessage.Y); writer.Write(tMessage.Z); writer.Write(tMessage.Vx); writer.Write(tMessage.Vy); writer.Write(tMessage.Vz); writer.Write(tMessage.Afx); writer.Write(tMessage.Afy); writer.Write(tMessage.Afz); writer.Write(tMessage.Yaw); writer.Write(tMessage.YawRate); writer.Write(tMessage.TypeMask); writer.Write(tMessage.TargetSystem); writer.Write(tMessage.TargetComponent); writer.Write(((byte)(tMessage.CoordinateFrame))); }
public MavLink4Net.Messages.IMessage Deserialize(System.IO.BinaryReader reader) { MavLink4Net.Messages.Common.SetPositionTargetLocalNedMessage message = new MavLink4Net.Messages.Common.SetPositionTargetLocalNedMessage(); message.TimeBootMs = reader.ReadUInt32(); message.X = reader.ReadSingle(); message.Y = reader.ReadSingle(); message.Z = reader.ReadSingle(); message.Vx = reader.ReadSingle(); message.Vy = reader.ReadSingle(); message.Vz = reader.ReadSingle(); message.Afx = reader.ReadSingle(); message.Afy = reader.ReadSingle(); message.Afz = reader.ReadSingle(); message.Yaw = reader.ReadSingle(); message.YawRate = reader.ReadSingle(); message.TypeMask = reader.ReadUInt16(); message.TargetSystem = reader.ReadByte(); message.TargetComponent = reader.ReadByte(); message.CoordinateFrame = ((MavLink4Net.Messages.Common.Frame)(reader.ReadByte())); return(message); }