Platforms to show: All Mac Windows Linux Cross-Platform

MacUSBDeviceMBS class

Type Topic Plugin Version macOS Windows Linux iOS Targets
class USB MBS USB Plugin 10.4 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
The class for an USB Device on Mac OS X.
Example
// iterate over all devices without recursion and count devices
dim devices(-1) as MacUSBDeviceMBS

devices.Append MacUSBDeviceMBS.root

dim count as Integer = -1 // do not count Mac itself

while UBound(devices)>=0
dim dev as MacUSBDeviceMBS = devices.Pop

count = count + 1

for each child as MacUSBDeviceMBS in dev.children
devices.Append child
next
wend

MsgBox str(Count)+" USB devices."

Use the root method to get the device hierarchy.

For Windows you can take a look on the WindowsDeviceMBS and WinUSBDeviceMBS classes.
For cross platform development also check LibUSBDeviceMBS classes.
This is an abstract class. You can't create an instance, but you can get one from various plugin functions.

Constants

Constant Value Description
kUSBApplicationSpecificClass 254 One of the USB device class constants.
kUSBATMNetworkingSubClass 7 One of the USB device sub class constants. For kUSBCommunicationDataInterfaceClass.
kUSBAudioControlSubClass 1 One of the USB device sub class constants. For kUSBAudioInterfaceClass.
kUSBAudioStreamingSubClass 2 One of the USB device sub class constants. For kUSBAudioInterfaceClass.
kUSBCommAbstractSubClass 2 One of the USB device sub class constants. For kUSBCommunicationDataInterfaceClass.
kUSBCommCAPISubClass 5 One of the USB device sub class constants. For kUSBCommunicationDataInterfaceClass.
kUSBCommDirectLineSubClass 1 One of the USB device sub class constants. For kUSBCommunicationDataInterfaceClass.
kUSBCommEthernetNetworkingSubClass 6 One of the USB device sub class constants. For kUSBCommunicationDataInterfaceClass.
kUSBCommMultiChannelSubClass 4 One of the USB device sub class constants. For kUSBCommunicationDataInterfaceClass.
kUSBCommonClassSubClass 2 One of the USB device sub class constants. For kUSBMiscellaneousClass.
kUSBCommTelephoneSubClass 3 One of the USB device sub class constants. For kUSBCommunicationDataInterfaceClass.
kUSBCommunicationClass 2 One of the USB device class constants.
kUSBCompositeClass 0 One of the USB device class constants.
kUSBCompositeSubClass 0 One of the USB device sub class constants.
kUSBDataClass 10 One of the USB device class constants.
kUSBDFUSubClass 1 One of the USB device sub class constants. For kUSBApplicationSpecificInterfaceClass.
kUSBDiagnosticClass 220 One of the USB device class constants.
kUSBHIDBootInterfaceSubClass 1 One of the USB device sub class constants. For kUSBHIDBootInterfaceSubClass.
kUSBHubClass 9 One of the USB device class constants.
kUSBHubSubClass 0 One of the USB device sub class constants.
kUSBIrDABridgeSubClass 2 One of the USB device sub class constants. For kUSBApplicationSpecificInterfaceClass.
kUSBMassStorageATAPISubClass 2 One of the USB device sub class constants. For kUSBMassStorageInterfaceClass.
kUSBMassStorageQIC157SubClass 3 One of the USB device sub class constants. For kUSBMassStorageInterfaceClass.
kUSBMassStorageRBCSubClass 1 One of the USB device sub class constants. For kUSBMassStorageInterfaceClass.
kUSBMassStorageSCSISubClass 6 One of the USB device sub class constants. For kUSBMassStorageInterfaceClass.
kUSBMassStorageSFF8070iSubClass 5 One of the USB device sub class constants. For kUSBMassStorageInterfaceClass.
kUSBMassStorageUFISubClass 4 One of the USB device sub class constants. For kUSBMassStorageInterfaceClass.
kUSBMIDIStreamingSubClass 3 One of the USB device sub class constants. For kUSBAudioInterfaceClass.
kUSBMiscellaneousClass 239 One of the USB device class constants.
kUSBPersonalHealthcareClass 15 One of the USB device class constants.
kUSBReprogrammableDiagnosticSubClass 1 One of the USB device sub class constants. For kUSBDiagnosticDeviceInterfaceClass.
kUSBRFControllerSubClass 1 One of the USB device sub class constants. For kUSBWirelessControllerInterfaceClass.
kUSBTestMeasurementSubClass 3 One of the USB device sub class constants. For kUSBApplicationSpecificInterfaceClass.
kUSBVendorSpecificClass 255 One of the USB device class constants.
kUSBVideoControlSubClass 1 One of the USB device sub class constants.
kUSBVideoInterfaceCollectionSubClass 3 One of the USB device sub class constants.
kUSBVideoStreamingSubClass 2 One of the USB device sub class constants.
kUSBWirelessControllerClass 224 One of the USB device class constants.

This class has no sub classes.

Some examples using this class:

Blog Entries


The items on this page are in the following plugins: MBS USB Plugin.


MacQuarantinePropertiesMBS   -   MacUSBMBS


The biggest plugin in space...