summaryrefslogtreecommitdiff
path: root/docs/Classes/SDLOnHMIStatus.html
blob: 434a51c4278011d190932971cbe9721833fb9955 (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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
<h1>SDLOnHMIStatus Class Reference</h1>

<h3>Section Contents</h3>

<ul>
  <li><a href="#section-hmiLevel">hmiLevel</a></li>
  <li><a href="#section-audioStreamingState">audioStreamingState</a></li>
  <li><a href="#section-videoStreamingState">videoStreamingState</a></li>
  <li><a href="#section-systemContext">systemContext</a></li>
  <li><a href="#section-windowID">windowID</a></li>
  <li><a href="#section--initWithHMILevel:systemContext:audioStreamingState:videoStreamingState:windowID:">-initWithHMILevel:systemContext:audioStreamingState:videoStreamingState:windowID:</a></li>
</ul>

<h3>Overview</h3>


<ul>
<li>Notifies an application that HMI conditions have changed for the application. This indicates whether the application can speak phrases, display text, perform interactions, receive button presses and events, stream audio, etc. This notification will be sent to the application when there has been a change in any one or several of the indicated states (<i>SDLHMILevel</i>, <i>SDLAudioStreamingState</i> or <i>SDLSystemContext</i>) for the application.</li>
</ul>

<p>All three values are, in principle, independent of each other (though there may be some relationships). A value for one parameter should not be interpreted from the value of another parameter.</p>

<p>There are no guarantees about the timeliness or latency of the SDLOnHMIStatus notification. Therefore, for example, information such as <i>SDLAudioStreamingState</i> may not indicate that the audio stream became inaudible to the user exactly when the SDLOnHMIStatus notification was received.</p>

<p>@since SDL 1.0</p>


<section class="section task-group-section">
  <h3 id="section-hmiLevel">
      hmiLevel
  </h3>
  
  <p>SDLHMILevel in effect for the application</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"><a href="../Type%20Definitions.html#/c:SDLHMILevel.h@T@SDLHMILevel">SDLHMILevel</a></span> <span class="n">_Nonnull</span> <span class="n">hmiLevel</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight swift"><code><span class="k">var</span> <span class="nv">hmiLevel</span><span class="p">:</span> <span class="kt"><a href="../Type%20Definitions.html#/c:SDLHMILevel.h@T@SDLHMILevel">SDLHMILevel</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-audioStreamingState">
      audioStreamingState
  </h3>
  
  <p>Current state of audio streaming for the application. When this parameter has a value of NOT_AUDIBLE, the application must stop streaming audio to SDL.</p>

<p>Informs app whether any currently streaming audio is audible to user (AUDIBLE) or not (NOT_AUDIBLE). A value of NOT_AUDIBLE means that either the application&rsquo;s audio will not be audible to the user, or that the application&rsquo;s audio should not be audible to the user (i.e. some other application on the mobile device may be streaming audio and the application&rsquo;s audio would be blended with that other audio).</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"><a href="../Type%20Definitions.html#/c:SDLAudioStreamingState.h@T@SDLAudioStreamingState">SDLAudioStreamingState</a></span> <span class="n">_Nonnull</span> <span class="n">audioStreamingState</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight swift"><code><span class="k">var</span> <span class="nv">audioStreamingState</span><span class="p">:</span> <span class="kt"><a href="../Type%20Definitions.html#/c:SDLAudioStreamingState.h@T@SDLAudioStreamingState">SDLAudioStreamingState</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-videoStreamingState">
      videoStreamingState
  </h3>
  
  <p>Current availablility of video streaming for the application. When this parameter is NOT_STREAMABLE, the application must stop video streaming to SDL.</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">nullable</span><span class="p">)</span> <span class="n"><a href="../Type%20Definitions.html#/c:SDLVideoStreamingState.h@T@SDLVideoStreamingState">SDLVideoStreamingState</a></span> <span class="n">videoStreamingState</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight swift"><code><span class="k">var</span> <span class="nv">videoStreamingState</span><span class="p">:</span> <span class="kt"><a href="../Type%20Definitions.html#/c:SDLVideoStreamingState.h@T@SDLVideoStreamingState">SDLVideoStreamingState</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>

  
  
  
  <h3 id="section-systemContext">
      systemContext
  </h3>
  
  <p>Whether a user-initiated interaction is in-progress (VRSESSION or MENU), or not (MAIN)</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"><a href="../Type%20Definitions.html#/c:SDLSystemContext.h@T@SDLSystemContext">SDLSystemContext</a></span> <span class="n">_Nonnull</span> <span class="n">systemContext</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight swift"><code><span class="k">var</span> <span class="nv">systemContext</span><span class="p">:</span> <span class="kt"><a href="../Type%20Definitions.html#/c:SDLSystemContext.h@T@SDLSystemContext">SDLSystemContext</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-windowID">
      windowID
  </h3>
  
  <p>This is the unique ID assigned to the window that this RPC is intended for. If this param is not included, it will be assumed that this request is specifically for the main window on the main display. - see: PredefinedWindows enum.</p>

<p>@since SDL 6.0</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">nullable</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)SDLUInt">SDLUInt</a></span><span class="o">&gt;</span> <span class="o">*</span><span class="n">windowID</span><span class="p">;</span></code></pre>

  
  <h4>Swift</h4>
  <pre class="highlight swift"><code><span class="k">var</span> <span class="nv">windowID</span><span class="p">:</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)SDLUInt">SDLUInt</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>

  
  
  
  <h3 id="section--initWithHMILevel:systemContext:audioStreamingState:videoStreamingState:windowID:">
      -initWithHMILevel:systemContext:audioStreamingState:videoStreamingState:windowID:
  </h3>
  
  <p>Initialize an SDLOnHMIStatus RPC with initial parameters</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">initWithHMILevel</span><span class="p">:(</span><span class="n">nonnull</span> <span class="n"><a href="../Type%20Definitions.html#/c:SDLHMILevel.h@T@SDLHMILevel">SDLHMILevel</a></span><span class="p">)</span><span class="nv">hmiLevel</span>
          <span class="nf">systemContext</span><span class="p">:(</span><span class="n">nonnull</span> <span class="n"><a href="../Type%20Definitions.html#/c:SDLSystemContext.h@T@SDLSystemContext">SDLSystemContext</a></span><span class="p">)</span><span class="nv">systemContext</span>
    <span class="nf">audioStreamingState</span><span class="p">:(</span><span class="n">nonnull</span> <span class="n"><a href="../Type%20Definitions.html#/c:SDLAudioStreamingState.h@T@SDLAudioStreamingState">SDLAudioStreamingState</a></span><span class="p">)</span><span class="nv">audioStreamingState</span>
    <span class="nf">videoStreamingState</span><span class="p">:(</span><span class="n">nullable</span> <span class="n"><a href="../Type%20Definitions.html#/c:SDLVideoStreamingState.h@T@SDLVideoStreamingState">SDLVideoStreamingState</a></span><span class="p">)</span><span class="nv">videoStreamingState</span>
               <span class="nf">windowID</span><span class="p">:(</span><span class="n">nullable</span> <span class="n">NSNumber</span><span class="o">&lt;</span><span class="n"><a href="../Protocols.html#/c:objc(pl)SDLUInt">SDLUInt</a></span><span class="o">&gt;</span> <span class="o">*</span><span class="p">)</span><span class="nv">windowID</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="nv">hmiLevel</span><span class="p">:</span> <span class="kt"><a href="../Type%20Definitions.html#/c:SDLHMILevel.h@T@SDLHMILevel">SDLHMILevel</a></span><span class="p">,</span> <span class="nv">systemContext</span><span class="p">:</span> <span class="kt"><a href="../Type%20Definitions.html#/c:SDLSystemContext.h@T@SDLSystemContext">SDLSystemContext</a></span><span class="p">,</span> <span class="nv">audioStreamingState</span><span class="p">:</span> <span class="kt"><a href="../Type%20Definitions.html#/c:SDLAudioStreamingState.h@T@SDLAudioStreamingState">SDLAudioStreamingState</a></span><span class="p">,</span> <span class="nv">videoStreamingState</span><span class="p">:</span> <span class="kt"><a href="../Type%20Definitions.html#/c:SDLVideoStreamingState.h@T@SDLVideoStreamingState">SDLVideoStreamingState</a></span><span class="p">?,</span> <span class="nv">windowID</span><span class="p">:</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)SDLUInt">SDLUInt</a></span><span class="p">)?)</span></code></pre>

  
  
  <h4>Parameters</h4>
  <dl>
      <dt>hmiLevel</dt>
      <dd><p>The HMI level</p></dd>
      <dt>systemContext</dt>
      <dd><p>The system context</p></dd>
      <dt>audioStreamingState</dt>
      <dd><p>The ability for an audio app to be heard</p></dd>
      <dt>videoStreamingState</dt>
      <dd><p>The ability for a video straming app to stream</p></dd>
      <dt>windowID</dt>
      <dd><p>Which window this status relates to</p></dd>
  </dl>
  
</section>