---
title: "IOUSBGetEndpointMaxStreamsEncoded(_:_:_:)"
framework: iousbhost
role: symbol
role_heading: Function
path: "iousbhost/iousbgetendpointmaxstreamsencoded(_:_:_:)"
---

# IOUSBGetEndpointMaxStreamsEncoded(_:_:_:)

Obtains the number of streams that an endpoint supports.

## Declaration

```swift
func IOUSBGetEndpointMaxStreamsEncoded(_ usbDeviceSpeed: UInt32, _ descriptor: UnsafePointer<IOUSBEndpointDescriptor>!, _ companionDescriptor: UnsafePointer<IOUSBSuperSpeedEndpointCompanionDescriptor>!) -> UInt32
```

## Parameters

- `usbDeviceSpeed`: The operational speed of the device.
- `descriptor`: The endpoint descriptor to parse.
- `companionDescriptor`: The companion descriptor to parse.

## Return Value

Return Value The encoded number of streams.

## Discussion

Discussion This method parses endpoint descriptors and returns the number of supported streams as n in (2^n).

## See Also

### Endpoint Descriptor Parsing

- [IOUSBGetNextEndpointDescriptor(_:_:_:)](iousbhost/iousbgetnextendpointdescriptor(_:_:_:).md)
- [IOUSBGetEndpointDirection(_:)](iousbhost/iousbgetendpointdirection(_:).md)
- [IOUSBGetEndpointAddress(_:)](iousbhost/iousbgetendpointaddress(_:).md)
- [IOUSBGetEndpointNumber(_:)](iousbhost/iousbgetendpointnumber(_:).md)
- [IOUSBGetEndpointType(_:)](iousbhost/iousbgetendpointtype(_:).md)
- [IOUSBGetEndpointMaxPacketSize(_:_:)](iousbhost/iousbgetendpointmaxpacketsize(_:_:).md)
- [IOUSBGetEndpointIntervalEncodedMicroframes(_:_:)](iousbhost/iousbgetendpointintervalencodedmicroframes(_:_:).md)
- [IOUSBGetEndpointIntervalMicroframes(_:_:)](iousbhost/iousbgetendpointintervalmicroframes(_:_:).md)
- [IOUSBGetEndpointIntervalFrames(_:_:)](iousbhost/iousbgetendpointintervalframes(_:_:).md)
- [IOUSBGetEndpointMaxStreams(_:_:_:)](iousbhost/iousbgetendpointmaxstreams(_:_:_:).md)
