Method Summary
| getCurrentPowerProfile ( ) → profile |
Returns the current power profile. |
| releaseInstance ( ) |
This method to release a power control instance. Power control instances are created by using ToiPlatformService. |
|
reportPowerProfile
(
|
When a profile switch has been initiated this call is used to report the currently lowest possible power profile. |
| reportPowerProfileActionsComplete ( ) |
This call is used to acknowledge that the selected power profile can now be executed. |
|
requestPowerProfile
(
|
This method is used to request a change in power profile. |
|
setWakeupTimeout
(
|
An application can use this method to request a wakeup to active standby. If the device is in active when the timer expires nothing happens. This method must be called for each round of voting since the platform won't save values between voting rounds. |
Inherited Methods
|
addEventListener
(
|
This method registers an event listener for a specific event. Multiple listeners can be added for the same event. Events are broadcast to all registered listeners. |
|
removeEventListener
(
|
This method removes an event listener for a specific event. |
Type Definitions
|
These power profiles are a mix of European Power Code of Conduct, Energy Star and IEC. |
|
|
Power profile control possibility. |
|
|
The possible reasons for a device to switch power profile. |
|
Methods
This method registers an event listener for a specific event. Multiple listeners can be added for the same event. Events are broadcast to all registered listeners.
Inherited From:
Parameters:
-
Name Type Description typenumber The event type of the event to subscribe to.
listenerToiEventListener The JavaScript function that will receive events.
Throws:
-
ToiInvalidArgumentException Raised if the event type is not supported by this object or if the listener is not a valid JavaScript function. This exception is also raised if the application calls addEventListener with the same combination of type and listener twice.
Returns the current power profile.
Returns:
-
Type: ToiPowerControl.ToiPowerProfile
The current power profile.
This method to release a power control instance. Power control instances are created by using ToiPlatformService.
This method removes an event listener for a specific event.
Inherited From:
Parameters:
-
Name Type Description typenumber The event type of the event to remove the listener from.
listenerToiEventListener The JavaScript function that was previously added as an event listener.
Throws:
-
ToiInvalidArgumentException Raised if the event type is not supported by this object or if the listener is not a valid JavaScript function. This exception is also raised if the listener has not previously been added.
When a profile switch has been initiated this call is used to report the currently lowest possible power profile.
Parameters:
-
Name Type Description profileToiPowerControl.ToiPowerProfile Denotes the lowest power profile currently possible for the responding application/service.
Throws:
-
ToiInvalidPreconditionException Raised if this call is made without an ongoing voting procedure.
This call is used to acknowledge that the selected power profile can now be executed.
See also:
Throws:
-
ToiInvalidPreconditionException Raised if this call is made without an ongoing voting procedure.
This method is used to request a change in power profile.
Parameters:
-
Name Type Description profileToiPowerControl.ToiPowerProfile Denotes the desired power profile.
reasonToiPowerControl.ToiPowerProfileChangeReason Denotes the reason for requesting a power profile switch.
Throws:
-
ToiInvalidArgumentException Raised if the power profile or reason is incorrect.
ToiPermissionDeniedException Raised if an application that hasn't registered for power profile request tries to request a new power profile.
ToiInvalidPreconditionException Raised if this call is made during an ongoing vote.
An application can use this method to request a wakeup to active standby. If the device is in active when the timer expires nothing happens. This method must be called for each round of voting since the platform won't save values between voting rounds.
Parameters:
-
Name Type Description timeSpannumber Seconds until next wakeup.
Throws:
-
ToiInvalidPreconditionException Raised if this call is made without an ongoing voting procedure.
Members
This is an Event identifier for ToiPowerControlAutoPowerDownTimerExpiredEvent.
The power control issues this event when there has not been any user input during a pre-determined time span. The event is only triggered for application(s) in ToiPowerControl.ACCESS_REPORT_AND_REQUEST mode. Application(s) can use this information to initiate their own tailored auto power down.
This is an Event identifier for ToiPowerControlPowerProfileRequestedEvent.
This call is used by the power control to initiate a switch in the power profile. Interested parties need to register for the event and can also affect the outcome by calling ToiPowerControl#reportPowerProfile.
This is an Event identifier for ToiPowerControlPowerProfileSelectedEvent.
This call is used by the power control to communicate the selected profile.
The application wants the possibility to initiate power profile switches.
The application does not want to initiate a power profile switch.
The device is in active mode.
The device is in active mode but all video and audio outputs are disabled.
Passive standby. Real power saving mode. Sometimes known as energy saving or energy efficient mode.
The auto power down timer has expired.
A reason that isn't specific in any way.
Information about a power controller.
Struct fields
| Name | Description |
|---|---|
| access | The power controller access possibility. Type: ToiPowerControl.ToiPowerProfileAccess |