ioBuster framework v25.02.4 documentation


powerController

powerController

Collection of power controller related functions

Methods

(static) disablePowerMonitor()

Stops monitoring power

(static) enablePowerMonitor(logname)

Continuously monitors power and writes monitored data to a file.

Example
logger.create('power', 'power.log')
powerController.enablePowerMonitor(index, 'power')
Parameters:
Name Type Description
logname string

Log descriptor name for a logger.

(static) init(manufactureropt, options)

Initializes Power Controller

Parameters:
Name Type Attributes Default Description
manufacturer string <optional>
'auto'

power controller manufacturer.

Available power controller manufacturers:

  • auto
  • generic
  • ardent
  • qamaestro
options powerController.GenericOptions | powerController.ArdentOptions | powerController.QamaestroOptions

power controller options

The following options are common across all power controllers:

Properties
Name Type Attributes Default Description
onHoldTimeMs number <optional>
2000

default on hold time value

offHoldTimeMs number <optional>
2000

default off hold time value

(static) powerCycle(optionsopt)

Turns off and on the attached device.

Parameters:
Name Type Attributes Description
options Object <optional>

Power cycle options

Properties
Name Type Attributes Default Description
onHoldTimeMs Number <optional>
2000

Power on hold time in milliseconds

offHoldTimeMs Number <optional>
2000

Power off hold time in milliseconds

(static) powerOff(optionsopt)

Turns off the attached device using the attached power controller.

Parameters:
Name Type Attributes Description
options Object <optional>

Power off options

Properties
Name Type Attributes Default Description
offHoldTimeMs Number <optional>
2000

Power off hold time in milliseconds

(static) powerOn(optionsopt)

Turns on the attached device using the attached power controller.

Parameters:
Name Type Attributes Description
options Object <optional>

Power on options

Properties
Name Type Attributes Default Description
onHoldTimeMs Number <optional>
2000

Power on hold time in milliseconds

(static) uninit()

Uninitializes the power controller

Type Definitions

ArdentOptions

Properties:
Name Type Description
options.interfaceNumber Number

USB interface number

options.serial String

USB serial number. Typically starts with PMU-V2.

options.baudRate String

serial port baud rate. Typically 115200.

options.model String

power controller model

Support Models:

  • pmu-skhynix
  • pmu-fadu
  • pmu
Type:
  • Object

GenericOptions

Properties:
Name Type Description
options.onScript String

Power on script path. This path is relative to the current script path.

options.offScript String

Power off script path. This path is relative to the current script path.

Type:
  • Object

QamaestroOptions

Properties:
Name Type Description
options.interfaceNumber Number

USB interface number

options.serial String

USB serial number. Typically starts with IOB-PORT.

options.baudRate String

serial port baud rate. Typically 115200.

Type:
  • Object