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: mbed FXOS8700CQ MODSERIAL
Revision 50:8ac42961458c, committed 2016-07-24
- Comitter:
- fkellermavnet
- Date:
- Sun Jul 24 21:55:29 2016 +0000
- Parent:
- 49:97f823273dc0
- Child:
- 51:d9e5952545da
- Commit message:
- Made sockread char buffer larger to handle more data coming back from a server. For now, 10*1500 bytes.
Changed in this revision
| config_me.h | Show annotated file Show diff for this revision Revisions of this file |
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/config_me.h Sun Jul 24 21:22:23 2016 +0000 +++ b/config_me.h Sun Jul 24 21:55:29 2016 +0000 @@ -3,10 +3,13 @@ // User must set these for own context: +#define BUF_SIZE_FOR_N_MAX_SOCKREAD (10) +#define MAX_WNC_SOCKREAD_PAYLOAD (1500) + // This is the server's base URL name. Example "www.google.com" // Note that when you Fork a FLOW, it will typically assign either // "run-east.att.io" or "run-west.att.io", so be sure to check this. -static const char * MY_SERVER_URL = "run-west.att.io"; +static const char * MY_SERVER_URL = "www.google.com"; // "run-west.att.io"; // These are FLOW fields from the Endpoints tab: #define FLOW_BASE_URL "/1e464b19cdcde/774c88d68202/86694923d5bf28a/in/flow"
--- a/main.cpp Sun Jul 24 21:22:23 2016 +0000
+++ b/main.cpp Sun Jul 24 21:55:29 2016 +0000
@@ -517,7 +517,7 @@
}
printf(YEL "Read back : %s" DEF "\r\n", &MySocketData[0]);
char myJsonResponse[512];
- char stringToCharBuf[1501]; // WNC can return max of 1500
+ char stringToCharBuf[BUF_SIZE_FOR_N_MAX_SOCKREAD*MAX_WNC_SOCKREAD_PAYLOAD+1]; // WNC can return max of 1500 (per sockread)
strcpy(stringToCharBuf, MySocketData.c_str());
if (extract_JSON(stringToCharBuf, &myJsonResponse[0]))
{