public class OnCommand extends RPCNotification
Note: Sequence of OnHMIStatus and OnCommand notifications for user-initiated interactions is indeterminate.
HMI Status Requirements:Parameter List:
| Name | Type | Description | Notes | SmartDeviceLink Ver Available |
|---|---|---|---|---|
| cmdID | Integer | The cmdID of the command the user selected. This is the cmdID value provided by the application in the AddCommand operation that created the command. | SmartDeviceLink 1.0 | |
| triggerSource | TriggerSource | Indicates whether command was selected via VR or via a menu selection (using the OK button). | SmartDeviceLink 1.0 |
AddCommand,
DeleteCommand,
DeleteSubMenu| Modifier and Type | Field and Description |
|---|---|
static String |
KEY_CMD_ID |
static String |
KEY_TRIGGER_SOURCE |
function, KEY_CORRELATION_ID, KEY_FUNCTION_NAME, KEY_NOTIFICATION, KEY_PARAMETERS, KEY_REQUEST, KEY_RESPONSE, messageType, parametersKEY_BULK_DATA, KEY_PROTECTED, store| Constructor and Description |
|---|
OnCommand()
Constructs a newly allocated OnCommand object
|
OnCommand(Hashtable<String,Object> hash)
Constructs a newly allocated OnCommand object indicated by the Hashtable parameter
|
OnCommand(Integer cmdID,
TriggerSource triggerSource)
Constructs a newly allocated OnCommand object
|
| Modifier and Type | Method and Description |
|---|---|
Integer |
getCmdID()
Returns an Integer object representing the Command ID
|
TriggerSource |
getTriggerSource()
Returns a TriggerSource object which will be shown in the HMI
|
OnCommand |
setCmdID(Integer cmdID)
Sets a Command ID
|
OnCommand |
setTriggerSource(TriggerSource triggerSource)
Sets TriggerSource
|
getBoolean, getDouble, getFloat, getFunctionID, getFunctionName, getInteger, getLong, getMessageType, getObject, getParameters, getString, setFunctionName, setParametersclone, deserializeJSON, equals, format, formatObject, getBulkData, getMessageTypeName, getStore, getStoreValue, getValue, getValueForString, hashCode, hasKey, isPayloadProtected, serializeJSON, serializeJSON, setBulkData, setPayloadProtected, setValuepublic static final String KEY_CMD_ID
public static final String KEY_TRIGGER_SOURCE
public OnCommand()
public OnCommand(Hashtable<String,Object> hash)
Constructs a newly allocated OnCommand object indicated by the Hashtable parameter
hash - The Hashtable to usepublic OnCommand(@NonNull
Integer cmdID,
@NonNull
TriggerSource triggerSource)
cmdID - an integer object representing a Command IDtriggerSource - a TriggerSource objectpublic Integer getCmdID()
Returns an Integer object representing the Command ID
public OnCommand setCmdID(@NonNull Integer cmdID)
Sets a Command ID
cmdID - an integer object representing a Command IDpublic TriggerSource getTriggerSource()
Returns a TriggerSource object which will be shown in the HMI
public OnCommand setTriggerSource(@NonNull TriggerSource triggerSource)
Sets TriggerSource
Indicates whether command was selected via VR or via a menu selection (using the OK button).
triggerSource - a TriggerSource object