
This is a simple mbed client example demonstrating, registration of a device with mbed Device Connector and reading and writing values as well as deregistering on different Network Interfaces including Ethernet, WiFi, 6LoWPAN ND and Thread respectively.
Fork of mbed-os-example-client by
Revision 43:90fccf21be20, committed 2016-12-12
- Comitter:
- mbed_official
- Date:
- Mon Dec 12 12:00:11 2016 +0000
- Parent:
- 42:d9a3043214a6
- Child:
- 44:2b472e66a942
- Commit message:
- Fix UPD in Mesh for real
The MESH define was NOT usable in simpleclient.h, as the compiler had not
resolved that until it was executed in main.cpp - which was too late.
This made the mesh still to default to TCP mode.
.
Commit copied from https://github.com/ARMmbed/mbed-os-example-client
Changed in this revision
simpleclient.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/simpleclient.h Sun Dec 11 08:15:09 2016 +0000 +++ b/simpleclient.h Mon Dec 12 12:00:11 2016 +0000 @@ -38,6 +38,13 @@ #define STRINGIFY(s) #s +// Check if using mesh networking, define helper +#if MBED_CONF_APP_NETWORK_INTERFACE == MESH_LOWPAN_ND + #define MESH +#elif MBED_CONF_APP_NETWORK_INTERFACE == MESH_THREAD + #define MESH +#endif + #if defined (MESH) || (MBED_CONF_LWIP_IPV6_ENABLED==true) // Mesh is always IPV6 - also WiFi and ETH can be IPV6 if IPV6 is enabled M2MInterface::NetworkStack NETWORK_STACK = M2MInterface::LwIP_IPv6;