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.
Dependents: WNCInterface_M2Xdemo ATT_WNCInterface_Info WNCInterface_HTTP_example Public_IoT_M2X_Cellular_Demo
Fork of M2XStreamClient by
Revision 1:4d7109bae9cf, committed 2014-08-13
- Comitter:
- citrusbyte
- Date:
- Wed Aug 13 02:02:21 2014 +0000
- Parent:
- 0:f479e4f4db0e
- Commit message:
- Timestamp is now a required field
Changed in this revision
| M2XStreamClient.h | Show annotated file Show diff for this revision Revisions of this file |
| M2XStreamClient_template.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/M2XStreamClient.h Wed Feb 12 19:43:34 2014 +0000 +++ b/M2XStreamClient.h Wed Aug 13 02:02:21 2014 +0000 @@ -87,9 +87,8 @@ // be the some of all values in +counts+, for the first +counts[0]+ // items, the values belong to the first stream, for the following // +counts[1]+ number of items, the values belong to the second stream, - // etc. Note timestamps are optional, if a value does not havee timestamp, - // we can simply put NULL here, or we can put NULl for +ats+, meaning - // none of the values has a timestamp + // etc. Notice that timestamps are required here: you must provide + // a timestamp for each value posted. // +values+ - Values to post. This works the same way as +ats+, the // first +counts[0]+ number of items contain values to post to the first // stream, the succeeding +counts[1]+ number of items contain values
--- a/M2XStreamClient_template.h Wed Feb 12 19:43:34 2014 +0000
+++ b/M2XStreamClient_template.h Wed Aug 13 02:02:21 2014 +0000
@@ -34,13 +34,9 @@
bytes += print->print(names[i]);
bytes += print->print("\":[");
for (int j = 0; j < counts[i]; j++) {
- bytes += print->print("{");
- if (ats && ats[value_index]) {
- bytes += print->print("\"at\": \"");
- bytes += print->print(ats[value_index]);
- bytes += print->print("\",");
- }
- bytes += print->print("\"value\": \"");
+ bytes += print->print("{\"at\": \"");
+ bytes += print->print(ats[value_index]);
+ bytes += print->print("\", \"value\": \"");
bytes += print->print(values[value_index]);
bytes += print->print("\"}");
if (j < counts[i] - 1) { bytes += print->print(","); }
