Members

PropertyDescriptions

interface Descriptor { type: 'method' | 'namespace' | 'event' }

interface Profile { [key: string]: Descriptor }

interface NamespaceDescriptor { type: 'namespace' [key: string]: Descriptor }

interface MethodDescriptor { type: 'method' returns: 'promise' }

interface EventDescriptor { type: 'event' }

interface ValueDescriptor { type: 'value' value: any }

eventBus

interface Descriptor { type: 'method' | 'namespace' | 'event' }

interface Profile { [key: string]: Descriptor }

interface NamespaceDescriptor { type: 'namespace' [key: string]: Descriptor }

interface MethodDescriptor { type: 'method' returns: 'promise' }

interface EventDescriptor { type: 'event' }

interface ValueDescriptor { type: 'value' value: any }

subscriptionTable

keep records of subscribed events to deduplicate subscription requests.

objectPath

dbus apps shall be daemon app since they are running alone with vui

skillIdAppIdMap

skillId -> appId

skillAttrsMap

skillId -> skillAttrs

hostSkillIdMap

hostName -> skillId

appManifests

appId -> manifest

_networkConnected

set this._networkConnected = undefined at initial to prevent discarding of very first of network disconnect event.

_checkingNetwork

this._checkingNetwork sets the current network is checking, it should be checked at onNetworkConnect, when it doesn't get down.

_loggedIn

this._loggedIn could be used to determine if current session is once connected to internet.

appDataMap :object

App stack preemption priority data, keyed by app id.

See:

activeSlots :AppSlots

Apps' id running actively.

backgroundAppIds :Array.<string>

Apps' id running in background.

carrierId

Some app may have permissions to call up on other app, in which case, the app which has the permission will be stored on this.carrier, and the one called up preempts the top of stack. Since there is only one app could be on top of stack, single carrier slot might be sufficient.

monopolist

Some app may have permissions to monopolize top of stack, in which case, no other apps could interrupts it's monologue.

appIdOnPause

Determines if lifetime is been paused globally by system. Especially used in device activation to pause currently running app.

muted

indicates microphone muted or not.

awaken

if device is awaken

asrState

asr parsing state, possible values:

  • pending
  • fake
  • end

pickingUp

Turen picking up state.

pickingUpDiscardNext

if next nlp shall be discarded.

solitaryVoiceComingTimeout

handle of timer to determines if current 'voice coming' session is alone, no upcoming asr pending/end is sent in company with it.

noVoiceInputTimeout

handle of timer to determines if current awaken session is no voice input available so far, no upcoming asr pending would be sent any way.

version

asr

cloud_forward

forward

get_volume

set_volume

sys_update_available

reset_settings

custom_config

event

UNIVERSAL_UNBIND

ignoreTtsEvent

the purpose of this variable is to declare whether to ignore the tts event.

Methods

ScheduledTask(task, options)

Creates a new scheduled task.

Parameters:
Name Type Description
task Task

task to schedule.

options *

task options.

start() → {ScheduledTask}

Starts updating the task.

Returns:
Type:
ScheduledTask

instance of this task.

stop() → {ScheduledTask}

Stops updating the task.

Returns:
Type:
ScheduledTask

instance of this task.

getStatus() → {string}

Returns the current task status.

Returns:
Type:
string

current task status. The return may be:

  • scheduled: when a task is scheduled and waiting to be executed.
  • running: the task status while the task is executing.
  • stoped: when the task is stoped.
  • destroyed: whe the task is destroyed, in that status the task cannot be re-started.
  • failed: a task is maker as failed when the previous execution fails.

destroy()

Destroys the scheduled task.

checkUpdateAvailability(activity)

Parameters:
Name Type Description
activity YodaRT.Activity

whatsCurrentVersion(activity)

Parameters:
Name Type Description
activity YodaRT.Activity

onFirstBootAfterUpgrade(activity, url)

Parameters:
Name Type Description
activity YodaRT.Activity
url URL

forceUpgrade(activity, url)

Parameters:
Name Type Description
activity YodaRT.Activity
url URL

mkdirp(dir, callback)

Parameters:
Name Type Description
dir string
callback function

createExtApp(appId, target, runtime)

Author:
Parameters:
Name Type Description
appId string
target string

app home directory

runtime AppRuntime

createExtApp(appId, target, runtime)

Author:
Parameters:
Name Type Description
appId string
target string

app home directory

runtime AppRuntime

EventBus(descriptor, socket, appId)

Parameters:
Name Type Description
descriptor ActivityDescriptor
socket childProcess.ChildProcess
appId string

connect(masterIdopt)

Start connecting to cloud service, which does:

  • login
  • bind
  • sync date from service
Parameters:
Name Type Attributes Description
masterId string <optional>

the master id to bind.

AppChargeur(runtime)

Loads and stores apps manifest for apps.

Parameters:
Name Type Description
runtime AppRuntime

Flora(runtime)

Parameters:
Name Type Description
runtime AppRuntime

onAsr2Nlp()

This:

onAsr2NlpError()

This:

AppSlots()

Active app slots. Only two slots are currently supported: cut and scene. And only two app could be able to be on slots simultaneously.

LaVieEnPile(scheduler)

App life time management

  1. CreateApp -> app created, now inactive
  2. ActivateApp -> app activated, now on top of stack
  3. DeactivateApp -> app deactivated, now inactive
  4. SetBackground -> app running in background
  5. DestroyApp -> app suspended, waiting for eviction
  • OnLifeCycle -> send events to app
Author:
Parameters:
Name Type Description
scheduler AppScheduler

AppScheduler that manages app processes.

Light(dbusRegistry)

convinient tools for call lightd

Parameters:
Name Type Description
dbusRegistry object

dbus client

Sound(runtime)

Convenience methods to configures speaker easily in runtime.

Parameters:
Name Type Description
runtime AppRuntime

Flora(runtime)

Parameters:
Name Type Description
runtime AppRuntime

play(appId, uri, dataopt, optionopt) → {Promise}

play light

Parameters:
Name Type Attributes Description
appId string

your appId

uri string

the path of light uri

data object <optional>

user's data for light

option object <optional>
Name Type Attributes Description
shouldResume boolean <optional>

should resume this light

Returns:
Type:
Promise

stop(appId, uri) → {Promise}

stop specified light through appId, clear recovery layer also

Parameters:
Name Type Description
appId string

your appId

uri string

the uri of light to stop

Returns:
Type:
Promise

stopByAppId(appId) → {Promise}

stop any light through appId, clear recovery layer also

Parameters:
Name Type Description
appId string

your appId

Returns:
Type:
Promise

appSound(appId, uri) → {Promise}

play sound

Parameters:
Name Type Description
appId string

your appId

uri string

the uri of sound

Returns:
Type:
Promise

stopSoundByAppId(appId) → {Promise}

stop sound by specified appId

Parameters:
Name Type Description
appId string

your appId

Returns:
Type:
Promise

Flora(runtime)

Parameters:
Name Type Description
runtime AppRuntime

Flora(runtime)

Parameters:
Name Type Description
runtime AppRuntime

startFeeding(timeout, callback)

Start feeding the watchdog.

Parameters:
Name Type Description
timeout number
callback function

stopFeeding(callback)

Stop the feeding.

Parameters:
Name Type Description
callback function

mockAppExecutors(number, daemon, startIdxopt)

Parameters:
Name Type Attributes Description
number number
daemon boolean
startIdx number <optional>

buildNav(members) → {array}

Create the navigation sidebar.

Parameters:
Name Type Description
members object

The members that will be used to create the sidebar.

Name Type Description
classes array.<object>
externals array.<object>
globals array.<object>
mixins array.<object>
modules array.<object>
namespaces array.<object>
tutorials array.<object>
events array.<object>
interfaces array.<object>
Returns:
Type:
Array

The HTML for the navigation sidebar.

Helper to generate navigation list link wrapper around navigation links for locations.

Parameters:
Name Type Description
linkClass string

navigation link classname

linkContent string

navigation link HTML content

Returns:
Type:
string

buildNavHeading(content) → {String}

Helper to generate navigation list header wrapper around navigation header content for headings and filenames.

Parameters:
Name Type Description
content string

navigation header content

Returns:
Type:
string

buildNavItem(itemContent) → {String}

Helper for generating generic navigation wrapper around content passed for methods, and types.

Parameters:
Name Type Description
itemContent string

navigation item content

Returns:
Type:
string

publish(taffyData, opts, tutorials)

Parameters:
Name Type Description
taffyData TAFFY

See http://taffydb.com/.

opts object
tutorials Tutorial

Type Definitions

AppPreemptionData

Properties:
Name Type Description
form 'cut' | 'scene'

Events

evict

On app been evicted from stack

Parameters:
Name Type Description
appId string

the app id to be evicted

stack-reset

On stack reset, might have be de-bounced