Expand Minimize Picture-in-picture Power Device Status Voice Recognition Skip Back Skip Forward Minus Plus Play Search
Documentation
Sidebar

AddCommand

Type
Function
Sender
SDL
Purpose
Add a command for voice recognition

Request

If the application sends AddCommand with the vrCommands parameter then SDL must 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 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

Parameters

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

Response

Parameters

This RPC has no additional parameter requirements

Sequence Diagrams

Example Request

{
  "id" : 119,
  "jsonrpc" : "2.0",
  "method" : "VR. AddCommand",
  "params" :
  {
    "cmdID" : 4365,
    "vrCommands" :
    [
         "Leave",
         "Exit",
         "Quit"
    ],
     "grammarID":123,
  "appID" : 64467
  }
}

Example Response

{
  "id" : 119,
  "jsonrpc" : "2.0",
  "result" :
  {
    "code" : 0,
    "method" : "VR.AddCommand"
  }
}

Example Error

{
  "id" : 119,
  "jsonrpc" : "2.0",
  "error" :
  {
    "code" : 13,
    "message" : "Provided appID is not valid",
    "data" :
    {
      "method" : "VR.AddCommand"
    }
  }
}
View on GitHub.com
Previous Section Next Section