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

Revision:
11:ea484e1b7fc4
Parent:
9:b6218dc218ad
Child:
13:2b51f5267c92
--- a/WiconnectInterface.h	Mon Aug 11 21:59:00 2014 -0700
+++ b/WiconnectInterface.h	Tue Aug 12 02:34:46 2014 -0700
@@ -36,13 +36,16 @@
 #endif
 
 
+/**
+ * @namespace wiconnect
+ */
 namespace wiconnect {
 
 
 /**
- *
+ * @ingroup types_core
  *
- * The root WiConnect library class. This class
+ * @brief The root WiConnect library class. This class
  * inheriets all WiConnect functionality.
  *
  * This class is implemented as a 'singleton'. This means it
@@ -57,9 +60,9 @@
 public:
 
     /**
-     *
+     * @ingroup types_core
      *
-     * WiConnect class constructor
+     * @brief WiConnect class constructor
      *
      * @note This should only be called once within a program as the WiConnect
      *       library is implemented as a singleton.
@@ -76,9 +79,9 @@
     Wiconnect(const SerialConfig &serialConfig, Pin reset = PIN_NC, Pin wake = PIN_NC, bool nonBlocking = WICONNECT_DEFAULT_NONBLOCKING WICONNECT_MALLOC_ARGS);
 
     /**
-     *
+     * @ingroup types_core
      *
-     * WiConnect class constructor
+     * @brief WiConnect class constructor
      *
      * @note This should only be called once within a program as the WiConnect
      *       library is implemented as a singleton.
@@ -96,10 +99,14 @@
     Wiconnect(const SerialConfig &serialConfig, void *internalBuffer, int internalBufferSize, Pin reset = PIN_NC, Pin wake = PIN_NC, bool nonBlocking = WICONNECT_DEFAULT_NONBLOCKING WICONNECT_MALLOC_ARGS);
     ~Wiconnect();
 
+
+    // ------------------------------------------------------------------------
+
+
     /**
      * @ingroup  api_core_misc
      *
-     * Get instance of previously instantiated Wiconnect Library
+     * @brief Get instance of previously instantiated Wiconnect Library
      *
      * @return Pointer to instance of @ref Wiconnect Library.
      */
@@ -108,7 +115,7 @@
     /**
      * @ingroup  api_core_misc
      *
-     * Initialize library and communication link with WiConnect WiFi module.
+     * @brief Initialize library and communication link with WiConnect WiFi module.
      *
      * @note This function is always blocking regardless of configured mode.
      *
@@ -120,14 +127,14 @@
     /**
      * @ingroup  api_core_misc
      *
-     * De-initialize library.
+     * @brief De-initialize library.
      */
     void deinit();
 
     /**
      * @ingroup api_core_misc
      *
-     * Return TRUE if library is able to communicated with WiConnect WiFi module.
+     * @brief Return TRUE if library is able to communicated with WiConnect WiFi module.
      * FALSE else.
      *
      * @return TRUE if library can communicate with WiFi module, FALSE else.
@@ -137,7 +144,7 @@
     /**
      * @ingroup api_core_misc
      *
-     * Toggle the WiConnect WiFi module reset signal.
+     * @brief Toggle the WiConnect WiFi module reset signal.
      *
      * @note This only resets the module if the library was instantiated with the 'reset' pin
      *       parameter in the Wiconnect::Wiconnect constructor.
@@ -151,7 +158,7 @@
     /**
      * @ingroup api_core_misc
      *
-     * Toggle the WiConnect WiFi moduel wakeup signal.
+     * @brief Toggle the WiConnect WiFi moduel wakeup signal.
      *
      * @note This only wakes the module if the library was instantiated with the 'wake' pin
      *       parameter in the Wiconnect::Wiconnect constructor.
@@ -164,17 +171,21 @@
     /**
      * @ingroup api_core_misc
      *
-     * Flush any received data in serial RX buffer and terminate any commands on WiConnect WiFi module.
+     * @brief Flush any received data in serial RX buffer and terminate any commands on WiConnect WiFi module.
      */
     void flush(int delayMs = 500);
 
     /**
      * @ingroup api_core_misc
      *
-     * Return current version of WiConnect WiFi module.
+     * @brief Return current version of WiConnect WiFi module.
      */
     WiconnectResult getVersion(char *versionBuffer = NULL, int versionBufferSize = 0, const Callback &completeCallback = Callback());
 
+
+    // ------------------------------------------------------------------------
+
+
     /**
      * @ingroup api_core_send_command
      *
@@ -313,46 +324,9 @@
     WiconnectResult sendCommand(const char *cmd, va_list vaList);
 
     /**
-     * @ingroup api_core_misc
-     *
-     * When the WiConnect WiFi module returns a response, it contains a
-     * response code in the header. This function converts the previous response code
-     * to a readable string.
-     */
-    const char* getLastCommandResponseCodeStr();
-
-    /**
-     * @ingroup api_core_misc
-     *
-     * Return the length in bytes of the previous response.
-     */
-    uint16_t getLastCommandResponseLength();
-
-    /**
-     * @ingroup api_core_misc
-     *
-     * Return pointer to internal response buffer.
-     */
-    char* getResponseBuffer();
-
-    /**
-     * @ingroup api_core_misc
-     *
-     * Helper method to convert previous response to uint32
-     */
-    WiconnectResult responseToUint32(uint32_t *uint32Ptr);
-
-    /**
-     * @ingroup api_core_misc
-     *
-     * Helper method to convert previous response to int32
-     */
-    WiconnectResult responseToInt32(int32_t *int32Ptr);
-
-    /**
      * @ingroup api_core_send_command
      *
-     * Check the status of the currently executing command.
+     * @brief Check the status of the currently executing command.
      *
      * Refer to @ref WiconnectResult for more information about the return code.
      *
@@ -363,16 +337,62 @@
     /**
      * @ingroup api_core_send_command
      *
-     * Stop the currently executing command.
+     * @brief Stop the currently executing command.
      *
      * @note This command is only applicable for non-blocking mode. Refer to @ref setting_blocking_modes.
      */
     void stopCurrentCommand();
 
+
+
+    // ------------------------------------------------------------------------
+
+
+    /**
+     * @ingroup api_core_misc
+     *
+     * @brief When the WiConnect WiFi module returns a response, it contains a
+     * response code in the header. This function converts the previous response code
+     * to a readable string.
+     */
+    const char* getLastCommandResponseCodeStr();
+
+    /**
+     * @ingroup api_core_misc
+     *
+     * @brief Return the length in bytes of the previous response.
+     */
+    uint16_t getLastCommandResponseLength();
+
+    /**
+     * @ingroup api_core_misc
+     *
+     * @brief Return pointer to internal response buffer.
+     */
+    char* getResponseBuffer();
+
+    /**
+     * @ingroup api_core_misc
+     *
+     * @brief Helper method to convert previous response to uint32
+     */
+    WiconnectResult responseToUint32(uint32_t *uint32Ptr);
+
+    /**
+     * @ingroup api_core_misc
+     *
+     * @brief Helper method to convert previous response to int32
+     */
+    WiconnectResult responseToInt32(int32_t *int32Ptr);
+
+
+    // ------------------------------------------------------------------------
+
+
     /**
      * @ingroup api_core_settings
      *
-     * Sets the default maximum time an API method may execute before
+     * @brief Sets the default maximum time an API method may execute before
      * terminating and return a timeout error code.
      *
      * @note All API method (execpt some sendCommand()) use this default value.
@@ -382,38 +402,42 @@
     /**
      * @ingroup api_core_settings
      *
-     * Returns the current default maximum API execution time.
+     * @brief Returns the current default maximum API execution time.
      */
     int getCommandDefaultTimeout();
 
     /**
      * @ingroup api_core_settings
      *
-     * Sets a mapping function used to convert from a host Pin to WiConnect WiFi module GPIO.
+     * @brief Sets a mapping function used to convert from a host Pin to WiConnect WiFi module GPIO.
      */
     void setPinToGpioMapper(PinToGpioMapper mapper);
 
     /**
      * @ingroup api_core_settings
      *
-     * Sets callback function used to debug WiConnect WiFi module RX/TX serial data.
+     * @brief Sets callback function used to debug WiConnect WiFi module RX/TX serial data.
      */
     void setDebugLogger(LogFunc logFunc);
 
     /**
      * @ingroup api_core_settings
      *
-     * Sets callback used when Wiconnect Library hits and internal assertion.
+     * @brief Sets callback used when Wiconnect Library hits and internal assertion.
      *
      * @note This is mainly for debugging. There's nothing the callback can do to fix the assertion.
      */
     void setAssertLogger(LogFunc assertLogFunc);
 
+
+    // ------------------------------------------------------------------------
+
+
 #ifdef WICONNECT_ASYNC_TIMER_ENABLED
     /**
      * @ingroup api_core_send_command
      *
-     * Add user command to be executed asynchronously.
+     * @brief Add user command to be executed asynchronously.
      *
      */
     WiconnectResult enqueueCommand(QueuedCommand *command, const Callback &commandCompleteHandler = Callback());
@@ -421,7 +445,7 @@
     /**
      * @ingroup api_core_settings
      *
-     * Set the period at which an asynchronous command should be processed.
+     * @brief Set the period at which an asynchronous command should be processed.
      */
     void setCommandProcessingPeriod(uint32_t periodMs);
 #endif
@@ -430,7 +454,7 @@
     /**
      * @ingroup conversion_util
      *
-     * Converts a @ref WiconnectResult to string representation.
+     * @brief Converts a @ref WiconnectResult to string representation.
      */
     static const char* getWiconnectResultStr(WiconnectResult wiconnectResult);