mbed Connector Interface simplification API on top of mbed-client
Fork of mbedConnectorInterfaceV3 by
NOTE:
This repo has been replaced with https://github.com/ARMmbed/mbedConnectorInterface. No further updates will occur with this repo. Please use the github repo instead. Thanks!
Diff: source/Utils.cpp
- Revision:
- 58:7a2df2ce591e
- Parent:
- 57:b017388f1aa3
- Child:
- 108:df7102357164
diff -r b017388f1aa3 -r 7a2df2ce591e source/Utils.cpp --- a/source/Utils.cpp Tue Aug 09 19:06:23 2016 +0000 +++ b/source/Utils.cpp Tue Aug 09 19:13:20 2016 +0000 @@ -76,9 +76,13 @@ // Default CoAP Connection Type config.setCoAPConnectionType(COAP_UDP); // default CoAP Connection Type - - // Set the default IP Address Type - config.setIPAddressType(IP_ADDRESS_TYPE_IPV4); // IPv4 is the default + + // Set the default IP Address Type +#if MBED_CONF_APP_NETWORK_INTERFACE == MESH_LOWPAN_ND || MBED_CONF_APP_NETWORK_INTERFACE == MESH_THREAD + config.setIPAddressType(IP_ADDRESS_TYPE_IPV6); // IPv6 is the default for mesh +#else + config.setIPAddressType(IP_ADDRESS_TYPE_IPV4); // IPv4 is the default for all but mesh +#endif // Establish default CoAP observation behavior config.setImmedateObservationEnabled(true);