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

Committer:
dan_ackme
Date:
Tue Aug 12 02:34:46 2014 -0700
Revision:
11:ea484e1b7fc4
Parent:
10:735194df0097
Child:
13:2b51f5267c92
updated documnetation

Who changed what in which revision?

UserRevisionLine numberNew contents of line
dan_ackme 10:735194df0097 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
dan_ackme 10:735194df0097 2 <html xmlns="http://www.w3.org/1999/xhtml">
dan_ackme 10:735194df0097 3 <head>
dan_ackme 10:735194df0097 4 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
dan_ackme 10:735194df0097 5 <meta http-equiv="X-UA-Compatible" content="IE=9"/>
dan_ackme 10:735194df0097 6 <meta name="generator" content="Doxygen 1.8.7"/>
dan_ackme 10:735194df0097 7 <title>WiConnect Library: WiConnect Library Overview</title>
dan_ackme 10:735194df0097 8 <link href="tabs.css" rel="stylesheet" type="text/css"/>
dan_ackme 10:735194df0097 9 <script type="text/javascript" src="jquery.js"></script>
dan_ackme 10:735194df0097 10 <script type="text/javascript" src="dynsections.js"></script>
dan_ackme 10:735194df0097 11 <link href="navtree.css" rel="stylesheet" type="text/css"/>
dan_ackme 10:735194df0097 12 <script type="text/javascript" src="resize.js"></script>
dan_ackme 10:735194df0097 13 <script type="text/javascript" src="navtree.js"></script>
dan_ackme 10:735194df0097 14 <script type="text/javascript">
dan_ackme 10:735194df0097 15 $(document).ready(initResizable);
dan_ackme 10:735194df0097 16 $(window).load(resizeHeight);
dan_ackme 10:735194df0097 17 </script>
dan_ackme 11:ea484e1b7fc4 18 <link href="search/search.css" rel="stylesheet" type="text/css"/>
dan_ackme 11:ea484e1b7fc4 19 <script type="text/javascript" src="search/search.js"></script>
dan_ackme 11:ea484e1b7fc4 20 <script type="text/javascript">
dan_ackme 11:ea484e1b7fc4 21 $(document).ready(function() { searchBox.OnSelectItem(0); });
dan_ackme 11:ea484e1b7fc4 22 </script>
dan_ackme 10:735194df0097 23 <link href="doxygen.css" rel="stylesheet" type="text/css" />
dan_ackme 10:735194df0097 24 </head>
dan_ackme 10:735194df0097 25 <body>
dan_ackme 10:735194df0097 26 <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
dan_ackme 10:735194df0097 27 <div id="titlearea">
dan_ackme 10:735194df0097 28 <table cellspacing="0" cellpadding="0">
dan_ackme 10:735194df0097 29 <tbody>
dan_ackme 10:735194df0097 30 <tr style="height: 56px;">
dan_ackme 10:735194df0097 31 <td style="padding-left: 0.5em;">
dan_ackme 10:735194df0097 32 <div id="projectname">WiConnect Library
dan_ackme 10:735194df0097 33 </div>
dan_ackme 10:735194df0097 34 </td>
dan_ackme 10:735194df0097 35 </tr>
dan_ackme 10:735194df0097 36 </tbody>
dan_ackme 10:735194df0097 37 </table>
dan_ackme 10:735194df0097 38 </div>
dan_ackme 10:735194df0097 39 <!-- end header part -->
dan_ackme 10:735194df0097 40 <!-- Generated by Doxygen 1.8.7 -->
dan_ackme 11:ea484e1b7fc4 41 <script type="text/javascript">
dan_ackme 11:ea484e1b7fc4 42 var searchBox = new SearchBox("searchBox", "search",false,'Search');
dan_ackme 11:ea484e1b7fc4 43 </script>
dan_ackme 10:735194df0097 44 <div id="navrow1" class="tabs">
dan_ackme 10:735194df0097 45 <ul class="tablist">
dan_ackme 10:735194df0097 46 <li class="current"><a href="index.html"><span>Main&#160;Page</span></a></li>
dan_ackme 10:735194df0097 47 <li><a href="modules.html"><span>Modules</span></a></li>
dan_ackme 11:ea484e1b7fc4 48 <li><a href="namespaces.html"><span>Namespaces</span></a></li>
dan_ackme 10:735194df0097 49 <li><a href="annotated.html"><span>Classes</span></a></li>
dan_ackme 11:ea484e1b7fc4 50 <li>
dan_ackme 11:ea484e1b7fc4 51 <div id="MSearchBox" class="MSearchBoxInactive">
dan_ackme 11:ea484e1b7fc4 52 <span class="left">
dan_ackme 11:ea484e1b7fc4 53 <img id="MSearchSelect" src="search/mag_sel.png"
dan_ackme 11:ea484e1b7fc4 54 onmouseover="return searchBox.OnSearchSelectShow()"
dan_ackme 11:ea484e1b7fc4 55 onmouseout="return searchBox.OnSearchSelectHide()"
dan_ackme 11:ea484e1b7fc4 56 alt=""/>
dan_ackme 11:ea484e1b7fc4 57 <input type="text" id="MSearchField" value="Search" accesskey="S"
dan_ackme 11:ea484e1b7fc4 58 onfocus="searchBox.OnSearchFieldFocus(true)"
dan_ackme 11:ea484e1b7fc4 59 onblur="searchBox.OnSearchFieldFocus(false)"
dan_ackme 11:ea484e1b7fc4 60 onkeyup="searchBox.OnSearchFieldChange(event)"/>
dan_ackme 11:ea484e1b7fc4 61 </span><span class="right">
dan_ackme 11:ea484e1b7fc4 62 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
dan_ackme 11:ea484e1b7fc4 63 </span>
dan_ackme 11:ea484e1b7fc4 64 </div>
dan_ackme 11:ea484e1b7fc4 65 </li>
dan_ackme 10:735194df0097 66 </ul>
dan_ackme 10:735194df0097 67 </div>
dan_ackme 10:735194df0097 68 </div><!-- top -->
dan_ackme 10:735194df0097 69 <div id="side-nav" class="ui-resizable side-nav-resizable">
dan_ackme 10:735194df0097 70 <div id="nav-tree">
dan_ackme 10:735194df0097 71 <div id="nav-tree-contents">
dan_ackme 10:735194df0097 72 <div id="nav-sync" class="sync"></div>
dan_ackme 10:735194df0097 73 </div>
dan_ackme 10:735194df0097 74 </div>
dan_ackme 10:735194df0097 75 <div id="splitbar" style="-moz-user-select:none;"
dan_ackme 10:735194df0097 76 class="ui-resizable-handle">
dan_ackme 10:735194df0097 77 </div>
dan_ackme 10:735194df0097 78 </div>
dan_ackme 10:735194df0097 79 <script type="text/javascript">
dan_ackme 10:735194df0097 80 $(document).ready(function(){initNavTree('index.html','');});
dan_ackme 10:735194df0097 81 </script>
dan_ackme 10:735194df0097 82 <div id="doc-content">
dan_ackme 11:ea484e1b7fc4 83 <!-- window showing the filter options -->
dan_ackme 11:ea484e1b7fc4 84 <div id="MSearchSelectWindow"
dan_ackme 11:ea484e1b7fc4 85 onmouseover="return searchBox.OnSearchSelectShow()"
dan_ackme 11:ea484e1b7fc4 86 onmouseout="return searchBox.OnSearchSelectHide()"
dan_ackme 11:ea484e1b7fc4 87 onkeydown="return searchBox.OnSearchSelectKey(event)">
dan_ackme 11:ea484e1b7fc4 88 <a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Pages</a></div>
dan_ackme 11:ea484e1b7fc4 89
dan_ackme 11:ea484e1b7fc4 90 <!-- iframe showing the search results (closed by default) -->
dan_ackme 11:ea484e1b7fc4 91 <div id="MSearchResultsWindow">
dan_ackme 11:ea484e1b7fc4 92 <iframe src="javascript:void(0)" frameborder="0"
dan_ackme 11:ea484e1b7fc4 93 name="MSearchResults" id="MSearchResults">
dan_ackme 11:ea484e1b7fc4 94 </iframe>
dan_ackme 11:ea484e1b7fc4 95 </div>
dan_ackme 11:ea484e1b7fc4 96
dan_ackme 10:735194df0097 97 <div class="header">
dan_ackme 10:735194df0097 98 <div class="headertitle">
dan_ackme 10:735194df0097 99 <div class="title">WiConnect Library Overview </div> </div>
dan_ackme 10:735194df0097 100 </div><!--header-->
dan_ackme 10:735194df0097 101 <div class="contents">
dan_ackme 10:735194df0097 102 <div class="textblock"><h1><a class="anchor" id="Overview"></a>
dan_ackme 10:735194df0097 103 Overview</h1>
dan_ackme 10:735194df0097 104 <p>The WiConnect Library runs on a host MCU and controls a WiConnect enabled WiFi module. This library is essentially a programming API for the WiConnect serial command set. More infomation about the serial command set may be found here: <a href="http://wiconnect.ack.me" target="_blank">WiConnect Reference Guide</a></p>
dan_ackme 10:735194df0097 105 <h1><a class="anchor" id="notes"></a>
dan_ackme 10:735194df0097 106 Important Notes</h1>
dan_ackme 10:735194df0097 107 <ul>
dan_ackme 10:735194df0097 108 <li>This class is implemented as a 'singleton'. This means it only needs to be instantiated once.</li>
dan_ackme 10:735194df0097 109 <li>The WiConnect library does NOT call the global 'new' or 'malloc' functions. All memory allocation (if required) comes from a user supplied malloc function pointer or buffer</li>
dan_ackme 10:735194df0097 110 </ul>
dan_ackme 10:735194df0097 111 <h1><a class="anchor" id="features"></a>
dan_ackme 10:735194df0097 112 Library Settings</h1>
dan_ackme 10:735194df0097 113 <p>The WiConnect Library has multiple settings so as to allow for the most flexibility within a user's application.</p>
dan_ackme 10:735194df0097 114 <p>Some of these configurations are as follows:</p><ul>
dan_ackme 10:735194df0097 115 <li>Blocking / Non-blocking</li>
dan_ackme 10:735194df0097 116 <li>Dynamic / Static allocation</li>
dan_ackme 10:735194df0097 117 <li>Asynchronous Processing</li>
dan_ackme 10:735194df0097 118 </ul>
dan_ackme 10:735194df0097 119 <h2><a class="anchor" id="setting_blocking_modes"></a>
dan_ackme 10:735194df0097 120 Blocking / Non-blocking Modes</h2>
dan_ackme 10:735194df0097 121 <p>The WiConnect Library may be configured for either 'blocking' or 'non-blocking' operation:</p><ul>
dan_ackme 10:735194df0097 122 <li>blocking - API calls do not return until they complete successfully or timeout.</li>
dan_ackme 10:735194df0097 123 <li>non-blocking - API calls return immediately. The caller should check the return code to see if the command is still processing, completed, or an error occurred. The caller should continue to call the API function (as often as possible) until it returns either a success or error code.</li>
dan_ackme 10:735194df0097 124 </ul>
dan_ackme 10:735194df0097 125 <h3><a class="anchor" id="setting_blocking_mode"></a>
dan_ackme 10:735194df0097 126 Blocking Mode</h3>
dan_ackme 10:735194df0097 127 <p>In blocking mode, an API function will block until it completes. TODO: more details here</p>
dan_ackme 10:735194df0097 128 <h3><a class="anchor" id="setting_nonblocking_mode"></a>
dan_ackme 10:735194df0097 129 Non-Blocking Mode</h3>
dan_ackme 10:735194df0097 130 <p>In non-blocking mode, an API function returns immediately. TODO: more details here</p>
dan_ackme 10:735194df0097 131 <h2><a class="anchor" id="setting_alloc"></a>
dan_ackme 10:735194df0097 132 Dynamic / Static Allocation</h2>
dan_ackme 10:735194df0097 133 <p>There are two cases when memory allocation is required:</p><ul>
dan_ackme 10:735194df0097 134 <li>Buffer allocation</li>
dan_ackme 10:735194df0097 135 <li>Class instantiation</li>
dan_ackme 10:735194df0097 136 </ul>
dan_ackme 10:735194df0097 137 <p>In both cases, either static or dynamic memory allocation may be used.</p>
dan_ackme 10:735194df0097 138 <p>In cases when memory allocation is needed, the API call requires a buffer pointer and length parameters. If both are supplied, the library uses the supplied external buffer. This is considered static allocation (however the buffer could have been dynamically allocated). The caller is responsible for maintaining the supplied buffer.</p>
dan_ackme 10:735194df0097 139 <p>If, however, only the buffer length is supplied and the buffer pointer is NULL the Wiconnect Library will call the user supplied malloc() function. This is considered dynamic allocation. In this case, the library will maintain the buffer and release it when necessary using the user supplied free() function.</p>
dan_ackme 11:ea484e1b7fc4 140 <dl class="section note"><dt>Note</dt><dd>To use dynamic allocation the WiConnect Library must be compiled with <a class="el" href="group__api__core__macro.html#gae9cf1249b46e784aa05250e2bcbe2e02">WICONNECT_ENABLE_MALLOC</a> defined, and the Wiconnect() constructor must be supplied with pointers to malloc() and free() functions.</dd>
dan_ackme 10:735194df0097 141 <dd>
dan_ackme 10:735194df0097 142 The Wiconnect Library does NOT call the global 'new' operator. Classes that are internally instantiated overload the 'new' operator and either call the user supplied malloc() function or use the supplied static buffer.</dd></dl>
dan_ackme 10:735194df0097 143 <h2><a class="anchor" id="setting_async_processing"></a>
dan_ackme 10:735194df0097 144 Asynchronous Processing</h2>
dan_ackme 10:735194df0097 145 <p>When applicable, the WiConnect Library will asynchronously process commands in the background. When the background processing completes, the supplied callback is called.</p>
dan_ackme 10:735194df0097 146 <p>User commands may also be executed in the background using the enqueueCommand() API function.</p>
dan_ackme 11:ea484e1b7fc4 147 <dl class="section note"><dt>Note</dt><dd>The WiConnect Library must be compiled with <a class="el" href="group__api__core__macro.html#gad466ede4f07512308e38402d777d8380">WICONNECT_ASYNC_TIMER_ENABLED</a> defined for background processing to be enabled.</dd></dl>
dan_ackme 10:735194df0097 148 <h1><a class="anchor" id="send_command_desc"></a>
dan_ackme 10:735194df0097 149 Sending Commands To WiFi Module</h1>
dan_ackme 10:735194df0097 150 <p>TODO: add detailed description here </p>
dan_ackme 10:735194df0097 151 </div></div><!-- contents -->
dan_ackme 10:735194df0097 152 </div><!-- doc-content -->
dan_ackme 10:735194df0097 153 <!-- start footer part -->
dan_ackme 10:735194df0097 154 <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
dan_ackme 10:735194df0097 155 <ul>
dan_ackme 11:ea484e1b7fc4 156 <li class="footer">Generated on Tue Aug 12 2014 02:15:27 for WiConnect Library by
dan_ackme 10:735194df0097 157 <a href="http://www.doxygen.org/index.html">
dan_ackme 10:735194df0097 158 <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.7 </li>
dan_ackme 10:735194df0097 159 </ul>
dan_ackme 10:735194df0097 160 </div>
dan_ackme 10:735194df0097 161 </body>
dan_ackme 10:735194df0097 162 </html>