VirtualBox

Ignore:
Timestamp:
Nov 10, 2014 9:57:22 PM (10 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
96876
Message:

Main: Added API to report actual USB device speed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageList.cpp

    r53266 r53297  
    402402            USHORT usPortVersion;
    403403            CHECK_ERROR_RET(dev, COMGETTER(PortVersion)(&usPortVersion), 1);
     404            USBConnectionSpeed_T enmSpeed;
     405            CHECK_ERROR_RET(dev, COMGETTER(Speed)(&enmSpeed), 1);
    404406
    405407            RTPrintf("UUID:               %s\n"
     
    407409                     "ProductId:          %#06x (%04X)\n"
    408410                     "Revision:           %u.%u (%02u%02u)\n"
    409                      "Port:               %u\n"
    410                      "USB version/speed:  %u/%u\n",
     411                     "Port:               %u\n",
    411412                     Utf8Str(id).c_str(),
    412413                     usVendorId, usVendorId, usProductId, usProductId,
    413414                     bcdRevision >> 8, bcdRevision & 0xff,
    414415                     bcdRevision >> 8, bcdRevision & 0xff,
    415                      usPort, usVersion, usPortVersion);
     416                     usPort);
     417
     418            const char *pszSpeed = "?";
     419            switch (enmSpeed)
     420            {
     421                case USBConnectionSpeed_Low:
     422                    pszSpeed = "Low";
     423                    break;
     424                case USBConnectionSpeed_Full:
     425                    pszSpeed = "Full";
     426                    break;
     427                case USBConnectionSpeed_High:
     428                    pszSpeed = "High";
     429                    break;
     430                case USBConnectionSpeed_Super:
     431                    pszSpeed = "Super";
     432                    break;
     433                case USBConnectionSpeed_SuperPlus:
     434                    pszSpeed = "SuperPlus";
     435                    break;
     436                default:
     437                    ASSERT(false);
     438                    break;
     439            }
     440
     441            RTPrintf("USB version/speed:  %u/%s\n", usVersion, pszSpeed);
    416442
    417443            /* optional stuff. */
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette