Port Entity

group PortEntity

Port Class: The Port Entity provides software control over the most basic items related to a USB Port. This includes everything from the complete enable and disable of the entire port to the individual control of specific pins. Voltage and Current measurements are also included for devices which support the Port Entity.

void port_getVbusVoltage(unsigned int *id, struct Result *result, const int index)

Gets the Vbus Voltage

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone and the requested value on success. Non-zero error code on failure. The voltage in microvolts (1 == 1e-6V) currently present on Vbus.

  • index – The index of the entity in question.

void port_getVbusCurrent(unsigned int *id, struct Result *result, const int index)

Gets the Vbus Current

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone and the requested value on success. Non-zero error code on failure. The current in microamps (1 == 1e-6A) currently present on Vbus.

  • index – The index of the entity in question.

void port_getVconnVoltage(unsigned int *id, struct Result *result, const int index)

Gets the Vconn Voltage

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone and the requested value on success. Non-zero error code on failure. The voltage in microvolts (1 == 1e-6V) currently present on Vconn.

  • index – The index of the entity in question.

void port_getVconnCurrent(unsigned int *id, struct Result *result, const int index)

Gets the Vconn Current

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone and the requested value on success. Non-zero error code on failure. The current in microamps (1 == 1e-6A) currently present on Vconn.

  • index – The index of the entity in question.

void port_getPowerMode(unsigned int *id, struct Result *result, const int index)

Gets the Port Power Mode: Convenience Function of get/setPortMode

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone and the requested value on success. Non-zero error code on failure. The current power mode.

  • index – The index of the entity in question.

void port_setPowerMode(unsigned int *id, struct Result *result, const int index, const unsigned char powerMode)

Sets the Port Power Mode: Convenience Function of get/setPortMode

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone on success. Non-zero error code on failure.

  • index – The index of the entity in question.

  • powerMode – The power mode to be set.

void port_getEnabled(unsigned int *id, struct Result *result, const int index)

Gets the current enable value of the port.

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone and the requested value on success. Non-zero error code on failure. 1 = Fully enabled port; 0 = One or more disabled components.

  • index – The index of the entity in question.

void port_setEnabled(unsigned int *id, struct Result *result, const int index, const unsigned char enable)

Enables or disables the entire port.

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone on success. Non-zero error code on failure.

  • index – The index of the entity in question.

  • enable – 1 = Fully enable port; 0 = Fully disable port.

void port_getDataEnabled(unsigned int *id, struct Result *result, const int index)

Gets the current enable value of the data lines.: Sub-component (Data) of getEnabled.

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone and the requested value on success. Non-zero error code on failure. 1 = Data enabled; 0 = Data disabled.

  • index – The index of the entity in question.

void port_setDataEnabled(unsigned int *id, struct Result *result, const int index, const unsigned char enable)

Enables or disables the data lines. Sub-component (Data) of setEnabled.

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone on success. Non-zero error code on failure.

  • index – The index of the entity in question.

  • enable – 1 = Enable data; 0 = Disable data.

void port_getDataHSEnabled(unsigned int *id, struct Result *result, const int index)

Gets the current enable value of the High Speed (HS) data lines. Sub-component of getDataEnabled.

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone and the requested value on success. Non-zero error code on failure. 1 = Data enabled; 0 = Data disabled.

  • index – The index of the entity in question.

void port_setDataHSEnabled(unsigned int *id, struct Result *result, const int index, const unsigned char enable)

Enables or disables the High Speed (HS) data lines. Sub-component of setDataEnabled.

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone on success. Non-zero error code on failure.

  • index – The index of the entity in question.

  • enable – 1 = Enable data; 0 = Disable data.

void port_getDataHS1Enabled(unsigned int *id, struct Result *result, const int index)

Gets the current enable value of the High Speed A side (HSA) data lines.: Sub-component of getDataHSEnabled.

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone and the requested value on success. Non-zero error code on failure. 1 = Data enabled; 0 = Data disabled.

  • index – The index of the entity in question.

void port_setDataHS1Enabled(unsigned int *id, struct Result *result, const int index, const unsigned char enable)

Enables or disables the Hight Speed A side (HSA) data lines. Sub-component of setDataHSEnabled.

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone on success. Non-zero error code on failure.

  • index – The index of the entity in question.

  • enable – 1 = Enable data; 0 = Disable data.

void port_getDataHS2Enabled(unsigned int *id, struct Result *result, const int index)

Gets the current enable value of the High Speed B side (HSB) data lines.: Sub-component of getDataHSEnabled.

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone and the requested value on success. Non-zero error code on failure. 1 = Data enabled; 0 = Data disabled.

  • index – The index of the entity in question.

void port_setDataHS2Enabled(unsigned int *id, struct Result *result, const int index, const unsigned char enable)

Enables or disables the Hight Speed B side (HSB) data lines. Sub-component of setDataHSEnabled.

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone on success. Non-zero error code on failure.

  • index – The index of the entity in question.

  • enable – 1 = Enable data; 0 = Disable data.

void port_getDataSSEnabled(unsigned int *id, struct Result *result, const int index)

Gets the current enable value of the Super Speed (SS) data lines. Sub-component of getDataEnabled.

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone and the requested value on success. Non-zero error code on failure. 1 = Data enabled; 0 = Data disabled.

  • index – The index of the entity in question.

void port_setDataSSEnabled(unsigned int *id, struct Result *result, const int index, const unsigned char enable)

Enables or disables the Super Speed (SS) data lines. Sub-component of setDataEnabled.

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone on success. Non-zero error code on failure.

  • index – The index of the entity in question.

  • enable – 1 = Enable data; 0 = Disable data.

void port_getDataSS1Enabled(unsigned int *id, struct Result *result, const int index)

Gets the current enable value of the Super Speed A side (SSA) data lines.: Sub-component of getDataSSEnabled.

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone and the requested value on success. Non-zero error code on failure. 1 = Data enabled; 0 = Data disabled.

  • index – The index of the entity in question.

void port_setDataSS1Enabled(unsigned int *id, struct Result *result, const int index, const unsigned char enable)

Enables or disables the Super Speed (SS) data lines. Sub-component of setDataEnabled.

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone on success. Non-zero error code on failure.

  • index – The index of the entity in question.

  • enable – 1 = Enable data; 0 = Disable data.

void port_getDataSS2Enabled(unsigned int *id, struct Result *result, const int index)

Gets the current enable value of the Super Speed B side (SSB) data lines.: Sub-component of getDataSSEnabled.

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone and the requested value on success. Non-zero error code on failure. 1 = Data enabled; 0 = Data disabled.

  • index – The index of the entity in question.

void port_setDataSS2Enabled(unsigned int *id, struct Result *result, const int index, const unsigned char enable)

Enables or disables the Super Speed B side (SSB) data lines. Sub-component of setDataSSEnabled.

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone on success. Non-zero error code on failure.

  • index – The index of the entity in question.

  • enable – 1 = Enable data; 0 = Disable data.

void port_getPowerEnabled(unsigned int *id, struct Result *result, const int index)

Gets the current enable value of the power lines.: Sub-component (Power) of getEnabled.

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone and the requested value on success. Non-zero error code on failure. 1 = Power enabled; 0 = Power disabled.

  • index – The index of the entity in question.

void port_setPowerEnabled(unsigned int *id, struct Result *result, const int index, const unsigned char enable)

Enables or Disables the power lines. Sub-component (Power) of setEnable.

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone on success. Non-zero error code on failure.

  • index – The index of the entity in question.

  • enable – 1 = Enable power; 0 = Disable disable.

void port_getDataRole(unsigned int *id, struct Result *result, const int index)

Gets the Port Data Role.

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone and the requested value on success. Non-zero error code on failure. The data role to be set. See datasheet for details.

  • index – The index of the entity in question.

void port_getVconnEnabled(unsigned int *id, struct Result *result, const int index)

Gets the current enable value of the Vconn lines.: Sub-component (Vconn) of getEnabled.

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone and the requested value on success. Non-zero error code on failure. 1 = Vconn enabled; 0 = Vconn disabled.

  • index – The index of the entity in question.

void port_setVconnEnabled(unsigned int *id, struct Result *result, const int index, const unsigned char enable)

Enables or disables the Vconn lines. Sub-component (Vconn) of setEnabled.

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone on success. Non-zero error code on failure.

  • index – The index of the entity in question.

  • enable – 1 = Enable Vconn lines; 0 = Disable Vconn lines.

void port_getVconn1Enabled(unsigned int *id, struct Result *result, const int index)

Gets the current enable value of the Vconn1 lines. Sub-component of getVconnEnabled.

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone and the requested value on success. Non-zero error code on failure. 1 = Vconn1 enabled; 0 = Vconn1 disabled.

  • index – The index of the entity in question.

void port_setVconn1Enabled(unsigned int *id, struct Result *result, const int index, const unsigned char enable)

Enables or disables the Vconn1 lines. Sub-component of setVconnEnabled.

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone on success. Non-zero error code on failure.

  • index – The index of the entity in question.

  • enable – 1 = Enable Vconn1 lines; 0 = Disable Vconn1 lines.

void port_getVconn2Enabled(unsigned int *id, struct Result *result, const int index)

Gets the current enable value of the Vconn2 lines. Sub-component of getVconnEnabled.

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone and the requested value on success. Non-zero error code on failure. 1 = Vconn2 enabled; 0 = Vconn2 disabled.

  • index – The index of the entity in question.

void port_setVconn2Enabled(unsigned int *id, struct Result *result, const int index, const unsigned char enable)

Enables or disables the Vconn2 lines. Sub-component of setVconnEnabled.

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone on success. Non-zero error code on failure.

  • index – The index of the entity in question.

  • enable – 1 = Enable Vconn2 lines; 0 = Disable Vconn2 lines.

void port_getCCEnabled(unsigned int *id, struct Result *result, const int index)

Gets the current enable value of the CC lines.: Sub-component (CC) of getEnabled.

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone and the requested value on success. Non-zero error code on failure. 1 = CC enabled; 0 = CC disabled.

  • index – The index of the entity in question.

void port_setCCEnabled(unsigned int *id, struct Result *result, const int index, const unsigned char enable)

Enables or disables the CC lines. Sub-component (CC) of setEnabled.

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone on success. Non-zero error code on failure.

  • index – The index of the entity in question.

  • enable – 1 = Enable CC lines; 0 = Disable CC lines.

void port_getCC1Enabled(unsigned int *id, struct Result *result, const int index)

Gets the current enable value of the CC1 lines. Sub-component of getCCEnabled.

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone and the requested value on success. Non-zero error code on failure. 1 = CC1 enabled; 0 = CC1 disabled.

  • index – The index of the entity in question.

void port_setCC1Enabled(unsigned int *id, struct Result *result, const int index, const unsigned char enable)

Enables or disables the CC1 lines. Sub-component of setCCEnabled.

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone on success. Non-zero error code on failure.

  • index – The index of the entity in question.

  • enable – 1 = Enable CC1 lines; 0 = Disable CC1 lines.

void port_getCC2Enabled(unsigned int *id, struct Result *result, const int index)

Gets the current enable value of the CC2 lines. Sub-component of getCCEnabled.

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone and the requested value on success. Non-zero error code on failure. 1 = CC2 enabled; 0 = CC2 disabled.

  • index – The index of the entity in question.

void port_setCC2Enabled(unsigned int *id, struct Result *result, const int index, const unsigned char enable)

Enables or disables the CC2 lines. Sub-component of setCCEnabled.

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone on success. Non-zero error code on failure.

  • index – The index of the entity in question.

  • enable – 1 = Enable CC2 lines; 0 = Disable CC2 lines.

void port_getVoltageSetpoint(unsigned int *id, struct Result *result, const int index)

Gets the current voltage setpoint value for the port.

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone and the requested value on success. Non-zero error code on failure. the voltage setpoint of the port in uV.

  • index – The index of the entity in question.

void port_setVoltageSetpoint(unsigned int *id, struct Result *result, const int index, const unsigned int value)

Sets the current voltage setpoint value for the port.

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone on success. Non-zero error code on failure.

  • index – The index of the entity in question.

  • value – the voltage setpoint of the port in uV.

void port_getState(unsigned int *id, struct Result *result, const int index)

A bit mapped representation of the current state of the port. Reflects what he port IS which may differ from what was requested.

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone and the requested value on success. Non-zero error code on failure. Variable to be filled with the current state.

  • index – The index of the entity in question.

void port_getDataSpeed(unsigned int *id, struct Result *result, const int index)

Gets the speed of the enumerated device.

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone and the requested value on success. Non-zero error code on failure. Bit mapped value representing the devices speed. See “Devices” reference for details.

  • index – The index of the entity in question.

void port_getMode(unsigned int *id, struct Result *result, const int index)

Gets current mode of the port

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone and the requested value on success. Non-zero error code on failure. Bit mapped value representing the ports mode. See “Devices” reference for details.

  • index – The index of the entity in question.

void port_setMode(unsigned int *id, struct Result *result, const int index, const unsigned int mode)

Sets the mode of the port

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone on success. Non-zero error code on failure.

  • index – The index of the entity in question.

  • mode – Port mode to be set. See “Devices” documentation for details.

void port_getErrors(unsigned int *id, struct Result *result, const int index)

Returns any errors that are present on the port. Calling this function will clear the current errors. If the error persists it will be set again.

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone and the requested value on success. Non-zero error code on failure. Bit mapped field representing the current errors of the ports

  • index – The index of the entity in question.

void port_getCurrentLimit(unsigned int *id, struct Result *result, const int index)

Gets the current limit of the port.

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone and the requested value on success. Non-zero error code on failure. Variable to be filled with the limit in microAmps (uA).

  • index – The index of the entity in question.

void port_setCurrentLimit(unsigned int *id, struct Result *result, const int index, const unsigned int limit)

Sets the current limit of the port.

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone on success. Non-zero error code on failure.

  • index – The index of the entity in question.

  • limit – Current limit to be applied in microAmps (uA).

void port_getCurrentLimitMode(unsigned int *id, struct Result *result, const int index)

Gets the current limit mode. The mode determines how the port will react to an over current condition.

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone and the requested value on success. Non-zero error code on failure. Variable to be filled with an enumerated representation of the current limit mode. Available modes are product specific. See the reference documentation.

  • index – The index of the entity in question.

void port_setCurrentLimitMode(unsigned int *id, struct Result *result, const int index, const unsigned char mode)

Sets the current limit mode. The mode determines how the port will react to an over current condition.

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone on success. Non-zero error code on failure.

  • index – The index of the entity in question.

  • mode – An enumerated representation of the current limit mode. Available modes are product specific. See the reference documentation.

void port_getAvailablePower(unsigned int *id, struct Result *result, const int index)

Gets the current available power. This value is determined by the power manager which is responsible for budgeting the systems available power envelope.

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone and the requested value on success. Non-zero error code on failure. Variable to be filled with the available power in milli-watts (mW).

  • index – The index of the entity in question.

void port_getAllocatedPower(unsigned int *id, struct Result *result, const int index)

Gets the currently allocated power This value is determined by the power manager which is responsible for budgeting the systems available power envelope.

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone and the requested value on success. Non-zero error code on failure. Variable to be filled with the allocated power in milli-watts (mW).

  • index – The index of the entity in question.

void port_getPowerLimit(unsigned int *id, struct Result *result, const int index)

Gets the user defined power limit for the port.

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone and the requested value on success. Non-zero error code on failure. Variable to be filled with the power limit in milli-watts (mW).

  • index – The index of the entity in question.

void port_setPowerLimit(unsigned int *id, struct Result *result, const int index, const unsigned int limit)

Sets a user defined power limit for the port.

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone on success. Non-zero error code on failure.

  • index – The index of the entity in question.

  • limit – Power limit to be applied in milli-watts (mW).

void port_getPowerLimitMode(unsigned int *id, struct Result *result, const int index)

Gets the power limit mode. The mode determines how the port will react to an over power condition.

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone and the requested value on success. Non-zero error code on failure. Variable to be filled with an enumerated representation of the power limit mode. Available modes are product specific. See the reference documentation.

  • index – The index of the entity in question.

void port_setPowerLimitMode(unsigned int *id, struct Result *result, const int index, const unsigned char mode)

Sets the power limit mode. The mode determines how the port will react to an over power condition.

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone on success. Non-zero error code on failure.

  • index – The index of the entity in question.

  • mode – An enumerated representation of the power limit mode to be applied Available modes are product specific. See the reference documentation.

void port_getName(unsigned int *id, struct Result *result, const int index, unsigned char *buffer, const unsigned int bufferLength)

Gets a user defined name of the port. Helpful for identifying ports/devices in a static environment.

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone and the requested value on success. Non-zero error code on failure. Length that was actually received and filled.

  • index – The index of the entity in question.

  • buffer – pointer to the start of a c style buffer to be filled

  • bufferLength – Length of the buffer to be filed

void port_setName(unsigned int *id, struct Result *result, const int index, unsigned char *buffer, const unsigned int bufferLength)

Sets a user defined name of the port. Helpful for identifying ports/devices in a static environment.

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone on success. Non-zero error code on failure.

  • index – The index of the entity in question.

  • buffer – Pointer to the start of a c style buffer to be transferred.

  • bufferLength – Length of the buffer to be transferred.

void port_getCCCurrentLimit(unsigned int *id, struct Result *result, const int index)

Gets the CC Current Limit Resistance The CC Current limit is the value that’s set for the pull up resistance on the CC lines for basic USB-C negotations.

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone and the requested value on success. Non-zero error code on failure. Variable to be filled with an enumerated representation of the CC Current limit. 0 = None, 1 = Default (500/900mA), 2 = 1.5A, and 3 = 3.0A

  • index – The index of the entity in question.

void port_setCCCurrentLimit(unsigned int *id, struct Result *result, const int index, const unsigned char value)

Sets the CC Current Limit Resistance The CC Current limit is the value that’s set for the pull up resistance on the CC lines for basic USB-C negotations.

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone on success. Non-zero error code on failure.

  • index – The index of the entity in question.

  • value – Variable to be filled with an enumerated representation of the CC Current limit. 0 = None, 1 = Default (500/900mA), 2 = 1.5A, and 3 = 3.0A

void port_getDataHSRoutingBehavior(unsigned int *id, struct Result *result, const int index)

Gets the HighSpeed Data Routing Behavior. The mode determines how the port will route the data lines.

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone and the requested value on success. Non-zero error code on failure. Variable to be filled with an enumerated representation of the routing behavior. Available modes are product specific. See the reference documentation.

  • index – The index of the entity in question.

void port_setDataHSRoutingBehavior(unsigned int *id, struct Result *result, const int index, const unsigned char mode)

Sets the HighSpeed Data Routing Behavior. The mode determines how the port will route the data lines.

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone on success. Non-zero error code on failure.

  • index – The index of the entity in question.

  • mode – An enumerated representation of the routing behavior. Available modes are product specific. See the reference documentation.

void port_getDataSSRoutingBehavior(unsigned int *id, struct Result *result, const int index)

Gets the SuperSpeed Data Routing Behavior. The mode determines how the port will route the data lines.

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone and the requested value on success. Non-zero error code on failure. Variable to be filled with an enumerated representation of the routing behavior. Available modes are product specific. See the reference documentation.

  • index – The index of the entity in question.

void port_setDataSSRoutingBehavior(unsigned int *id, struct Result *result, const int index, const unsigned char mode)

Sets the SuperSpeed Data Routing Behavior. The mode determines how the port will route the data lines.

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone on success. Non-zero error code on failure.

  • index – The index of the entity in question.

  • mode – An enumerated representation of the routing behavior. Available modes are product specific. See the reference documentation.

void port_getVbusAccumulatedPower(unsigned int *id, struct Result *result, const int index)

Gets the Vbus Accumulated Power

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone and the requested value on success. Non-zero error code on failure. The accumuled power on Vbus in milliwatt-hours.

  • index – The index of the entity in question.

void port_resetVbusAccumulatedPower(unsigned int *id, struct Result *result, const int index)

Resets the Vbus Accumulated Power to zero.

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone on success. Non-zero error code on failure.

  • index – The index of the entity in question.

void port_getVconnAccumulatedPower(unsigned int *id, struct Result *result, const int index)

Gets the Vconn Accumulated Power

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone and the requested value on success. Non-zero error code on failure. The accumuled power on Vconn in milliwatt-hours.

  • index – The index of the entity in question.

void port_resetVconnAccumulatedPower(unsigned int *id, struct Result *result, const int index)

Resets the Vconn Accumulated Power to zero.

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone on success. Non-zero error code on failure.

  • index – The index of the entity in question.

void port_setHSBoost(unsigned int *id, struct Result *result, const int index, const unsigned char boost)

Sets the ports USB 2.0 High Speed Boost Settings The setting determines how much additional drive the USB 2.0 signal will have in High Speed mode.

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone on success. Non-zero error code on failure.

  • index – The index of the entity in question.

  • boost – An enumerated representation of the boost range. Available value are product specific. See the reference documentation.

void port_getHSBoost(unsigned int *id, struct Result *result, const int index)

Gets the ports USB 2.0 High Speed Boost Settings The setting determines how much additional drive the USB 2.0 signal will have in High Speed mode.

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone and the requested value on success. Non-zero error code on failure. An enumerated representation of the boost range. Available modes are product specific. See the reference documentation.

  • index – The index of the entity in question.

void port_resetEntityToFactoryDefaults(unsigned int *id, struct Result *result, const int index)

Resets the PortClass Entity to it factory default configuration.

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone on success. Non-zero error code on failure.

  • index – The index of the entity in question.

void port_getCC1State(unsigned int *id, struct Result *result, const int index)

Gets the current CC1 Strapping on local and remote The state is a bit packed value where the upper byte is used to represent the remote or partner device attached to the ports resistance and the lower byte is used to represent the local or hubs resistance.

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone and the requested value on success. Non-zero error code on failure. Variable to be filled with an packed enumerated representation of the CC state. Enumeration values for each byte are as follows:

    • None = 0 = portCC1State_None

    • Invalid = 1 = portCC1State_Invalid

    • Rp (default) = 2 = portCC1State_RpDefault

    • Rp (1.5A) = 3 = portCC1State_Rp1p5

    • Rp (3A) = 4 = portCC1State_Rp3p0

    • Rd = 5 = portCC1State_Rd

    • Ra = 6 = portCC1State_Ra

    • Managed by controller = 7 = portCC1State_Managed

    • Unknown = 8 = portCC1State_Unknown

  • index – The index of the entity in question.

void port_getCC2State(unsigned int *id, struct Result *result, const int index)

Gets the current CC2 Strapping on local and remote The state is a bit packed value where the upper byte is used to represent the remote or partner device attached to the ports resistance and the lower byte is used to represent the local or hubs resistance.

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone and the requested value on success. Non-zero error code on failure. Variable to be filled with an packed enumerated representation of the CC state. Enumeration values for each byte are as follows:

    • None = 0 = portCC2State_None

    • Invalid = 1 = portCC2State_Invalid

    • Rp (default) = 2 = portCC2State_RpDefault

    • Rp (1.5A) = 3 = portCC2State_Rp1p5

    • Rp (3A) = 4 = portCC2State_Rp3p0

    • Rd = 5 = portCC2State_Rd

    • Ra = 6 = portCC2State_Ra

    • Managed by controller = 7 = portCC2State_Managed

    • Unknown = 8 = portCC2State_Unknown

  • index – The index of the entity in question.