Classes | |
class | NoneFoundError |
Functions | |
def | connect (spec=None) |
def | disable_ports (ports) |
def | disconnect () |
def | discover () |
def | enable_ports (ports=None, disable_other_ports=False, sleep_on_change=0) |
def | get_port_from_usb (first_usb_index, second_usb_index) |
def | is_connected () |
def | is_port_enabled (port) |
def | port_power (port) |
def | port_state (port) |
def | ports () |
def | recycle_ports (portlist=None, timeout=2) |
def | set_ports_usb2 (portlist=None, timeout=100e-3) |
def | set_ports_usb3 (portlist=None, timeout=100e-3) |
def | usage () |
Variables | |
args | |
hub = None | |
longopts | |
opts | |
Brainstem Acroname Hub See documentation for brainstem here: https://acroname.com/reference/python/index.html
def rspy.acroname.connect | ( | spec = None | ) |
Connect to the hub. Raises RuntimeError on failure
Definition at line 67 of file acroname.py.
def rspy.acroname.disable_ports | ( | ports | ) |
:param ports: List of port numbers :return: True if no errors found, False otherwise
Definition at line 171 of file acroname.py.
def rspy.acroname.disconnect | ( | ) |
Definition at line 97 of file acroname.py.
def rspy.acroname.discover | ( | ) |
Return all Acroname module specs in a list. Raise NoneFoundError if one is not found!
Definition at line 47 of file acroname.py.
def rspy.acroname.enable_ports | ( | ports = None , |
|
disable_other_ports = False , |
|||
sleep_on_change = 0 |
|||
) |
Set enable state to provided ports :param ports: List of port numbers; if not provided, enable all ports :param disable_other_ports: if True, the ports not in the list will be disabled :param sleep_on_change: Number of seconds to sleep if any change is made :return: True if no errors found, False otherwise
Definition at line 135 of file acroname.py.
def rspy.acroname.get_port_from_usb | ( | first_usb_index, | |
second_usb_index | |||
) |
Based on last two USB location index, provide the port number
Definition at line 253 of file acroname.py.
def rspy.acroname.is_connected | ( | ) |
Definition at line 89 of file acroname.py.
def rspy.acroname.is_port_enabled | ( | port | ) |
Definition at line 115 of file acroname.py.
def rspy.acroname.port_power | ( | port | ) |
Definition at line 238 of file acroname.py.
def rspy.acroname.port_state | ( | port | ) |
Definition at line 119 of file acroname.py.
def rspy.acroname.ports | ( | ) |
:return: a list of all ports currently occupied (and enabled)
Definition at line 104 of file acroname.py.
def rspy.acroname.recycle_ports | ( | portlist = None , |
|
timeout = 2 |
|||
) |
Disable and enable a port :param timeout: how long to wait before re-enabling :return: True if everything OK, False otherwise
Definition at line 187 of file acroname.py.
def rspy.acroname.set_ports_usb2 | ( | portlist = None , |
|
timeout = 100e-3 |
|||
) |
Set USB ports to USB2
Definition at line 206 of file acroname.py.
def rspy.acroname.set_ports_usb3 | ( | portlist = None , |
|
timeout = 100e-3 |
|||
) |
Set USB ports to support USB3
Definition at line 222 of file acroname.py.
def rspy.acroname.usage | ( | void | ) |
Definition at line 13 of file acroname.py.
rspy.acroname.args |
Definition at line 21 of file acroname.py.
rspy.acroname.hub = None |
Definition at line 37 of file acroname.py.
rspy.acroname.longopts |
Definition at line 22 of file acroname.py.
rspy.acroname.opts |
Definition at line 21 of file acroname.py.