Expand Minimize Picture-in-picture Power Device Status Voice Recognition Skip Back Skip Forward Minus Plus Play Search
Internet Explorer alert
This browser is not recommended for use with smartdevicelink.com, and may not function properly. Upgrade to a different browser to guarantee support of all features.
close alert
To Top Created with Sketch. To Top
To Bottom Created with Sketch. To Bottom
JavaScript Suite Documentation
SdlManager

SdlManager Class Reference

Constructors

Instance Methods

Constructors

new SdlManager(appConfig, managerListener)

Initializes an instance of SdlManager.

Instance Methods

sdlManager.addRpcListener(functionId, listener) ⇒ SdlManager

Add a listener for a given FunctionID

Kind: Instance method of SdlManager
Returns: SdlManager - A reference to this instance to support method chaining.

ParamTypeDescription
functionId Number A Function ID from the RPC Spec
listener function A callback function(RpcMessage)

sdlManager.dispose() ⇒ SdlManager

Gracefully disposes the managers and alerts and destroys the ManagerListener

Kind: Instance method of SdlManager
Returns: SdlManager - A reference to this instance to support method chaining.

sdlManager.getAuthToken() ⇒ [string, null]

Retrieves the Auth Token from the _LifecycleManager

Kind: Instance method of SdlManager
Returns: [string, null] - The auth token.

sdlManager.getCurrentHmiStatus() ⇒ [HMILevel, null]

Retrieves the current HMI status from the _LifecycleManager

Kind: Instance method of SdlManager
Returns: [HMILevel, null] - The HMI Level.

sdlManager.getFileManager() ⇒ [FileManager, null]

Retrieves a reference to the FileManager, if ready

Kind: Instance method of SdlManager
Returns: [FileManager, null] - The FileManager.

sdlManager.getPermissionManager() ⇒ [PermissionManager, null]

Retrieves a reference to the PermissionManager, if ready

Kind: Instance method of SdlManager
Returns: [PermissionManager, null] - The PermissionManager.

sdlManager.getRegisterAppInterfaceResponse() ⇒ [RegisterAppInterfaceResponse, null]

Retrieves the RAI response from the _LifecycleManager

Kind: Instance method of SdlManager
Returns: [RegisterAppInterfaceResponse, null] - A RegisterAppInterfaceResponse.

sdlManager.getScreenManager() ⇒ [ScreenManager, null]

Retrieves a reference to the ScreenManager, if ready

Kind: Instance method of SdlManager
Returns: [ScreenManager, null] - The ScreenManager.

sdlManager.getSystemCapabilityManager() ⇒ SystemCapabilityManager

Retrieves a reference to the SystemCapabilityManager

Kind: Instance method of SdlManager
Returns: SystemCapabilityManager - The SystemCapabilityManager.

sdlManager.removeRpcListener(functionId, listener) ⇒ SdlManager

Remove a listener for a given FunctionID

Kind: Instance method of SdlManager
Returns: SdlManager - A reference to this instance to support method chaining.

ParamTypeDescription
functionId Number A Function ID from the RPC Spec
listener function A callback function(RpcMessage)

sdlManager.sendRpc(message) ⇒ Promise

Sends a single RPC

Kind: Instance method of SdlManager
Returns: Promise - A Promise which resolves if the RPC response is SUCCESS, otherwise rejects

ParamTypeDescription
message RpcMessage An RPC message to send.

sdlManager.sendRpcResolve(message) ⇒ Promise

Sends a single RPC

Kind: Instance method of SdlManager
Returns: Promise - A Promise which resolves regardless of the result code returned

ParamTypeDescription
message RpcMessage An RPC message to send.

sdlManager.sendRpcs(messages) ⇒ Promise

Sends multiple RPCs asynchronously

Kind: Instance method of SdlManager
Returns: Promise - A Promise which resolves if all RPCs respond with SUCCESS, otherwise rejects with the first failure

ParamTypeDescription
messages Array.<RpcMessage> An array of RpcMessages

sdlManager.sendRpcsResolve(messages, onUpdate) ⇒ Promise

Sends multiple RPCs asynchronously

Kind: Instance method of SdlManager
Returns: Promise - A Promise which returns all RPCs when they all resolve, regardless of the result code

ParamTypeDescription
messages Array.<RpcMessage> An array of RpcMessages
onUpdate function A callback function that will be invoked with the result and the remaining requests left

sdlManager.sendSequentialRpcs(messages) ⇒ Promise

Sends multiple RPCs synchronously (in order)

Kind: Instance method of SdlManager
Returns: Promise - A Promise which resolves with the last RPC response if all RPCs respond with SUCCESS, otherwise rejects with the first failure

ParamTypeDescription
messages Array.<RpcMessage> An array of RpcMessages

sdlManager.sendSequentialRpcsResolve(messages, onUpdate) ⇒ Promise

Sends multiple RPCs synchronously (in order)

Kind: Instance method of SdlManager
Returns: Promise - A Promise which returns all responses when they all resolve, regardless of the result code

ParamTypeDescription
messages Array.<RpcMessage> An array of RpcMessages
onUpdate function A callback function that will be invoked with the result and the remaining requests left

sdlManager.start() ⇒ SdlManager

Initializes the LifecycleManager using the AppConfig and starts the transport

Kind: Instance method of SdlManager
Returns: SdlManager - A reference to this instance to support method chaining.

View on GitHub.com
Previous Section Next Section