summaryrefslogtreecommitdiff
path: root/docs/Classes/SDLCreateInteractionChoiceSet.html
blob: 8f7016208e24b0562593020c8612b5b45ec8cdba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<h1>SDLCreateInteractionChoiceSet Class Reference</h1>

<h3>Section Contents</h3>

<ul>
  <li><a href="#section--initWithId:choiceSet:">-initWithId:choiceSet:</a></li>
  <li><a href="#section-interactionChoiceSetID">interactionChoiceSetID</a></li>
  <li><a href="#section-choiceSet">choiceSet</a></li>
</ul>

<h3>Overview</h3>

<p>Creates a Choice Set which can be used in subsequent <em>SDLPerformInteraction</em> Operations.</p>

<p>HMILevel needs to be FULL, LIMITED or BACKGROUND</p>

<p>Before a perform interaction is sent you MUST wait for the success from the CreateInteractionChoiceSet RPC.</p>

<p>If you do not wait the system may not recognize the first utterance from the user.</p>

<p>@since SDL 1.0</p>
<div class="aside aside-see">
    <p class="aside-title">See</p>
    SDLDeleteInteractionChoiceSet SDLPerformInteraction

</div>


<section class="section task-group-section">
  <h3 id="section--initWithId:choiceSet:">
      -initWithId:choiceSet:
  </h3>
  
  <p>Convenience init for creating a choice set RPC</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight objective_c"><code><span class="k">-</span> <span class="p">(</span><span class="n">nonnull</span> <span class="n">instancetype</span><span class="p">)</span><span class="nf">initWithId</span><span class="p">:(</span><span class="n">UInt32</span><span class="p">)</span><span class="nv">choiceId</span>
                         <span class="nf">choiceSet</span><span class="p">:(</span><span class="n">nonnull</span> <span class="n">NSArray</span><span class="o">&lt;</span><span class="n"><a href="../Classes/SDLChoice.html">SDLChoice</a></span> <span class="o">*&gt;</span> <span class="o">*</span><span class="p">)</span><span class="nv">choiceSet</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight swift"><code><span class="nf">init</span><span class="p">(</span><span class="n">id</span> <span class="nv">choiceId</span><span class="p">:</span> <span class="kt">UInt32</span><span class="p">,</span> <span class="nv">choiceSet</span><span class="p">:</span> <span class="p">[</span><span class="kt"><a href="../Classes/SDLChoice.html">SDLChoice</a></span><span class="p">])</span></code></pre>

  
  
  <h4>Parameters</h4>
  <dl>
      <dt>choiceId</dt>
      <dd><p>A unique ID that identifies the Choice Set</p></dd>
      <dt>choiceSet</dt>
      <dd><p>Array of choices, which the user can select by menu or voice recognition</p></dd>
  </dl>
  <div>
    <h4>Return Value</h4>
    <p>An SDLCreateInteractionChoiceSet object</p>
  </div>
  
  <h3 id="section-interactionChoiceSetID">
      interactionChoiceSetID
  </h3>
  
  <p>A unique ID that identifies the Choice Set</p>

<p>Required, Integer, 0 - 2,000,000,000</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight objective_c"><code><span class="k">@property</span> <span class="p">(</span><span class="n">nonatomic</span><span class="p">,</span> <span class="n">strong</span><span class="p">)</span> <span class="n">NSNumber</span><span class="o">&lt;</span><span class="n"><a href="../Protocols.html#/c:objc(pl)SDLInt">SDLInt</a></span><span class="o">&gt;</span> <span class="o">*</span><span class="n">_Nonnull</span> <span class="n">interactionChoiceSetID</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight swift"><code><span class="k">var</span> <span class="nv">interactionChoiceSetID</span><span class="p">:</span> <span class="kt">NSNumber</span> <span class="o">&amp;</span> <span class="kt"><a href="../Protocols.html#/c:objc(pl)SDLInt">SDLInt</a></span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>

  
  
  
  <h3 id="section-choiceSet">
      choiceSet
  </h3>
  
  <p>Array of choices, which the user can select by menu or voice recognition</p>

<p>Required, SDLChoice, Array size 1 - 100</p>

  
  
  <h4>Objective-C</h4>
  <pre class="highlight objective_c"><code><span class="k">@property</span> <span class="p">(</span><span class="n">nonatomic</span><span class="p">,</span> <span class="n">strong</span><span class="p">)</span> <span class="n">NSArray</span><span class="o">&lt;</span><span class="n"><a href="../Classes/SDLChoice.html">SDLChoice</a></span> <span class="o">*&gt;</span> <span class="o">*</span><span class="n">_Nonnull</span> <span class="n">choiceSet</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight swift"><code><span class="k">var</span> <span class="nv">choiceSet</span><span class="p">:</span> <span class="p">[</span><span class="kt"><a href="../Classes/SDLChoice.html">SDLChoice</a></span><span class="p">]</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>

  
  
  
</section>