| ARRIS Enterprises, Inc. Confidential Information |
Power Management / StandbyPower Management (aka Standby) is a complex subject. Please also refer to the following documents:
The portal first creates an instance of a power controller with a call to
<sdk_root>/examples/example-html-portal/index.js
Applications can choose one of two ways to access this power controller:
Power Profile requestsWhen a change in power profile (standby state) is requested, the KreaTV platform notifies applications via the ToiPowerControl.ON_POWER_PROFILE_REQUESTED and ToiPowerControl.ON_POWER_PROFILE_SELECTED events. Implementing these power profile change requests in response to standby button presses or the auto power down timer is handled by the platform. The portal next adds two listeners for these events, as follows: <sdk_root>/examples/example-html-portal/powermanagement.js
In addition, the portal initializes some variables it uses when changing power profile. These are discussed later.
Handling a Power Profile Request
When the end-user presses Standby on the remote
control, or when the auto power down timer expires, the KreaTV platform generates an
<sdk_root>/examples/example-html-portal/powermanagement.js
The portal replies by calling
No request is issued when transitioning from Standby to active, since no application will refuse this. Handling the Profile Selected event
When each of the running applications (your portal, any secondary applications and KreaTV platform services) have
reported the lowest profile they can accept, the KreaTV platform determines the
lowest profile which is acceptable to all applications. It then informs all the
applications of this selection with an event,
Once the portal has completed it's actions (more on this in a moment), it calls
Actions
Depending on the power profile selected (that is, the one being transitioned to),
the portal may wish to perform certain actions before the profile change is actually carried out. For example, if the selected profile is <sdk_root>/examples/example-html-portal/powermanagement.js
The media player does not instantly open or close. The example portal adds a media media player state change listener, which gets called each time the media player completes a state change. Most of these are uninteresting, unless <sdk_root>/examples/example-html-portal/powermanagement.js
The <sdk_root>/examples/example-html-portal/powermanagement.js
Wake-up timerIf a wake-up timer is desired, call Don't forget to remove the listeners and release the powerControl instance in the portal unload code. For more information on Power Management in general, see the Power Management Service documentation. Auto Power Down Timer
A configuration object,
Auto power down can be disabled by setting the value of the timer to 0. Note however that it is not permitted to supply the end user with software which has this feature disabled by default. Additional notesListeners on Information Service objectsIf you use an Infocast server, when the STB wakes up from passive standby it is not certain that the same configuration objects are still being transmitted from the Infocast server. To prevent the portal from using potentially stale data, the value of objects transmitted over the network will be reset to an empty string as the platform starts up again. If the portal has subscribed to changes on any of these objects, this resetting of the object will trigger the listener function. In addition, a short moment later a current value may be received from Infocast server, and the listener will be triggered again, this time with the configuration object holding the received data. |