1. acroname_auxiliary

Example can be found here Controlling an acroname USB hub.

1.1. Acroname Control Auxiliary

module:

acroname_auxiliary

synopsis:

Auxiliary used to control acroname usb hubs.

class pykiso.lib.auxiliaries.acroname_auxiliary.AcronameAuxiliary(serial_number=None, **kwargs)[source]

Auxiliary used to control acroname usb hubs

Constructor

Parameters:

serial_number (str) – serial number to connect to as hex string. Example “0x66F4859B”

static eval_result(result)[source]

Log error message if exist from acroname Result object. :type result: Result :param result: result code to evaluate

Return type:

None

get_port_current(port, unit='A')[source]

Get the current through the power line for selected usb port.

Parameters:
  • port (int) – the USB port number

  • unit (str) – unit of the result in “uA”, “mA” or “A”. Default “A”

Return type:

Optional[float]

Returns:

port current for given unit. None if unit is not supported.

get_port_current_limit(port, unit='A')[source]

Get the current limit for the port.

Parameters:
  • port (int) – the USB port number

  • unit (str) – unit of the result in “uA”, “mA” or “A”. Default “A”

Return type:

Optional[float]

Returns:

port current limit for given unit. None if unit is not supported.

get_port_voltage(port, unit='V')[source]

Get the voltage of the selected usb port.

Parameters:
  • port (int) – the USB port number

  • unit (str) – unit of the result in “uV”, “mV” or “V”. Default “V”

Return type:

Optional[float]

Returns:

port voltage for given unit. None if unit is not supported.

set_port_current_limit(port, amps, unit='A')[source]

Set the current limit for the port. If the set limit is not achievable, devices will round down to the nearest available current limit setting.

Parameters:
  • port (int) – the USB port number

  • amps (float) – value for port current to set in “uA”, “mA” or “A”. Default “A”

  • unit (str) – unit for the value to set. Default Ampere

Return type:

int

Returns:

brainstem error code. 0 if no error.

set_port_disable(port)[source]

Disable power and data lines for a USB port.

Parameters:

port (int) – the USB port number

Return type:

int

Returns:

brainstem error code. 0 if no error.

set_port_enable(port)[source]

Enable power and data lines for a USB port.

Parameters:

port (int) – the USB port number

Return type:

int

Returns:

brainstem error code. 0 if no error.