This class will add a command to the application’s Command Menu SDLMenuParams
A command will be added to the end of the list of elements in the Command Menu under the following conditions:
The set of choices which the application builds using SDLAddCommand can be a mixture of:
HMILevel needs to be FULL, LIMITED or BACKGROUD
@since SDL 1.0
See
SDLDeleteCommand SDLAddSubMenu SDLDeleteSubMenuConstructs a new SDLAddCommand object
- (instancetype)init;
init!()
Construct a SDLAddCommand with a handler callback when an event occurs.
- (instancetype)initWithHandler:(SDLRPCNotificationHandler)handler;
init!(handler: SDLRPCNotificationHandler!)
A callback that will be called when a button event occurs for the command
An SDLAddCommand object
Constructs a new SDLAddCommand object indicated by the dictionary parameter
- (instancetype)initWithDictionary:(NSMutableDictionary *)dict;
init!(dictionary dict: NSMutableDictionary!)
The dictionary to use
Undocumented
@interface SDLAddCommand : SDLRPCRequest <SDLRequestHandler>
Undocumented
@interface SDLAddCommand : SDLRPCRequest <SDLRequestHandler>
Undocumented
@interface SDLAddCommand : SDLRPCRequest <SDLRequestHandler>
A handler that will let you know when the button you created is subscribed.
Warning
This will only work if you use SDLManager.@property (readwrite, copy, nonatomic) SDLRPCNotificationHandler handler;
var handler: SDLRPCNotificationHandler! { get set }
@abstract A Unique Command ID that identifies the command
@discussion Is returned in an SDLOnCommand notification to identify the command selected by the user
Required, Integer, 0 - 2,000,000,000
@property (readwrite, strong, atomic) NSNumber *cmdID;
var cmdID: NSNumber! { get set }
@abstract a SDLMenuParams pointer which will defined the command and how it is added to the Command Menu
@discussion If provided, this will define the command and how it is added to the Command Menu
If null, commands will not be accessible through the HMI application menu
Optional
@property (readwrite, strong, atomic) SDLMenuParams *menuParams;
var menuParams: SDLMenuParams! { get set }
@abstract An array of strings to be used as VR synonyms for this command.
@discussion If provided, defines one or more VR phrases the recognition of any of which triggers the SDLOnCommand notification with this cmdID
If null, commands will not be accessible by voice commands (when the user hits push-to-talk)
Optional, Array of Strings, Max String length 99 chars, Array size 1 - 100
@property (readwrite, strong, atomic) NSMutableArray *vrCommands;
var vrCommands: NSMutableArray! { get set }
@abstract Image struct containing a static or dynamic icon
@discussion If provided, defines the image to be be shown along with a command
If omitted on supported displays, no (or the default if applicable) icon will be displayed
Optional
@property (readwrite, strong, atomic) SDLImage *cmdIcon;
var cmdIcon: SDLImage! { get set }