LibUsbDotNet 2.2.8
MonoUsbControlSetupHandle Constructor (requestType, request, value, index, length)
Library Reference ► MonoLibUsb.Transfer ► MonoUsbControlSetupHandle ► MonoUsbControlSetupHandle(Byte, Byte, Int16, Int16, Int16)
|
![]() |
Allocates memory and sets up a control setup packet.

C# | Visual Basic | Visual C++ |
public MonoUsbControlSetupHandle( byte requestType, byte request, short value, short index, short length )
Public Sub New ( _ requestType As Byte, _ request As Byte, _ value As Short, _ index As Short, _ length As Short _ )
public: MonoUsbControlSetupHandle( unsigned char requestType, unsigned char request, short value, short index, short length )

- requestType (Byte)
- The request type field for the setup packet.
- request (Byte)
- The request field for the setup packet.
- value (Int16)
- The value field for the setup packet
- index (Int16)
- The index field for the setup packet.
- length (Int16)
- The length to allocate for the data portion of the setup packet.

This constructor is used when:
- requestType has the Direction_In flag and this request will not contain extra data (just the setup packet).
- requestType does not have the Direction_In flag.

Allocates SETUP_PACKET_SIZE + length for the setup packet. The setup packet is stored first then the control data.