Host library for controlling a WiConnect enabled Wi-Fi module.
Dependents: wiconnect-ota_example wiconnect-web_setup_example wiconnect-test-console wiconnect-tcp_server_example ... more
Diff: NetworkInterface.h
- Revision:
- 17:7268f365676b
- Parent:
- 16:7f1d6d359787
- Child:
- 21:17bb3eddcbae
diff -r 7f1d6d359787 -r 7268f365676b NetworkInterface.h --- a/NetworkInterface.h Wed Aug 13 04:41:04 2014 -0700 +++ b/NetworkInterface.h Sat Aug 23 05:39:17 2014 -0700 @@ -108,16 +108,18 @@ * * @brief Join a WiFi network. * - * @note This command is returns when the join sequence has STARTED. - * To determine if the module has successfully join the network either - * specify the completeHandler or periodically call getNetworkStatus() - * * This command has an optional background processing feature. * Background processing is enabled if the completeHandler parameter * is specified. If enabled, the library will poll the module every second * for the join status (essentially it'll call getNetworkStatus() every * second in the background). When the module join sequence complete the callback will be executed. - * The background processing is disabled when leave() is called. + * The background processing is disabled when leave() is called. + * + * * If completeHandler parameter is NOT specified: + * This command will BLOCK/return WICONNECT_PROCESSING until the module has + * either successfully joined the network or failed. + * * If the completeHandler parameter IS specified: + * This command will return and use the background processing feature described above. * * @note only the 'result' parameter of the callback handler is valid. * @@ -260,6 +262,19 @@ */ WiconnectResult getSignalStrength(NetworkSignalStrength *signalStrengthPtr); + + /** + * @ingroup api_network_settings + * + * @note This method is only supported in blocking mode. + * + * @brief Return the current IP address of the module if possible, else + * return 0.0.0.0 + * @param[in] buffer Optional, buffer to IP address string. If omitted, + * the IP address string is stored in a local static buffer (this is non-reentrant!) + */ + const char* getIpAddress(char *buffer = NULL); + // ------------------------------------------------------------------------