• Quick Start
  • Booting
  • Platform
  • Portals
  • References
    • API Reference TOI3
    • IIP Reference
  • Resources
ARRIS Enterprises, Inc. Confidential Information
Public Member Functions | Public Attributes | Public Types
IPlatformService Interface Reference

Description

The IPlatformService interface is implemented by the Platform Service which supervises the operation of all components in the platform. All components must use this interface to tell the Platform Service they have initialized successfully. If a component cannot initialize successfully it should just exit, which is a condition the Platform Service will detect very rapidly and it will handle the situation appropriately.

See also:
IToiPlatformService

List of all members.

Public Member Functions

void ReportComponent (in long serviceId, in string address) raises (TToiInvalidArgumentException)
void UnloadDone (in long serviceId) raises (TToiInvalidArgumentException)
oneway void ReportPing (in long serviceId)
void IsInStandby (out boolean value)
void GetStartupType (out TStartupType type)
oneway void SetStartupType (in TStartupType startupType)
oneway void RestartPlatformNow ()
oneway void ReportApplicationShutdownComplete ()
void RegisterFactoryResetHandler (in string address, out long handlerId) raises (TToiInvalidArgumentException)
void UnregisterFactoryResetHandler (in long handlerId) raises (TToiInvalidArgumentException)
oneway void FactoryResetHandlerDone (in long handlerId)
oneway void AddDatabase (in IToiPlatformService::TToiDatabaseInfo report)
void CreatePowerControlInstanceInternal (in IToiPowerControl::TToiPowerProfileAccess access, in string serviceName, out string address)
void RegisterStartupHandler (out long id)
void ReportStartupStatus (in long id, in TStatusCode statusCode)
void RegisterObserverInternal (in string address) raises (TToiInvalidArgumentException)
void AddAppDataPathForRemoval (in IToiApplicationService::TToiApplicationId appId, in long flags, in string path) raises (TToiInvalidArgumentException, TToiPermissionDeniedException)
void ClearFastbootFlag () raises (TToiNotEnoughResourcesException)

Public Attributes

const string FLASH_APPLICATION_PATH = "/flash/applications"

Public Types

enum  TStartupType {
  STARTUP_TYPE_POWER_ON, STARTUP_TYPE_REBOOT, STARTUP_TYPE_WAKE_UP, STARTUP_TYPE_PLATFORM_FAILURE,
  STARTUP_TYPE_PLATFORM_RESTART, STARTUP_TYPE_RESET_LEVEL_0, STARTUP_TYPE_RESET_LEVEL_1, STARTUP_TYPE_RESET_LEVEL_2,
  STARTUP_TYPE_RESET_LEVEL_3
}
enum  TStatusCode { STATUS_CODE_OK, STATUS_CODE_PENDING, STATUS_CODE_NO_NETWORK, STATUS_CODE_NO_IP_ADDRESS }

Member Enumeration Documentation

enum IPlatformService::TStartupType

The TStartupType enumerates the ways in which the platform can be starting up.

Enumerator:
STARTUP_TYPE_POWER_ON 

The platform is starting after a hard reset (Power On)

STARTUP_TYPE_REBOOT 

The platform is rebooting due to a soft reset

STARTUP_TYPE_WAKE_UP 

The platform is waking up from power save mode. This mode is not used yet.

STARTUP_TYPE_PLATFORM_FAILURE 

The platform is restarting due to a failure in some platform component

STARTUP_TYPE_PLATFORM_RESTART 

Platform was restarted in standby mode

STARTUP_TYPE_RESET_LEVEL_0 

The platform is restarting after a reset is requested, and few, if any, configuration settings are removed.

STARTUP_TYPE_RESET_LEVEL_1 

The platform was reset before receiving a fresh set of configuration settings from a headend. In preparation, many configuration settings were removed.

STARTUP_TYPE_RESET_LEVEL_2 

Most platform settings were erased on this type of reset.

STARTUP_TYPE_RESET_LEVEL_3 

Most platform settings were erased on this type of reset. In addition, all applications were removed as well.

enum IPlatformService::TStatusCode
Enumerator:
STATUS_CODE_OK 

It is now fine to call IPlatformComponent::OnLoad() from the perspective of the reporting service.

STATUS_CODE_PENDING 

The previous error code is now invalid and the reporting service will soon report a new status. This is used to clear it's previous error message from boot splash.

STATUS_CODE_NO_NETWORK 

No network available. Typically the network cable is not plugged in.

STATUS_CODE_NO_IP_ADDRESS 

No IP address could be obtained from the DHCP server.


Member Function Documentation

void IPlatformService::AddAppDataPathForRemoval ( in IToiApplicationService::TToiApplicationId  appId,
in long  flags,
in string  path 
) raises (TToiInvalidArgumentException, TToiPermissionDeniedException)

Add path that needs to be removed by platform service in factory reset.

Parameters:
appIdApplication identifier.
flagsFlags indicating which parts to reset.
See also:
TToiResetFlag.
Parameters:
pathPath to the file/directory.
Exceptions:
TToiInvalidArgumentExceptionRaised if the specified path is invalid.
TToiPermissionDeniedExceptionRaised if lack of permission to remove the path.
oneway void IPlatformService::AddDatabase ( in IToiPlatformService::TToiDatabaseInfo  report)

Adds status information about a system database. The information can be retreived using IToiPlatformService::GetDatabases.

void IPlatformService::ClearFastbootFlag ( ) raises (TToiNotEnoughResourcesException)

Can be used by client to disable fast boot flag

Exceptions:
TToiNotEnoughResourcesExceptionRaised if dbl resource cannot be opened.
void IPlatformService::CreatePowerControlInstanceInternal ( in IToiPowerControl::TToiPowerProfileAccess  access,
in string  serviceName,
out string  address 
)
Technical Preview:
This method is a TECHNICAL PREVIEW, it may change.

This method creates a power control instance that a service can use for power management purposes. Note that services are always expected to vote during power profile switches but not to initiate a switch. Consequently this call contains fewer parameters than the corresponding TOI method.

Parameters:
accessDetermines if the registering service wants to be able to have access to initiate power profile switches. Note that usually a service should not have that access, you should have very good reasons for giving a service that access.
serviceNameThe service name is only used for platform debugging purposes.
Return values:
addressAddress to an IToiPowerControl interface.
oneway void IPlatformService::FactoryResetHandlerDone ( in long  handlerId)

A factory reset handler must call FactoryResetHandlerDone after having received an IFactoryResetHandler::PerformFactoryReset callback and completed the requested reset to report that it has done its part of the factory reset.

Parameters:
handlerIdThe id returned from RegisterFactoryResetHandler.
void IPlatformService::GetStartupType ( out TStartupType  type)

A platform component can call this method to get information about the current startup mode.

Return values:
typethe current startup mode
void IPlatformService::IsInStandby ( out boolean  value)

A platform component can call this IsInStandby to get information if we are in standby mode.

Return values:
valuetrue if we are in standby mode.
void IPlatformService::RegisterFactoryResetHandler ( in string  address,
out long  handlerId 
) raises (TToiInvalidArgumentException)

Register an IFactoryResetHandler callback interface to do something when IToiPlatformService::FactoryReset is called.

The platform service will call all registered handlers, passing along the reset flags. The handler is expected to take action after examining the flags and call FactoryResetHandlerDone when done.

Parameters:
addressThe address to the IFactoryResetHandler callback interface.
Return values:
handlerIdA unique id that the handler must use in the FactoryResetHandlerDone callback.
Exceptions:
TToiInvalidArgumentExceptionAn invalid argument exception will be raised if the address parameter is invalid.
void IPlatformService::RegisterObserverInternal ( in string  address) raises (TToiInvalidArgumentException)

Add an internal platform service observer.

Parameters:
addressIPC address to an observer that implements the IToiPlatformObserver interface.
Exceptions:
TToiInvalidArgumentExceptionRaised if the specified address is not a legal IPC address.
void IPlatformService::RegisterStartupHandler ( out long  id)
Technical Preview:
This method is a TECHNICAL PREVIEW, it may change.

This method should be called before ReportComponent() by the services that wants to give a positive or negative startup status code through ReportStartupStatus(). Not before all startup handlers has reported STATUS_CODE_OK the platform service calls IPlatformComponent::OnLoad(). This is used to print an error message at boot time if for example the net service fails to receive an IP address from the DHCP when an IP address is required to boot.

Return values:
idA unique ID to be used when calling ReportStartupStatus().
oneway void IPlatformService::ReportApplicationShutdownComplete ( )

Used by appman to report that all applications have been shut down completely.

void IPlatformService::ReportComponent ( in long  serviceId,
in string  address 
) raises (TToiInvalidArgumentException)

A platform component must call the ReportComponent function exactly once after it has initialized successfully. When doing so, it registers an IPlatformComponent callback interface on which the Platform Service will notify the component about changes in the system execution state.

Parameters:
serviceIdThe id of the component registering its IPlatformComponent interface.
addressThe address to the IPlatformComponent callback interface implemented by the component.
Exceptions:
TToiInvalidArgumentExceptionAn invalid argument exception will be raised if the serviceId parameter is not recognized by the Platform Service.
oneway void IPlatformService::ReportPing ( in long  serviceId)

A platform component must call ReportPing after receiving a IPlatformComponent::Ping to report it is still alive.

Parameters:
serviceIdThe id of the component registering its IPlatformComponent interface.
void IPlatformService::ReportStartupStatus ( in long  id,
in TStatusCode  statusCode 
)
Technical Preview:
This method is a TECHNICAL PREVIEW, it may change.

This method is used by services that have registered through RegisterStartupHandler() to report the startup status.

Parameters:
idThe unique ID which was returned by RegisterStartupHandler().
statusCodeThe startup status code.
See also:
RegisterStartupHandler()
TStartupStatusCode
oneway void IPlatformService::RestartPlatformNow ( )

Used by appman to restart the platform if an application fails.

oneway void IPlatformService::SetStartupType ( in TStartupType  startupType)

A platform component can call this method to set the current startup mode.

Parameters:
startupTypeThe type to which the current startup type should be set.
void IPlatformService::UnloadDone ( in long  serviceId) raises (TToiInvalidArgumentException)

A platform component must call UnloadDone after receiving a IPlatformComponent::OnUnload and shutting down all running applications.

Parameters:
serviceIdThe id of the component registering its IPlatformComponent interface.
Exceptions:
TToiInvalidArgumentExceptionAn invalid argument exception will be raised if the serviceId parameter is not recognized by the Platform Service.
void IPlatformService::UnregisterFactoryResetHandler ( in long  handlerId) raises (TToiInvalidArgumentException)

Unregisters a previously registered factory reset handler.

Parameters:
handlerIdThe id returned from RegisterFactoryResetHandler.
Exceptions:
TToiInvalidArgumentExceptionRaised if the handler id is invalid.

5.0.1

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