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

Class OnCommand

Hierarchy

java.lang.Object
     com.smartdevicelink.proxy.RPCStruct
         com.smartdevicelink.proxy.RPCMessage
             com.smartdevicelink.proxy.RPCNotification

Package
com.smartdevicelink.proxy.rpc

Overview

This is called when a command was selected via VR after pressing the PTT button, or selected from the menu after pressing the MENU button.

Note: Sequence of OnHMIStatus and OnCommand notifications for user-initiated interactions is indeterminate.

HMI Status Requirements:
    HMILevel:
    • FULL,LIMITED
    AudioStreamingState:
    • Any
    SystemContext:
    • Any

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 OKbutton). SmartDeviceLink 1.0

Fields

KEY_CMD_ID

public static final java.lang.String KEY_CMD_ID
Constant Value
"cmdID"

KEY_TRIGGER_SOURCE

public static final java.lang.String KEY_TRIGGER_SOURCE
Constant Value
"triggerSource"

Inherited Fields

From Class Fields
com.smartdevicelink.proxy.RPCMessage KEY_REQUEST, KEY_RESPONSE, KEY_NOTIFICATION, KEY_FUNCTION_NAME, KEY_PARAMETERS, KEY_CORRELATION_ID, messageType, parameters, function
com.smartdevicelink.proxy.RPCStruct KEY_BULK_DATA, KEY_PROTECTED, store

Constructors

OnCommand()

Constructs a newly allocated OnCommand object

public OnCommand()

OnCommand( java.util.Hashtable<java.lang.String, java.lang.Object> hash )

Constructs a newly allocated OnCommand object indicated by the Hashtable parameter

public OnCommand(java.util.Hashtable<java.lang.String, java.lang.Object> hash)

Parameters

hash
The Hashtable to use

OnCommand( Integer cmdID, TriggerSource triggerSource )

Constructs a newly allocated OnCommand object

public OnCommand(Integer cmdID,TriggerSource triggerSource)

Parameters

cmdID
an integer object representing a Command ID
triggerSource
a TriggerSource object

Methods

getCmdID()

Returns an Integer object representing the Command ID

public java.lang.Integer getCmdID()

setCmdID( Integer cmdID )

Sets a Command ID

public void setCmdID(Integer cmdID)

Parameters

cmdID
an integer object representing a Command ID

getTriggerSource()

Returns a TriggerSource object which will be shown in the HMI

public com.smartdevicelink.proxy.rpc.enums.TriggerSource getTriggerSource()

setTriggerSource( TriggerSource triggerSource )

Sets TriggerSource

Indicates whether command was selected via VR or via a menu selection (using the OK button).

public void setTriggerSource(TriggerSource triggerSource)

Parameters

triggerSource
a TriggerSource object

Inherited Methods

From Class Methods
com.smartdevicelink.proxy.RPCMessage getFunctionName, setFunctionName, getMessageType, setParameters, getParameters, getObject, getString, getInteger, getFloat, getDouble, getBoolean, getLong
com.smartdevicelink.proxy.RPCStruct getStoreValue, getStore, deserializeJSON, deserializeJSONObject, serializeJSON, serializeJSON, format, getBulkData, setBulkData, setPayloadProtected, isPayloadProtected, getMessageTypeName, hasKey, setValue, getValue, getObject, formatObject, getValueForString, getString, getInteger, getDouble, getFloat, getBoolean, getLong
java.lang.Object getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize
View on GitHub.com
Previous Section Next Section