Own fork of MbedSmartRestMain
Dependencies: C027_Support C12832 LM75B MMA7660 MbedSmartRest mbed-rtos mbed
Fork of MbedSmartRestMain by
Diff: DeviceIntegration.cpp
- Revision:
- 72:c5709ae7b193
- Parent:
- 69:237c01eb36c2
- Child:
- 77:f6717e4eccc4
diff -r 063c45e99578 -r c5709ae7b193 DeviceIntegration.cpp --- a/DeviceIntegration.cpp Mon Feb 16 09:17:30 2015 +0000 +++ b/DeviceIntegration.cpp Mon Feb 16 13:15:52 2015 +0000 @@ -3,6 +3,7 @@ #include "ComposedRecord.h" #include "CharValue.h" #include "IntegerValue.h" +#include "logging.h" DeviceIntegration::DeviceIntegration(AbstractSmartRest& client, SmartRestTemplate& tpl, long& deviceId, DeviceInfo& deviceInfo) : _client(client), @@ -60,7 +61,7 @@ // template bootstrapping process if (_client.bootstrap(_tpl) != SMARTREST_SUCCESS) { - puts("Template bootstrap failed."); + aError("Template bootstrap failed.\r\n"); return false; } @@ -84,20 +85,20 @@ return false; if (_client.send(record) != SMARTREST_SUCCESS) { - puts("Send failed."); + aWarning("Send failed."); _client.stop(); return false; } if (_client.receive(received) != SMARTREST_SUCCESS) { - puts("No device found."); + aError("No device found."); _client.stop(); return false; } _client.stop(); if (received.values() == 0) { - puts("Received no values."); + aWarning("Received no values."); return false; }