import { IOcaPowerState, OcaPowerState } from '../../types/OcaPowerState.js'; import { PropertyEvent } from '../property_event.js'; import { RemoteDevice } from '../remote_device.js'; import { OcaManager } from './OcaManager.js'; /** * Optional manager that manages power settings and state. * * - May be instantiated at most once in any device. * * - If instantiated, object number must be 5. * * * @extends OcaManager * @class OcaPowerManager */ export declare class OcaPowerManager extends OcaManager { /** * This event is emitted whenever State changes. */ OnStateChanged: PropertyEvent; /** * This event is emitted whenever PowerSupplies changes. */ OnPowerSuppliesChanged: PropertyEvent; /** * This event is emitted whenever ActivePowerSupplies changes. */ OnActivePowerSuppliesChanged: PropertyEvent; /** * This event is emitted whenever AutoState changes. */ OnAutoStateChanged: PropertyEvent; /** * This event is emitted whenever TargetState changes. */ OnTargetStateChanged: PropertyEvent; constructor(objectNumber: number, device: RemoteDevice); /** * Retrieve the value of property **State**, the current power state of the * device. * * @method OcaPowerManager#GetState * @returns {Promise} * A promise which resolves to a single value of type :class:`OcaPowerState`. */ GetState(): Promise; /** * Change the target power state. Erroneously named **SetState** prior to v3 * of this class. * * @method OcaPowerManager#SetTargetState * @param {IOcaPowerState} State * * @returns {Promise} */ SetTargetState(State: IOcaPowerState): Promise; /** * Change the target power state. Erroneously named **SetState** prior to v3 * of this class. * An alias for SetTargetState. * * @method OcaPowerManager#SetState * @param {IOcaPowerState} State * * @returns {Promise} */ SetState(State: IOcaPowerState): Promise; /** * Retrieves list of object number(s) of all power supply(ies). * * @method OcaPowerManager#GetPowerSupplies * @returns {Promise} * A promise which resolves to a single value of type ``number[]``. */ GetPowerSupplies(): Promise; /** * Retrieves list of object number(s) of active power supply(ies). * * @method OcaPowerManager#GetActivePowerSupplies * @returns {Promise} * A promise which resolves to a single value of type ``number[]``. */ GetActivePowerSupplies(): Promise; /** * Deactivate one power supply and activate another. An option switch * indicates whether the previously active power supply is to be turned off. * If it is not turned off, it will be placed in the **Unavailable** state. * * @method OcaPowerManager#ExchangePowerSupply * @param {number} oldPsu * @param {number} newPsu * @param {boolean} powerOffOld * * @returns {Promise} */ ExchangePowerSupply( oldPsu: number, newPsu: number, powerOffOld: boolean ): Promise; /** * Gets the value of the **AutoState** property. * * @method OcaPowerManager#GetAutoState * @returns {Promise} * A promise which resolves to a single value of type ``boolean``. */ GetAutoState(): Promise; /** * Retrieve the value of property** TargetState**, the power state of the * device to which the device is transitioning. * * @method OcaPowerManager#GetTargetState * @returns {Promise} * A promise which resolves to a single value of type :class:`OcaPowerState`. */ GetTargetState(): Promise; }