SWUpdate library to be used with RPC.
Fork of SWUpdate by
Diff: SWUpdate.h
- Revision:
- 20:cf73b0d75bb7
- Parent:
- 19:169aab9047bd
- Child:
- 24:e400edb8d2ee
--- a/SWUpdate.h Mon Jan 19 13:33:47 2015 +0000 +++ b/SWUpdate.h Mon Jan 19 14:23:39 2015 +0000 @@ -1,6 +1,8 @@ /// @file /// Automatic Software Update via the network. /// +/// Supported Platforms: mbed LPC1768. +/// /// This library provides a reasonably simple interface to updating sofware /// semi-automatically via the network. It does that by querying a web server /// upon which you have placed an updated version of the embedded software @@ -9,6 +11,49 @@ /// will try to download the software. If that succeeds, then it can /// optionally reboot to activate the new software. /// +/// @code +/// +-----------+ +/// | Compiler | +/// +-----------+ +/// V +------------------+ +/// +-----------+ |Web Server | +/// |myprog.bin |------------------->| /mbed/myprog.bin | +/// +-----------+ +-----------| | +/// V | | +/// +-----------+ | | +/// |perl script|---->| /mbed/myprog.txt | +/// +-----------+ +------------------+ +/// A +/// +---------------+ # +/// |mbed appliance |<====== network =========#======... +/// +---------------+ +/// +/// mbed server +/// | | +/// +-- http Get(myprog.txt) -->| +/// |<-- file(myprog.txt) ------+ +/// | | +/// |---+ | +/// | v58 newer than v57 | +/// |<--+ | +/// | | +/// +-- http Get(myprog.bin) -->| +/// |<-- file(myprog.bin) ------+ +/// |<-- file(myprog.bin) ------+ +/// |<-- file(myprog.bin) ------+ +/// | (save as myprog58.bin) | +/// | | +/// |---+ | +/// | integrity ck ok? | +/// |<--+ | +/// | | +/// |---+ | +/// | unlink other .bin files | +/// | and reboot | +/// |<--+ | +/// | | +/// @endcode +/// /// While the name shown in the examples here is "myprog", this is unimportant. /// Your application will have a name of your choosing, which you will /// use in the API. @@ -27,17 +72,17 @@ /// /// The files of interest on the local file system are as follows: /// -/// @li myprog23.bin - The actual application binary file that is currently -/// executing. In this case, this is the 23rd version that +/// @li myprog58.bin - The actual application binary file that is currently +/// executing. In this case, this is the 58th version that /// has been installed. You can go to 99 after which you might /// want to start over. /// @li myprog.ver - A text file, maintained by this software update /// application, that was downloaded from the server with -/// application version 23. +/// application version 58. /// /// If "myprog.ver" does not exist, it will assume that the server has a /// newer application, so it will be downloaded and activated (even if all -/// it does is to replace the existing myprog23.bin file). +/// it does is to replace the existing myprog58.bin file). /// /// Web Server Files: /// @@ -51,7 +96,7 @@ /// that of the binary file. /// /// The myprog.txt file shall have 3 comma-separated numbers in it. -/// version,checksum,filesize (e.g. "23,41384,107996"). +/// version,checksum,filesize (e.g. "58,41384,107996"). /// /// @li version is a simple number. If the number is different than /// what is stored on the local file system, then the program