Module: caf_iot/platform_iot_main

A top level supervisor component that assembles and manages the framework from simpler components as described in framework.json.

This is copied from caf_platform/platform_main to avoid an expensive dependency with caf_platform.

Components are described in file iot.json.

Properties:

  {appPublisher: string, appLocalName: string, appSuffix: string,
   synchronousInit: boolean}

where:

  • appPublisher: the publisher of this app, e.g., root.
  • appLocaName: the name of this app local to its publisher, e.g., helloworld.
  • appSuffix: the URL suffix for the app, i.e., cafjs.com.
  • synchronousInit: true if lazy initialization is disabled, and the callback should return only after the system is fully functional.
Source:

Extends

Methods

__ca_getAppFullName__() → {string}

Returns the application fully qualified name, e.g., root-helloworld.cafjs.com

Source:
Returns:

A fully qualified name for this app.

Type
string

__ca_getAppName__() → {string}

Returns this application name, e.g., root-helloworld

Source:
Returns:

A name for this app.

Type
string

__ca_getAppSuffix__() → {string}

Returns the application domain suffix, e.g., cafjs.com

Source:
Returns:

A domain suffix for this app.

Type
string

__ca_graceful_shutdown__(dataopt, cb0)

A graceful shutdown that waits until a pending checkup has finished.

This is needed mostly for testing, where we want to cleanly start/stop the platform in the same process.

Otherwise, races between shutdown and checkup could bring back to life parts of the platform, affecting other tests.

In production it is easier to brute force shutdown and create a new one, since the state is always checkpointed.

Parameters:
Name Type Attributes Description
data Object <optional>

An optional hint for shutdown.

cb0 cbType

A callback to continue.

Source: