Official reference client implementation for Cumulocity SmartREST on u-blox C027.
Dependencies: C027_Support C12832 LM75B MMA7660 MbedSmartRest mbed-rtos mbed
Fork of MbedSmartRestMain by
Revision 26:26e9899e2cbe, committed 2014-04-16
- Comitter:
- vwochnik
- Date:
- Wed Apr 16 08:31:21 2014 +0000
- Parent:
- 25:8604bef314c1
- Child:
- 27:bfd402593acc
- Commit message:
- fix
Changed in this revision
MbedSmartRest.lib | Show annotated file Show diff for this revision Revisions of this file |
program.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/MbedSmartRest.lib Wed Apr 16 07:44:36 2014 +0000 +++ b/MbedSmartRest.lib Wed Apr 16 08:31:21 2014 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/vwochnik/code/MbedSmartRestStreaming/#ee4f052c7570 +http://mbed.org/users/vwochnik/code/MbedSmartRestStreaming/#57dd24cb6620
--- a/program.cpp Wed Apr 16 07:44:36 2014 +0000 +++ b/program.cpp Wed Apr 16 08:31:21 2014 +0000 @@ -52,7 +52,6 @@ float interval = 120.0; // send measurements every two minutes MbedSmartRest client("developer.cumulocity.com", 80, "vaillant/admin", "klanpi", "com_u-blox_C027_REV-A_0.10_Test1233123"); -//MbedSmartRest client("vsrv41584.customer.xenway.de", 8888, "vaillant/admin", "klanpi", "com_u-blox_C027_REV-A_0.10_Test123"); int program(void) { @@ -255,24 +254,9 @@ Aggregator aggr(8, false, true); lcd_status("Sending measurements..."); + temperatureMeasurement(deviceId, aggr); signalMeasurement(deviceId, aggr); - if (client.send(aggr) != SMARTREST_SUCCESS) { - puts("Loop send failed."); - } - client.stop(); - aggr.clear(); - temperatureMeasurement(deviceId, aggr); - if (client.send(aggr) != SMARTREST_SUCCESS) { - puts("Loop send failed."); - } - client.stop(); - aggr.clear(); analogMeasurement(deviceId, aggr); - if (client.send(aggr) != SMARTREST_SUCCESS) { - puts("Loop send failed."); - } - client.stop(); - aggr.clear(); motionMeasurement(deviceId, aggr); if (client.send(aggr) != SMARTREST_SUCCESS) {