public bool Decode(PduMarshaler marshaler)
 {
     try
     {
         this.CapabilityType = (CapabilityType_Values)marshaler.ReadUInt16();
         this.CapabilityLength = marshaler.ReadUInt16();
         this.Version = (CAPABILITY_VERSION)marshaler.ReadUInt32();
         return true;
     }
     catch
     {
         marshaler.Reset();
         throw new PDUDecodeException(this.GetType(), marshaler.ReadToEnd());
     }
 }
 public GENERAL_CAPS_SET(CAPABILITY_VERSION ver)
     : base(CapabilityType_Values.CAP_GENERAL_TYPE, ver)
 {
     // A 16-bit unsigned integer. This field MUST be set to 1.
     this.protocolMajorVersion = protocolMajorVersion_Values.V1;
     // A 32-bit unsigned integer that is currently reserved for future use, and MUST be set to 0.
     this.ioCode2 = ioCode2_Values.V1;
     // A 32-bit unsigned integer that specifies extended flags. The extraFlags1 field MUST be set as a bitmask of the following value.
     this.extraFlags1 = extraFlags1_Values.ENABLE_ASYNCIO;
     // A 32-bit unsigned integer that is currently reserved for future use, and MUST be set to 0.
     this.extraFlags2 = extraFlags2_Values.V1;
     this.Header.CapabilityLength = 44;
 }
 public CAPABILITY_HEADER(CapabilityType_Values type, CAPABILITY_VERSION ver)
 {
     this.CapabilityType = type;
     this.Version = ver;
 }
 public CAPABILITY_SET(CapabilityType_Values type, CAPABILITY_VERSION ver)
 {
     this.Header = new CAPABILITY_HEADER(type, ver);
 }