• Quick Start
  • Booting
  • Platform
  • Portals
  • References
    • API Reference TOI3
    • IIP Reference
  • Resources
ARRIS Enterprises, Inc. Confidential Information

ToiPlatformService

Class Summary

Extends:
  • ToiEventTarget

The Platform Service contains functions for rebooting, standby and factory reset.

Service:

This is a service and can be accessed through toi.platformService
  • Methods
  • Members
  • Types
  • Events

Method Summary

createPowerControlInstance ( access )  → ToiPowerControl

This method creates a power control instance that allows an application to do power management.

factoryReset ( flags )

Perform factory reset. Which parts of the persistent storage that is reset to factory state is dependent on which flags that are given to the function call. After the reset is perform, the STB will reboot to ensure that it boots up in a factory reset state.

getPowerControllerInfo ( )  → Array.<ToiPowerControl.ToiPowerControllerInfo>

Returns information of available power controller.

reboot ( rebootType )

Reboot the platform.

Inherited Methods

addEventListener ( type , listener )

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 ( type , listener )

This method removes an event listener for a specific event.

Type Definitions

ToiRebootType (Type: enum)

The reboot type indicates when to reboot the STB.

  • REBOOT_TYPE_AT_NEXT_STANDBY
  • REBOOT_TYPE_NOW
ToiResetFlag (Type: enum)

The reset flag indicates which parts of the STB that shall be reset when a factory reset is performed.

  • FULL_RESET
  • REMOVE_BOOKINGS
  • REMOVE_BOOTLOADER_BYPASS
  • REMOVE_CHANNELS
  • REMOVE_PERSISTENT_COOKIES
  • REMOVE_PERSISTENT_INFORMATION_OBJECTS
  • REMOVE_PORTAL_DATABASES
  • REMOVE_SECONDARY_APPLICATION_DATA
  • RESET_RCU_PAIRING
  • RESET_TR069_DATA_MODEL

Events

  • ON_POWER_CONTROLLER_STATUS_CHANGED

Methods

addEventListener ( type , listener )

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:

  • ToiEventTarget#addEventListener

Parameters:

Name Type Description
type number

The event type of the event to subscribe to.

listener ToiEventListener

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.

createPowerControlInstance ( access )  → ToiPowerControl

This method creates a power control instance that allows an application to do power management.

Parameters:

Name Type Description
access ToiPowerControl.ToiPowerProfileAccess

Determines if the registering application wants to be able to have access to initiate power profile switches.

Throws:

ToiInvalidArgumentException

Raised if the specified application identifier is invalid.

ToiPermissionDeniedException

Raised if an application tries to register for control possibility when the maximum number of applications already has registered for control possibility.

Returns:

Address to an ToiPowerControl interface.

Type: ToiPowerControl
factoryReset ( flags )

Perform factory reset. Which parts of the persistent storage that is reset to factory state is dependent on which flags that are given to the function call. After the reset is perform, the STB will reboot to ensure that it boots up in a factory reset state.

See also:

  • ToiPlatformService.ToiResetFlag

Parameters:

Name Type Description
flags number

Flags indicating which parts to reset.

Throws:

ToiOperationNotSupportedException

Raised if some error occurred.

getPowerControllerInfo ( )  → Array.<ToiPowerControl.ToiPowerControllerInfo>

Returns information of available power controller.

Technical Preview:

This method is a TECHNICAL PREVIEW, it may change.

Returns:

A sequence of power controller information.

Type: Array.<ToiPowerControl.ToiPowerControllerInfo>
reboot ( rebootType )

Reboot the platform.

Note:

This method can also be accessed using the alias rebootAtNextStandby(), which is equal to Reboot(REBOOT_TYPE_AT_NEXT_STANDBY). The alias will be removed in TOI/JS version 3.2.

Parameters:

Name Type Description
rebootType ToiPlatformService.ToiRebootType

What type of reboot that should take place.

removeEventListener ( type , listener )

This method removes an event listener for a specific event.

Inherited From:

  • ToiEventTarget#removeEventListener

Parameters:

Name Type Description
type number

The event type of the event to remove the listener from.

listener ToiEventListener

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.

Members

ON_POWER_CONTROLLER_STATUS_CHANGED (Type: ToiPlatformPowerControllerStatusChangedEvent) (value = 401) (static, constant)

This is an Event identifier for ToiPlatformPowerControllerStatusChangedEvent.

Called when an application has registered or released for power control.

This constant can also be accessed from toi.consts.ToiPlatformService.ON_POWER_CONTROLLER_STATUS_CHANGED.
FULL_RESET (Type: ToiPlatformService.ToiResetFlag) (value = 65535) (static, constant)

Perform a full factory reset.

This constant can also be accessed from toi.consts.ToiPlatformService.FULL_RESET.
REBOOT_TYPE_AT_NEXT_STANDBY (Type: ToiPlatformService.ToiRebootType) (value = 1) (static, constant)

Reboot the platform the next time the system goes from active to standby state. This is used for starting a new boot image in a way that is less disturbing to the end user. Note that ToiInformationService.CFG_STANDBY_ALLOWREBOOT will be checked before box reboot in a standby state. Reboot will happen only when its value is TRUE.

This constant can also be accessed from toi.consts.ToiPlatformService.REBOOT_TYPE_AT_NEXT_STANDBY.
REBOOT_TYPE_NOW (Type: ToiPlatformService.ToiRebootType) (value = 0) (static, constant)

Reboot the platform immediately in a controlled way. If fast boot is supported the fast boot flag is cleared only if there is an software update available. This is useful to force the usage of a new boot image after upgrade.

This constant can also be accessed from toi.consts.ToiPlatformService.REBOOT_TYPE_NOW.
REMOVE_BOOKINGS (Type: ToiPlatformService.ToiResetFlag) (value = 128) (static, constant)

Empties the scheduler database.

This constant can also be accessed from toi.consts.ToiPlatformService.REMOVE_BOOKINGS.
REMOVE_BOOTLOADER_BYPASS (Type: ToiPlatformService.ToiResetFlag) (value = 512) (static, constant)

Remove bootloader bypass.

This constant can also be accessed from toi.consts.ToiPlatformService.REMOVE_BOOTLOADER_BYPASS.
REMOVE_CHANNELS (Type: ToiPlatformService.ToiResetFlag) (value = 64) (static, constant)

Remove the channel database.

This constant can also be accessed from toi.consts.ToiPlatformService.REMOVE_CHANNELS.

Technical Preview:

The flag REMOVE_CHANNELS is a TECHNICAL PREVIEW, it may change.
REMOVE_PERSISTENT_COOKIES (Type: ToiPlatformService.ToiResetFlag) (value = 2) (static, constant)

Remove all persistent cookies for SVG and HTML browsers.

This constant can also be accessed from toi.consts.ToiPlatformService.REMOVE_PERSISTENT_COOKIES.
REMOVE_PERSISTENT_INFORMATION_OBJECTS (Type: ToiPlatformService.ToiResetFlag) (value = 8) (static, constant)

Remove all persistent InformationService objects, including network, audio and video settings.

This constant can also be accessed from toi.consts.ToiPlatformService.REMOVE_PERSISTENT_INFORMATION_OBJECTS.
REMOVE_PORTAL_DATABASES (Type: ToiPlatformService.ToiResetFlag) (value = 4) (static, constant)

Remove all local web storage databases for SVG and HTML browsers.

This constant can also be accessed from toi.consts.ToiPlatformService.REMOVE_PORTAL_DATABASES.
REMOVE_SECONDARY_APPLICATION_DATA (Type: ToiPlatformService.ToiResetFlag) (value = 256) (static, constant)

Remove all storage data for secondary applications.

This constant can also be accessed from toi.consts.ToiPlatformService.REMOVE_SECONDARY_APPLICATION_DATA.
RESET_RCU_PAIRING (Type: ToiPlatformService.ToiResetFlag) (value = 1024) (static, constant)

Reset RCU pairing.

This constant can also be accessed from toi.consts.ToiPlatformService.RESET_RCU_PAIRING.
RESET_TR069_DATA_MODEL (Type: ToiPlatformService.ToiResetFlag) (value = 16) (static, constant)

Reset the TR-069 data model.

This constant can also be accessed from toi.consts.ToiPlatformService.RESET_TR069_DATA_MODEL.

Events

ON_POWER_CONTROLLER_STATUS_CHANGED ( )

This is an Event identifier for ToiPlatformPowerControllerStatusChangedEvent.

Value: 401

5.1.1.p8

Copyright (c) 2018 ARRIS Enterprises, LLC. All Rights Reserved. ARRIS Enterprises, LLC. Confidential Information.