-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathc_le_avc.html
132 lines (130 loc) · 9.46 KB
/
c_le_avc.html
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>LEGATO: AirVantage Connector</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="fonts.css" rel="stylesheet" type="text/css" />
<link href="legato.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="jquery.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
$(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { init_search(); });
</script>
<link rel="icon" type="image/png" href="favicon.ico" />
</head>
<body>
<div id="top"><!-- do not remove this div! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo">
<img alt="Logo" src="legatoLogo.png"/>
<div id="projectbrief">Simplifying IoT development</div>
</td>
<td> <div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- Generated by Doxygen 1.8.9.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('c_le_avc.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="headertitle">
<div class="title">AirVantage Connector </div> </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p><a class="el" href="le__avc__interface_8h.html">API Reference</a></p>
<hr/>
<p>The AirVantage connector service provides an API to communicate with the AirVantage server.</p>
<h1><a class="anchor" id="c_le_avc_update"></a>
Firmware/Application Update</h1>
<p>The API for firmware/application update is divided into two parts:</p><ul>
<li>Allow a control app to contact the server for pending updates. If available, can select to download or install the update. <br />
</li>
<li>Allow an app to block an update from being installed. An app may need this if it's performing a critical operation that can't be interrupted (e.g., eCall). This is necessary as installing an update will cause the app to restart (either the app itself needs to restart or a firmware change causes the modem to reset).</li>
</ul>
<h2><a class="anchor" id="c_le_avc_update_control"></a>
Update Control</h2>
<p>A control app can start a session with an AirVantage server to determine if there is a pending update. This is done with <a class="el" href="le__avc__interface_8h.html#aee17b1de43cf946b59a965e6077e7b03">le_avc_StartSession()</a>. The current session can be stopped using <a class="el" href="le__avc__interface_8h.html#a5b3e21858181bb972e982046bced1182">le_avc_StopSession()</a>. This cancels any query for pending update, or suspends a download in progress; however, it <b>won't stop</b> an install in progress.</p>
<p>The status of a pending update is sent to the control app using a notification. The control app can use <a class="el" href="le__avc__interface_8h.html#ac5443791a6e4b8db75342f45fa2f91dc">le_avc_AddStatusEventHandler()</a> to register a handler function to receive this notification. The notification will be received after a session is started using <a class="el" href="le__avc__interface_8h.html#aee17b1de43cf946b59a965e6077e7b03">le_avc_StartSession()</a>. Sometimes, the modem firmware may decide to start a session with the AirVantage server. In this case, the notification could also be received, even if the control app has not explicitly called <a class="el" href="le__avc__interface_8h.html#aee17b1de43cf946b59a965e6077e7b03">le_avc_StartSession()</a>.</p>
<p>There can only be one pending update. To query the type of update, use <a class="el" href="le__avc__interface_8h.html#a1f085c5986e7c473ed70cff32320ce11">le_avc_GetUpdateType()</a>. If it's an app update, then <a class="el" href="le__avc__interface_8h.html#abf50df00e1df25c4eabfc6b3a004280a">le_avc_GetAppUpdateName()</a> can be used to get the name of the app.</p>
<p>If a download is pending, then <a class="el" href="le__avc__interface_8h.html#a3f7dea04dd1e9c456fe24a5eb98d2592">le_avc_AcceptDownload()</a> can be used to allow the update to be downloaded. To defer the decision, <a class="el" href="le__avc__interface_8h.html#a0c50c8ce89e21cbd9d0bfa431389b780">le_avc_DeferDownload()</a> can be used to defer the download for the specified number of minutes. After the defer time has elapsed, the pending download notification will be re-sent, to allow the control app to make a new decision, or again defer.</p>
<p>Once an update has been downloaded, a new notification will be received to indicate that an install is pending. The control app can then use <a class="el" href="le__avc__interface_8h.html#ab3ff8076bb7b36ca58efc0ae240efedb">le_avc_AcceptInstall()</a> to allow the install to proceed. Note that even if the control app calls <a class="el" href="le__avc__interface_8h.html#ab3ff8076bb7b36ca58efc0ae240efedb">le_avc_AcceptInstall()</a>, the install may still be blocked by an app using the <a class="el" href="c_le_avc.html#c_le_avc_update_app">Application Blocking</a> functions. To defer the decision, the control app can use <a class="el" href="le__avc__interface_8h.html#a068f714a110bfa4cac179731a17798f3">le_avc_DeferInstall()</a> to defer the install for the specified number of minutes. After the defer time has elapsed, the pending install notification will be re-sent to allow the control app to make a new decision, or again defer.</p>
<p>If a control app doesn't register for notifications using <a class="el" href="le__avc__interface_8h.html#ac5443791a6e4b8db75342f45fa2f91dc">le_avc_AddStatusEventHandler()</a>, then any pending downloads and installs will happen automatically, subject to any restrictions imposed by app using the <a class="el" href="c_le_avc.html#c_le_avc_update_app">Application Blocking</a> functions. Only one control app will be allowed to register for notifications. Any subsequent attempts will be rejected. Also, only the control app registered for notifications will be allowed to use the other update control API functions.</p>
<h2><a class="anchor" id="c_le_avc_update_app"></a>
Application Blocking</h2>
<p>When an app is about to perform a critical operation, it can block the installation of an update with <a class="el" href="le__avc__interface_8h.html#a4d298bc6d814481205c4db5d24812694">le_avc_BlockInstall()</a>, and after it's finished with the critical operation, it can unblock the install with <a class="el" href="le__avc__interface_8h.html#af5b3dffdd29b7de3288ea1a88c0ecd4e">le_avc_UnblockInstall()</a>.</p>
<p>What constitutes a critical operation depends on the app. An eCall app might block installs for the duration that it runs. A data collection app that wakes up once an hour might block installs while it collects and stores and/or transmits a new data sample, and then unblock installs just before it goes to sleep again.</p>
<p>If an install can't be applied because it's blocked, another attempt to apply the install will be made at a later time.</p>
<hr/>
<p>Copyright (C) Sierra Wireless Inc. Use of this work is subject to license. </p>
</div></div><!-- contents -->
</div><!-- doc-content -->
<div class="footer">
<div>
<a href="https://www.sierrawireless.com/">
<img src="swi-ico-medium.png" width="24" alt="" />
Sierra Wireless
</a>
-
Generated by Doxygen 1.8.9.1
</div>
</div>
</body>
</html>