![](/media/cache/group/Advantech_logo.jpg.50x50_q85.jpg)
Generic Pelion Device Management example for various Advantech modules.
This example is known to work great on the following platforms:
- WISE-1530 WiFi Module using DB-1505 carrier board and external SD card reader.
Example Functionality
This example showcases the following device functionality:
- On timer button increment, simulate Pelion LWM2M button resource change
Use this example with Mbed CLI
1. Import the application into your desktop:
mbed import https://os.mbed.com/teams/Advantech/code/pelion-example-common cd pelion-example-common
2. Download your developer certificate from pelion portal
3. Compile the program
mbed compile -t <toolchain> -m <TARGET_BOARD>
(supported toolchains : GCC_ARM / ARM / IAR)
4. Copy the binary file pelion-example-common.bin to your mbed device.
drivers/network/COMPONENT_WIFI_IDW04A1/BlockExecuter.h
- Committer:
- chuanga
- Date:
- 2019-03-12
- Revision:
- 0:43ff9e3bc244
File content as of revision 0:43ff9e3bc244:
#ifndef BLOCK_EXEC_H #define BLOCK_EXEC_H #include "mbed.h" /* Helper class to execute something whenever entering/leaving a basic block */ class BlockExecuter { public: BlockExecuter(Callback<void()> exit_cb, Callback<void()> enter_cb = Callback<void()>()) : _exit_cb(exit_cb) { if((bool)enter_cb) enter_cb(); } ~BlockExecuter(void) { _exit_cb(); } private: Callback<void()> _exit_cb; }; #endif //BLOCK_EXEC_H