/// <summary> /// Constructor /// </summary> /// <param name="function">The URB function.</param> /// <param name="requestId">An ID that uniquely identifies the TRANSFER_IN_REQUEST or TRANSFER_OUT_REQUEST.</param> /// <param name="noAck">f this bit is nonzero the client should not send a URB_COMPLETION message for this /// TRANSFER_OUT_REQUEST. This bit can be nonzero only if the NoAckIsochWriteJitterBufferSizeInMs field /// in USB_DEVICE_CAPABILITIES is nonzero and URB Function is set to URB_FUNCTION_ISOCH_TRANSFER. /// If the RequestId field is set to TRANSFER_IN_REQUEST, this field MUST be set to zero.</param> public UrbBuilder(URB_FUNCTIONID function, uint requestId, byte noAck) { this.function = function; this.requestId = requestId; this.noAck = noAck; }
public TS_URB_CONTROL_GET_STATUS_REQUEST(uint requestId, byte noAck, URB_FUNCTIONID functionId) { header = new TS_URB_HEADER(); header.URB_Function = functionId; header.RequestId = requestId; header.NoAck = noAck; header.Size = 12; }
public TS_URB_CONTROL_FEATURE_REQUEST(uint requestId, bool noAck, URB_FUNCTIONID functionId) { header = new TS_URB_HEADER(); header.URB_Function = functionId; header.RequestId = requestId; header.NoAck = (byte)(noAck ? 1 : 0); }
public TS_URB_PIPE_REQUEST(uint requestId, byte noAck, URB_FUNCTIONID functionId) { header = new TS_URB_HEADER(); header.URB_Function = functionId; header.RequestId = requestId; header.NoAck = noAck; }
/// <summary> /// Decode this PDU from the PduMarshaler. /// </summary> /// <param name="marshaler">This is used to decode the fields of this PDU.</param> public override bool Decode(PduMarshaler marshaler) { try { Size = marshaler.ReadUInt16(); URBFunction = (URB_FUNCTIONID)marshaler.ReadUInt16(); uint temp = marshaler.ReadUInt32(); noAck = (byte)(temp >> 31); requestId = temp & 0x7FFFFFFF; } catch (Exception) { return false; } return true; }
public TS_URB_CONTROL_VENDOR_OR_CLASS_REQUEST(uint requestId, byte noAck, URB_FUNCTIONID functionId) { header = new TS_URB_HEADER(); header.URB_Function = functionId; header.RequestId = requestId; header.NoAck = noAck; }