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
RpcStruct

RpcStruct Class Reference

Constructors

Instance Methods

Constructors

new RpcStruct(parameters)

Initializes an instance of RpcStruct.

Instance Methods

rpcStruct.getObject(tClass, key) ⇒ [*, null]

Fetch the value assigned to a given parameter key, coerced to a target class.

Kind: Instance method of RpcStruct
Returns: [*, null] - The value in the desired primitive or instantiated format, otherwise null.

ParamTypeDescription
tClass function A class to instantiate the value into.
key String The key of the parameter to retrieve.

rpcStruct.getParameter(key) ⇒ [*, null]

Get a single parameter value by its key.

Kind: Instance method of RpcStruct
Returns: [*, null] - The value of the parameter. Null if not defined.

ParamTypeDescription
key String The key of the parameter value to retrieve.

rpcStruct.getParameters() ⇒ Object

Get the parameters object.

Kind: Instance method of RpcStruct
Returns: Object - An object map of parameters.

rpcStruct.setParameter(key, value) ⇒ RpcStruct

Set a parameter value for a given key.

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

ParamTypeDescription
key String The key to store the value under.
value * The value to associate with the key.
View on GitHub.com
Previous Section Next Section