Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The roUsbPowerControl object is used to control the power of the USB port for specific supported platforms. The supported platforms are XT1144, XD1034, AU325, and AU335. This object is available on BrightSign OS 8.2.20 and above.


ifUsbPowerControl

PowerCyclePort(friendly_name As String) As Boolean

Allows you to power cycle the VBus on a device that may be stuck on a specific port. This method returns True on success, or False on failure.

  • [String] friendly_name: The friendly name of the specific USB port.  Please refer to the table below to map friendly names to supported platforms. For example, call usb.powerCyclePort("USB:A") to turn the USB power on port 1 of AU325 off and on again.
PlatformUSBFriendly Name
AU3251, 2, 3, 4, 5, 6"USB:A", "USB:B", "USB:C", "USB:D", "USB:E", "USB:F"
AU335Type-C"USB:A"
XD1034, XT1144Type-C, Type-A"USB:A", "USB:B"



PowerCycleAllPorts() As Boolean

Call usb.PowerCycleAllPorts() to turn the power off and on for all USB ports and power cycle all plugged in devices. This method returns True on success, or False on failure.


PortPowerOn(friendly_name As String) As Boolean

Allows you to power on the specified port. This method returns True on success, or False on failure.

  • [String] friendly_name: The friendly name of the specific USB port. Please refer to the table above to map friendly names on supported platforms.


PortPowerOff(friendly_name As String) As Boolean

Allows you to power off the specified port. This method returns True on success, or False on failure.

  • [String] friendly_name: The friendly name of the specific USB port.  Please refer to the table above to map friendly names on supported platforms.


Example

This example power cycles USB:A and USB:B ports with a one second wait:


Code Block
languagejs
usb = CreateObject("roUsbPowerControl")
? usb.PortPowerOff("USB:A")
? usb.PortPowerOff("USB:B")
sleep(1000)
? usb.PortPowerOn("USB:A")
? usb.PortPowerOn("USB:B")