If the HMI reports to SDL via Buttons.GetCapabilities that it supports long and/or short button press modes, SDL expects the HMI to send the Buttons.OnButtonPress notification but buttons that have been subscribed via Buttons.OnButtonSubscription and custom buttons added in other RPCs as Soft Buttons.
The hmi must send the name of the button pressed, the press mode detected, and ID of the button if it has type CUSTOM_BUTTON
and the appID related to the button press. If only SHORT
button press mode is supported, the hmi should send SHORT
regardless of the time of the button press.
The value of customButtonID is provided by SDL within the softButton struct for some RPCs such as UI.Alert
Name | Type | Mandatory | Additional |
---|---|---|---|
name | Common.ButtonName | true | |
mode | Common.ButtonPressMode | true | |
customButtonID | Integer | false | minvalue: 0 maxvalue: 65536 |
appID | Integer | false |
{ "jsonrpc" : "2.0", "method" : "Buttons.OnButtonPress", "params" : { "name" : "CUSTOM_BUTTON", "mode" : "SHORT", "customButtonID" : 564 } }