Port Entity

API Documentation: [cpp] [python] [.NET] [LabVIEW]

The Port Entity provides control over the most basic items related to a USB Port. This includes actions ranging from a complete port enable and disable to the individual interface control. Voltage and current measurements are also included for devices which support the Port Entity.

Port Enable/Disable (Get/Set)

port [index] . getEnabled <= (unsigned char) enabled
port [index] . setEnabled => (unsigned char) enabled

Provides control (Set) and monitoring (Get) over the an entire port for a provided index (Power, Data, CC and Vconn). Values either passed in or returned are treated as boolean values.

Power Enable/Disable (Get/Set)

port [index] . getPowerEnabled <= (unsigned char) enabled
port [index] . setPowerEnabled => (unsigned char) enabled

Provides control (Set) and monitoring (Get) over the power for a provided index (Vbus). Values either passed in or returned are treated as boolean values.

Data Enable/Disable (Get/Set)

port [index] . getDataEnabled <= (unsigned char) enabled
port [index] . setDataEnabled => (unsigned char) enabled

Provides control (Set) and monitoring (Get) over the data lines for a provided index (High Speed (HS) and Super Speed (SS)). Values either passed in or returned are treated as boolean values.

High Speed (HS) Data Enable/Disable (Get/Set)

port [index] . getDataHSEnabled <= (unsigned char) enabled
port [index] . setDataHSEnabled => (unsigned char) enabled

Provides control (Set) and monitoring (Get) over the High Speed (HS) data lines for a provided index (HS1 and HS2). Values either passed in or returned are treated as boolean values.

High Speed 1 (HS1) Data Enable/Disable (Get/Set)

port [index] . getDataHS1Enabled <= (unsigned char) enabled
port [index] . setDataHS1Enabled => (unsigned char) enabled

Provides control (Set) and monitoring (Get) over the High Speed 1 (HS1) data lines for a provided index. Values either passed in or returned are treated as boolean values.

High Speed 2 (HS2) Data Enable/Disable (Get/Set)

port [index] . getDataHS2Enabled <= (unsigned char) enabled
port [index] . setDataHS2Enabled => (unsigned char) enabled

Provides control (Set) and monitoring (Get) over the High Speed 2 (HS2) data lines for a provided index. Values either passed in or returned are treated as boolean values.

Super Speed (SS) Data Enable/Disable (Get/Set)

port [index] . getDataSSEnabled <= (unsigned char) enabled
port [index] . setDataSSEnabled => (unsigned char) enabled

Provides control (Set) and monitoring (Get) over the Super Speed (SS) data lines for a provided index (SS1 and SS2). Values either passed in or returned are treated as boolean values.

Super Speed 1 (SS1) Data Enable/Disable (Get/Set)

port [index] . getDataSS1Enabled <= (unsigned char) enabled
port [index] . setDataSS1Enabled => (unsigned char) enabled

Provides control (Set) and monitoring (Get) over the Super Speed 1 (SS1) data lines for a provided index. Values either passed in or returned are treated as boolean values.

Super Speed 2 (SS2) Data Enable/Disable (Get/Set)

port [index] . getDataSS2Enabled <= (unsigned char) enabled
port [index] . setDataSS2Enabled => (unsigned char) enabled

Provides control (Set) and monitoring (Get) over the Super Speed 2 (SS2) data lines for a provided index. Values either passed in or returned are treated as boolean values.

Vconn Enable/Disable (Get/Set)

port [index] . getVconnEnabled <= (unsigned char) enabled
port [index] . setVconnEnabled => (unsigned char) enabled

Provides control (Set) and monitoring (Get) over the Vconn lines for a provided index (Vconn1 and Vconn2 (only one ever exists)). Values either passed in or returned are treated as boolean values.

Vconn 1 Enable/Disable (Get/Set)

port [index] . getVconn1Enabled <= (unsigned char) enabled
port [index] . setVconn1Enabled => (unsigned char) enabled

Provides control (Set) and monitoring (Get) over the Vconn 1 lines for a provided index. Values either passed in or returned are treated as boolean values.

Vconn 2 Enable/Disable (Get/Set)

port [index] . getVconn2Enabled <= (unsigned char) enabled
port [index] . setVconn2Enabled => (unsigned char) enabled

Provides control (Set) and monitoring (Get) over the Vconn 2 lines for a provided index. Values either passed in or returned are treated as boolean values.

CC Enable/Disable (Get/Set)

port [index] . getCCEnabled <= (unsigned char) enabled
port [index] . setCCEnabled => (unsigned char) enabled

Provides control (Set) and monitoring (Get) over the CC lines for a provided index (CC1 and CC2). Values either passed in or returned are treated as boolean values.

CC 1 Enable/Disable (Get/Set)

port [index] . getCC1Enabled <= (unsigned char) enabled
port [index] . setCC1Enabled => (unsigned char) enabled

Provides control (Set) and monitoring (Get) over the CC 1 lines for a provided index. Values either passed in or returned are treated as boolean values.

CC 2 Enable/Disable (Get/Set)

port [index] . getCC2Enabled <= (unsigned char) enabled
port [index] . setCC2Enabled => (unsigned char) enabled

Provides control (Set) and monitoring (Get) over the CC 2 lines for a provided index. Values either passed in or returned are treated as boolean values.

Vbus Voltage/Current (Get)

port [index] . getVbusVoltage <= (unsigned int) microvolts
port [index] . getVbusCurrent <= (unsigned int) microamps

Provides access to the last read values of Voltage (in microvolts) and Current (in microamps) for the Vbus lines.

Vconn Voltage/Current (Get)

port [index] . getVconnVoltage <= (unsigned int) microvolts
port [index] . getVconnCurrent <= (unsigned int) microamps

Provides access to the last read values of Voltage (in microvolts) and Current (in microamps) for the Vconn lines.

Vbus Accumulated Power (Get/Reset)

port [index] . getVbusAccumulatedPower <= (unsigned int) milliwatthours
port [index] . resetVbusAccumulatedPower => (void)

Returns the accumulated power (energy) sank or sourced by the Vbus line for the given port in units of milliWatt-hours.

Vconn Accumulated Power (Get/Reset)

port [index] . getVconnAccumulatedPower <= (unsigned int) milliwatthours
port [index] . resetVconnAccumulatedPower => (void)

Returns the accumulated power (energy) sank or sourced by the Vconn line for the given port in units of milliWatt-hours.

Port Name (Get/Set)

port [index] . getName <= (unsigned char[]) name
port [index] . setName => (unsigned char[]) name

Allows for setting a friendly name to the port with a 32 character limit.

Downstream Data Speed (Get)

port [index] . getDataSpeed <= (unsigned int)

Gets the speed of the enumerated device.

Data Speed

Bit

Value

Define

1.5 Mbit/s

0

0/1

portDataSpeed_ls_1p5M_Bit

12 Mbit/s

1

0/1

portDataSpeed_fs_12M_Bit

480 Mbit/s

2

0/1

portDataSpeed_hs_480M_Bit

5 Gbit/s

3

0/1

portDataSpeed_ss_5G_Bit

10 Gbit/s

4

0/1

portDataSpeed_ss_10G_Bit

USB 2.0

6

0/1

portDataSpeed_Connected_2p0_Bit

USB 3.0

7

0/1

portDataSpeed_Connected_3p0_Bit