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: C027_Support C12832 LM75B MMA7660 MbedSmartRest mbed-rtos mbed
Fork of MbedSmartRestMain by
Diff: config/ConfigurationSynchronization.cpp
- Revision:
- 77:f6717e4eccc4
- Parent:
- 76:b07effe83fb8
- Child:
- 92:48069375dffa
--- a/config/ConfigurationSynchronization.cpp Wed Feb 25 10:06:11 2015 +0000 +++ b/config/ConfigurationSynchronization.cpp Tue Mar 03 14:10:09 2015 +0000 @@ -25,7 +25,6 @@ // Update Configuration // Usage: 130,<DEVICE/ID>,<CONFIG/STRING>,<RESPONSIBILITY> if (!_tpl.add("10,130,PUT,/inventory/managedObjects/%%,application/vnd.com.nsn.cumulocity.managedObject+json,application/vnd.com.nsn.cumulocity.managedObject+json,%%,UNSIGNED STRING NUMBER,\"{\"\"c8y_Configuration\"\":{\"\"config\"\":\"\"%%\"\"},\"\"c8y_RequiredAvailability\"\":{ \"\"responseInterval\"\":%%}}\"\r\n")) -// if (!_tpl.add("10,130,PUT,/inventory/managedObjects/%%,application/vnd.com.nsn.cumulocity.managedObject+json,application/vnd.com.nsn.cumulocity.managedObject+json,%%,UNSIGNED NUMBER,\"{\"\"c8y_RequiredAvailability\"\":{ \"\"responseInterval\"\":%%}}\"\r\n")) return false; _init = true; @@ -89,25 +88,25 @@ return false; if (_client.send(record) != SMARTREST_SUCCESS) { - aWarning("Sending configuration failed."); + aError("Sending configuration failed.\r\n"); _client.stop(); return false; } if (_client.receive(received) != SMARTREST_SUCCESS) { - aWarning("Receiving configuration failed."); + aError("Connection failure or invalid configuration.\r\n"); _client.stop(); return false; } _client.stop(); if (received.values() != 3) { - aWarning("Incomplete configuration data received."); + aError("Unmatching configuration data received, expected 3, but %d received.\r\n", received.values()); return false; } if (received.value(0).integerValue() != 201) { - aWarning("Bad configuration data received."); + aError("Bad configuration data received.\r\n"); return false; } return true;