public void Serialize(ref Span <byte> buffer) { BinSerialize.WriteString(ref buffer, Comment); BinSerialize.WriteByte(ref buffer, Version); BinSerialize.WriteUInt(ref buffer, Hash); BinSerialize.WriteInt(ref buffer, ItemsCount); }
public int Serialize(ref Span <byte> buffer) { var index = 0; BinSerialize.WriteUInt(ref buffer, Checksum); index += 4; BinSerialize.WriteByte(ref buffer, (byte)MissionType); index += 1; return(index); // /*PayloadByteSize*/5; }
public int Serialize(ref Span <byte> buffer) { var index = 0; for (var i = 0; i < ArU32.Length; i++) { BinSerialize.WriteUInt(ref buffer, ArU32[i]); index += 4; } return(index); // /*PayloadByteSize*/16; }
public int Serialize(ref Span <byte> buffer) { var index = 0; BinSerialize.WriteUInt(ref buffer, ErrorStatus); index += 4; BinSerialize.WriteUInt(ref buffer, TimeBootMs); index += 4; BinSerialize.WriteUShort(ref buffer, BatteryStatus); index += 2; BinSerialize.WriteByte(ref buffer, (byte)ArmStatus); index += 1; BinSerialize.WriteByte(ref buffer, (byte)ChangeStatus); index += 1; return(index); // /*PayloadByteSize*/12; }
public int Serialize(ref Span <byte> buffer) { var index = 0; for (var i = 0; i < ArD.Length; i++) { BinSerialize.WriteDouble(ref buffer, ArD[i]); index += 8; } BinSerialize.WriteUInt(ref buffer, V3); index += 4; for (var i = 0; i < ArU32.Length; i++) { BinSerialize.WriteUInt(ref buffer, ArU32[i]); index += 4; } for (var i = 0; i < ArI32.Length; i++) { BinSerialize.WriteInt(ref buffer, ArI32[i]); index += 4; } for (var i = 0; i < ArF.Length; i++) { BinSerialize.WriteFloat(ref buffer, ArF[i]); index += 4; } BinSerialize.WriteUShort(ref buffer, V2); index += 2; for (var i = 0; i < ArU16.Length; i++) { BinSerialize.WriteUShort(ref buffer, ArU16[i]); index += 2; } for (var i = 0; i < ArI16.Length; i++) { BinSerialize.WriteShort(ref buffer, ArI16[i]); index += 2; } BinSerialize.WriteByte(ref buffer, (byte)V1); index += 1; for (var i = 0; i < ArU8.Length; i++) { BinSerialize.WriteByte(ref buffer, (byte)ArU8[i]); index += 1; } for (var i = 0; i < ArI8.Length; i++) { BinSerialize.WriteByte(ref buffer, (byte)ArI8[i]); index += 1; } unsafe { fixed(byte *bytePointer = buffer) fixed(char *charPointer = ArC) { Encoding.ASCII.GetBytes(charPointer, ArC.Length, bytePointer, ArC.Length); } } buffer = buffer.Slice(ArC.Length); index += ArC.Length; return(index); // /*PayloadByteSize*/91; }
public int Serialize(ref Span <byte> buffer) { var index = 0; for (var i = 0; i < ArD.Length; i++) { BinSerialize.WriteDouble(ref buffer, ArD[i]); index += 8; } BinSerialize.WriteUInt(ref buffer, V3); index += 4; for (var i = 0; i < ArU16.Length; i++) { BinSerialize.WriteUShort(ref buffer, ArU16[i]); index += 2; } return(index); // /*PayloadByteSize*/24; }
public int Serialize(ref Span <byte> buffer) { var index = 0; BinSerialize.WriteUInt(ref buffer, Utctime); index += 4; BinSerialize.WriteInt(ref buffer, Gpslat); index += 4; BinSerialize.WriteInt(ref buffer, Gpslon); index += 4; BinSerialize.WriteInt(ref buffer, Gpsalt); index += 4; BinSerialize.WriteInt(ref buffer, Baroaltmsl); index += 4; BinSerialize.WriteUInt(ref buffer, Accuracyhor); index += 4; BinSerialize.WriteUShort(ref buffer, Accuracyvert); index += 2; BinSerialize.WriteUShort(ref buffer, Accuracyvel); index += 2; BinSerialize.WriteShort(ref buffer, Velvert); index += 2; BinSerialize.WriteShort(ref buffer, Velns); index += 2; BinSerialize.WriteShort(ref buffer, Velew); index += 2; BinSerialize.WriteUShort(ref buffer, (ushort)State); index += 2; BinSerialize.WriteUShort(ref buffer, Squawk); index += 2; BinSerialize.WriteByte(ref buffer, (byte)Gpsfix); index += 1; BinSerialize.WriteByte(ref buffer, (byte)Numsats); index += 1; BinSerialize.WriteByte(ref buffer, (byte)Emergencystatus); index += 1; return(index); // /*PayloadByteSize*/41; }
public int Serialize(ref Span <byte> buffer) { var index = 0; BinSerialize.WriteUInt(ref buffer, Icao); index += 4; BinSerialize.WriteUShort(ref buffer, Stallspeed); index += 2; unsafe { fixed(byte *bytePointer = buffer) fixed(char *charPointer = Callsign) { Encoding.ASCII.GetBytes(charPointer, Callsign.Length, bytePointer, Callsign.Length); } } buffer = buffer.Slice(Callsign.Length); index += Callsign.Length; BinSerialize.WriteByte(ref buffer, (byte)Emittertype); index += 1; BinSerialize.WriteByte(ref buffer, (byte)Aircraftsize); index += 1; BinSerialize.WriteByte(ref buffer, (byte)Gpsoffsetlat); index += 1; BinSerialize.WriteByte(ref buffer, (byte)Gpsoffsetlon); index += 1; BinSerialize.WriteByte(ref buffer, (byte)Rfselect); index += 1; return(index); // /*PayloadByteSize*/20; }
public int Serialize(ref Span <byte> buffer) { var index = 0; for (var i = 0; i < ArU32.Length; i++) { BinSerialize.WriteUInt(ref buffer, ArU32[i]); index += 4; } for (var i = 0; i < ArU16.Length; i++) { BinSerialize.WriteUShort(ref buffer, ArU16[i]); index += 2; } BinSerialize.WriteByte(ref buffer, (byte)V1); index += 1; for (var i = 0; i < ArI8.Length; i++) { BinSerialize.WriteByte(ref buffer, (byte)ArI8[i]); index += 1; } for (var i = 0; i < ArU8.Length; i++) { BinSerialize.WriteByte(ref buffer, (byte)ArU8[i]); index += 1; } return(index); // /*PayloadByteSize*/33; }
public void Serialize(ref Span <byte> buffer) { BinSerialize.WritePackedUnsignedInteger(ref buffer, FieldsCount); BinSerialize.WritePackedUnsignedInteger(ref buffer, RecordsCount); BinSerialize.WriteUInt(ref buffer, DescriptionHash); }
public int Serialize(ref Span <byte> buffer) { var index = 0; BinSerialize.WriteULong(ref buffer, U64); index += 8; BinSerialize.WriteLong(ref buffer, S64); index += 8; BinSerialize.WriteDouble(ref buffer, D); index += 8; for (var i = 0; i < U64Array.Length; i++) { BinSerialize.WriteULong(ref buffer, U64Array[i]); index += 8; } for (var i = 0; i < S64Array.Length; i++) { BinSerialize.WriteLong(ref buffer, S64Array[i]); index += 8; } for (var i = 0; i < DArray.Length; i++) { BinSerialize.WriteDouble(ref buffer, DArray[i]); index += 8; } BinSerialize.WriteUInt(ref buffer, U32); index += 4; BinSerialize.WriteInt(ref buffer, S32); index += 4; BinSerialize.WriteFloat(ref buffer, F); index += 4; for (var i = 0; i < U32Array.Length; i++) { BinSerialize.WriteUInt(ref buffer, U32Array[i]); index += 4; } for (var i = 0; i < S32Array.Length; i++) { BinSerialize.WriteInt(ref buffer, S32Array[i]); index += 4; } for (var i = 0; i < FArray.Length; i++) { BinSerialize.WriteFloat(ref buffer, FArray[i]); index += 4; } BinSerialize.WriteUShort(ref buffer, U16); index += 2; BinSerialize.WriteShort(ref buffer, S16); index += 2; for (var i = 0; i < U16Array.Length; i++) { BinSerialize.WriteUShort(ref buffer, U16Array[i]); index += 2; } for (var i = 0; i < S16Array.Length; i++) { BinSerialize.WriteShort(ref buffer, S16Array[i]); index += 2; } BinSerialize.WriteByte(ref buffer, (byte)C); index += 1; unsafe { fixed(byte *bytePointer = buffer) fixed(char *charPointer = S) { Encoding.ASCII.GetBytes(charPointer, S.Length, bytePointer, S.Length); } } buffer = buffer.Slice(S.Length); index += S.Length; BinSerialize.WriteByte(ref buffer, (byte)U8); index += 1; BinSerialize.WriteByte(ref buffer, (byte)S8); index += 1; for (var i = 0; i < U8Array.Length; i++) { BinSerialize.WriteByte(ref buffer, (byte)U8Array[i]); index += 1; } for (var i = 0; i < S8Array.Length; i++) { BinSerialize.WriteByte(ref buffer, (byte)S8Array[i]); index += 1; } return(index); // /*PayloadByteSize*/179; }
public void Serialize(ref Span <byte> buffer) { BinSerialize.WriteUInt(ref buffer, DescHash); WorkModes.Serialize(ref buffer); }