示例#1
0
 public override void Deserialize(ref ReadOnlySpan <byte> buffer)
 {
     UavIdFilterEnabled = BinSerialize.ReadBool(ref buffer);
     UavSystemId        = BinSerialize.ReadByte(ref buffer);
     UavComponentId     = BinSerialize.ReadByte(ref buffer);
     WpIndex            = BinSerialize.ReadUShort(ref buffer);
 }
 public void Deserialize(ref ReadOnlySpan <byte> buffer)
 {
     IsEnabled = BinSerialize.ReadBool(ref buffer);
     if (!IsEnabled)
     {
         return;
     }
     Session = new SessionMetadata();
     Session.Deserialize(ref buffer);
 }
示例#3
0
        public void Deserialize(ref ReadOnlySpan <byte> buffer)
        {
            Index = BinSerialize.ReadPackedUnsignedInteger(ref buffer);
            var typeEnum = (Pv2ParamTypeEnum)BinSerialize.ReadPackedUnsignedInteger(ref buffer);

            Type = Pv2ParamInterface.CreateType(typeEnum);
            var isContainValue = BinSerialize.ReadBool(ref buffer);

            Type.Deserialize(ref buffer);
            Value = null;
            if (!isContainValue)
            {
                return;
            }
            Value = Pv2ParamInterface.CreateValue(typeEnum);
            Value.Deserialize(ref buffer);
        }
示例#4
0
 public override void Deserialize(ref ReadOnlySpan <byte> buffer)
 {
     base.Deserialize(ref buffer);
     RawValue = BinSerialize.ReadBool(ref buffer);
 }