CompositeFunction (Class)

class usbx.CompositeFunction(first_intf_number: int, interface_count: int, class_code: int, subclass_code: int, protocol_code: int)

USB composite function information.

A composite USB device can have multiple functions, e.g. a mass storage function and a virtual serial port function. Each function will appear as a separate device in Window.

A function consists of one or more interfaces. Functions with multiple interfaces have consecutive interface numbers. The interfaces after the first one are called associated interfaces.

If a function consists of multiple interfaces, the USB configuration description will contain an IAD (Interface Association Descriptor) to specify which interfaces belong to the function.

This information originates from the configuration descriptor provided by the USB device.

class_code: int

IAD class code (bInterfaceClass in USB interface descriptor).

first_intf_number: int

Interface number of first interface belonging to this function.

interface_count: int

Number of interfaces belonging to this function.

protocol_code: int

IAD protocol code (bInterfaceProtocol in USB interface descriptor).

subclass_code: int

IAD sub class code (bInterfaceSubClass in USB interface descriptor).