This API is used to control updates (install/remove) for the Legato application/firmware. Update package is combination of manifest and update data. Manifest contains metadata about the update task and all the update data are appended behind manifest. Update data means installation files (most likely tar ball), firmware files etc. Update package can be pictorially viewed as follows:
++++++++++++++++++++++
+ +
+ Manifest +
+ +
+ +
++++++++++++++++++++++
+ +
+ Update_data1 +
+ +
+ +
++++++++++++++++++++++
+ +
+ Update_data2 +
+ +
+ +
++++++++++++++++++++++
+ +
+ Update_data3 +
+ +
+ +
++++++++++++++++++++++
.
.
.
.
++++++++++++++++++++++
+ +
+ Update_dataN +
+ +
+ +
++++++++++++++++++++++Update service provider follows the following state machine while doing an update:
------------------
Create() | | Delete()
--------->| NEW |--------------------------------|
| | |
------------------ |
Start() | |
| |
| |
| |
|-------------- | |
| | | |
ALL_ITEMS_UNPACKED=NO V V |
| ------------------ |
| | | Delete()/Error* |
| | UNPACKING |---------------------| |
------------| | | |
------------------ V V
| ------------------
| | |
ALL_ITEMS_UNPACKED = YES | FAILED |
| | |
V ------------------
------------------ ^
| | Delete()/Error* |
|---->| APPLYING |--------------------------|
ALL_ITEMS_DONE = NO | |
| ------------------
| | |
|_________| |
ALL_ITEMS_DONE = YES
|
V
------------------
| |
| SUCCESS |
| |
------------------
*Error: Any kind of error occurred during update.
This is the typical sequence of calling update API:
This code sample calls an update service provider API to perform an update:
Copyright (C) Sierra Wireless Inc. Use of this work is subject to license.