public void Serialize(System.IO.BinaryWriter writer, MavLink4Net.Messages.IMessage message) { MavLink4Net.Messages.Common.PingMessage tMessage = message as MavLink4Net.Messages.Common.PingMessage; writer.Write(tMessage.TimeUsec); writer.Write(tMessage.Seq); writer.Write(tMessage.TargetSystem); writer.Write(tMessage.TargetComponent); }
public MavLink4Net.Messages.IMessage Deserialize(System.IO.BinaryReader reader) { MavLink4Net.Messages.Common.PingMessage message = new MavLink4Net.Messages.Common.PingMessage(); message.TimeUsec = reader.ReadUInt64(); message.Seq = reader.ReadUInt32(); message.TargetSystem = reader.ReadByte(); message.TargetComponent = reader.ReadByte(); return message; }