Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: NaturalTinyShell_ice libmDot-12Sept mbed-rtos mbed
Fork of ICE by
Diff: src/CloudDataHandler/CloudDataHandler.cpp
- Revision:
- 27:38205cebc3da
- Parent:
- 26:6bd4868171c7
- Child:
- 68:dbe39d83eb98
--- a/src/CloudDataHandler/CloudDataHandler.cpp Thu Sep 08 17:55:32 2016 +0000 +++ b/src/CloudDataHandler/CloudDataHandler.cpp Thu Sep 08 18:39:29 2016 +0000 @@ -1,4 +1,5 @@ #include "CloudDataHandler.h" +#include "CloudFileReceiver.h" #include "MTSLog.h" #include <stdio.h> #include "mDot.h" @@ -18,21 +19,20 @@ std::vector<uint8_t> data(tmp_buffer.begin(), tmp_buffer.end()); // send the data to the gateway - if ((ret = GLOBAL_mdot->send(data)) != mDot::MDOT_OK) + if ((ret = GLOBAL_mdot->send(data)) != mDot::MDOT_OK) { logError("failed to send", ret, mDot::getReturnCodeString(ret).c_str()); - else { + } else { logInfo("Sent to gateway: %s", tmp_buffer.c_str()); std::vector<uint8_t> rcvData(256); rcvData.clear(); if ((ret = GLOBAL_mdot->recv(rcvData)) == mDot::MDOT_OK) { if (!rcvData.empty()) { - std::string rcv_string(rcvData.begin(), rcvData.end()); + std::string rcv_string(rcvData.begin(), rcvData.end()); logInfo("Received Data: %s", rcv_string.c_str()); -// if( edIotParse( rcvData, &parseObj ) == true ) { -// edIotProcessIn( &parseObj, &execEnv, dot ); + CloudFileReceiver( &rcv_string, GLOBAL_mdot ); } } + Thread::wait(5000); } - Thread::wait(5000); } } \ No newline at end of file