If the application sends AddCommand
with the vrCommands
parameter then SDL Core will maintain a list of the added vrCommands
.
For each AddCommand, only the first item in the vrCommands
array shall be added to the list.
Whenever the internal list of added vrCommands
is updated SDL Core must:
Construct the vrHelp
and helpPrompt
parameters using the data from the list SDL created internally.
Send these parameters to the HMI via the SetGlobalProperties
RPC.
If the application sends a CreateInteractionChoiceSet
RPC request that contains vrCommand
parameters, SDL Core will send the HMI a VR.AddCommand
request for each Choice
.
The parameter type
included in the VR.AddCommand
request is the differentiator the HMI should use to know if the VR Command originated from an AddCommand
RPC or a CreateInteractionChoiceSet
RPC.
Choice
type VR Commands should only be used during a PerformInteraction
RPC Request.
Command
type VR Commands should only be used when the user wants to interact with the App's Menu.
During data resumption SDL sends VR.AddCommands to HMI by internal_consecutiveNumber
in the same order as they were created by mobile app in previous ignition cycle.
!!! must
Renew the timeout informing SDL about this event via BC.OnResetTimeout
notification in case it requires more time to process the VR.AddCommand
request (due to a batch of vrCommands
).
Name | Type | Mandatory | Additional |
---|---|---|---|
cmdID | Integer | true | minvalue: 0 maxvalue: 2000000000 |
vrCommands | String | true | array: true minsize: 1 maxsize: 100 maxlength: 99 |
type | Common.VRCommandType | true | |
grammarID | Integer | true | minvalue: 0 maxvalue: 2000000000 |
appID | Integer | false |
This RPC has no additional parameter requirements
{ "id" : 119, "jsonrpc" : "2.0", "method" : "VR.AddCommand", "params" : { "cmdID" : 4365, "vrCommands" : [ "Leave", "Exit", "Quit" ], "grammarID" : 123, "type" : "Command", "appID" : 64467 } }
{ "id" : 119, "jsonrpc" : "2.0", "result" : { "code" : 0, "method" : "VR.AddCommand" } }
{ "id" : 119, "jsonrpc" : "2.0", "error" : { "code" : 13, "message" : "Provided appID is not valid", "data" : { "method" : "VR.AddCommand" } } }