Revised API description.

pull/8/head
Hieromon Ikasamo 7 years ago
parent bcf45b609c
commit 3996367bce
  1. 17
      docs/api/index.html
  2. 12
      docs/search/search_index.json
  3. 20
      docs/sitemap.xml
  4. 19
      mkdocs/api.md

@ -1128,11 +1128,12 @@
</pre></div>
<p><a id="withparameter"></a></p>
<p>AutoConnect default constructor. This entry activates WebServer internally and the web server is allocated internal.</p>
<p>AutoConnect default constructor. This entry internally allocates the ESP8266WebServer and is activated internally.</p>
<div class="codehilite"><pre><span></span><span class="n">AutoConnect</span><span class="p">(</span><span class="n">ESP8266WebServer</span><span class="o">&amp;</span> <span class="n">webServer</span><span class="p">)</span>
</pre></div>
<p>Run the AutoConnect site using the externally ensured ESP 8266 WebServer. User's added URI handler response can be included in handleClient method.
<p>Run the AutoConnect site using the externally ensured ESP8266WebServer.</p>
<p>The <a href="index.html#handleclient"><strong>handleClient</strong></a> function of AutoConnect can include the response of the URI handler added by the user using the "<em>on</em>" function of ESP8266WebServer. If ESP8266WebServer is assigned internally by AutoConnect, the sketch can obtain that reference with the <a href="../api.me#host"><strong>host</strong></a> function.
<dl class="apidl">
<dt><strong>Parameters</strong></dt>
<dd><span class="apidef">webServer</span>A reference of ESP8266WebServer instance.</dd>
@ -1145,7 +1146,9 @@
</pre></div>
<div class="codehilite"><pre><span></span><span class="kt">bool</span> <span class="n">begin</span><span class="p">(</span><span class="k">const</span> <span class="kt">char</span><span class="o">*</span> <span class="n">ssid</span><span class="p">,</span> <span class="k">const</span> <span class="kt">char</span><span class="o">*</span> <span class="n">passphraase</span><span class="p">,</span> <span class="n">unsinged</span> <span class="kt">long</span> <span class="n">timeout</span><span class="p">)</span>
</pre></div></p>
<p>Starts establishing WiFi connection. Before establishing, start the Web server and DNS server for the captive portal. Then begins connection establishment in WIFI_STA mode. If connection can not established with the specified SSID and password, switch to WIFI_AP_STA mode and activate SoftAP.
<p>Starts establishing the WiFi connection.<br />
AutoConnect first invokes <em>WiFi.begin</em>. If the case of SSID and Password missing, its <em>WiFi.begin</em> has no SSID and Password. The WiFi mode at this time is WIFI_STA. Then ESP8266WebServer will be started immediately after the first <em>WiFi.beign</em> regardless of the result.</p>
<p>The captive portal will not be started if the connection has been established with first <em>WiFi.begin</em>. If the connection cannot establish, switch to WIFI_AP_STA mode and activate SoftAP. Then DNS server starts.
<dl class="apidl">
<dt><strong>Parameters</strong></dt>
<dd><span class="apidef">ssid</span>SSID to be connected.</dd>
@ -1160,10 +1163,10 @@
</pre></div>
<div class="codehilite"><pre><span></span><span class="kt">bool</span> <span class="n">config</span><span class="p">(</span><span class="k">const</span> <span class="kt">char</span><span class="o">*</span> <span class="n">ap</span><span class="p">,</span> <span class="k">const</span> <span class="kt">char</span><span class="o">*</span> <span class="n">password</span> <span class="o">=</span> <span class="k">nullptr</span><span class="p">)</span>
</pre></div></p>
<p>Sets SoftAP's WiFi configuration.
<p>Set SoftAP's WiFi configuration and static IP configuration.
<dl class="apidl">
<dt><strong>Parameters</strong></dt>
<dd><span class="apidef">config</span>Reference to AutoConnectConfig containing SoftAP's parameters.</dd>
<dd><span class="apidef">config</span>Reference to <a href="index.html#autoconnectconfig"><strong>AutoConnectConfig</strong></a> containing SoftAP's parameters and static IP parameters.</dd>
<dd><span class="apidef">ap</span>SSID for SoftAP. The default value is <strong>esp8266ap</strong>.</dd>
<dd><span class="apidef">password</span>Password for SodtAP. The default value is <strong>12345678</strong>.</dd>
<dt><strong>Return value</strong></dt>
@ -1183,7 +1186,7 @@
<div class="codehilite"><pre><span></span><span class="kt">void</span> <span class="n">handleClient</span><span class="p">()</span>
</pre></div>
<p>Handling for the AutoConnect web interface. Invoke the handleClient of the parent web server to process client request of the AutoConnect WEB interface. No effects when the web server is not available.</p>
<p>Process the AutoConnect menu interface. It will be processed the client request too contained in the user sketch handler by calling the host <em>handleClient::ESP8266WebServer</em> from the Autoconnect internally.</p>
<h4 id="handlerequest">handleRequest<a class="headerlink" href="#handlerequest" title="Permanent link">&para;</a></h4>
<div class="codehilite"><pre><span></span><span class="kt">void</span> <span class="n">handleRequest</span><span class="p">()</span>
</pre></div>
@ -1197,7 +1200,7 @@
<div class="codehilite"><pre><span></span><span class="kt">void</span> <span class="n">home</span><span class="p">(</span><span class="n">String</span> <span class="n">uri</span><span class="p">)</span>
</pre></div>
<p>Put a user site's home URI. The URI specified by home is linked from "HOME" in the AutoConnect portal menu.
<p>Put a user site's home URI. The URI specified by home is linked from "HOME" in the AutoConnect menu.
<dl class="apidl">
<dt><strong>Parameters</strong></dt>
<dd><span class="apidef">uri</span> A URI string of user site's home path.</dd>

File diff suppressed because one or more lines are too long

@ -4,7 +4,7 @@
<url>
<loc>https://Hieromon.github.io/AutoConnect//index.html</loc>
<lastmod>2018-03-24</lastmod>
<lastmod>2018-03-26</lastmod>
<changefreq>daily</changefreq>
</url>
@ -12,7 +12,7 @@
<url>
<loc>https://Hieromon.github.io/AutoConnect//gettingstarted/index.html</loc>
<lastmod>2018-03-24</lastmod>
<lastmod>2018-03-26</lastmod>
<changefreq>daily</changefreq>
</url>
@ -20,7 +20,7 @@
<url>
<loc>https://Hieromon.github.io/AutoConnect//menu/index.html</loc>
<lastmod>2018-03-24</lastmod>
<lastmod>2018-03-26</lastmod>
<changefreq>daily</changefreq>
</url>
@ -28,7 +28,7 @@
<url>
<loc>https://Hieromon.github.io/AutoConnect//basicusage/index.html</loc>
<lastmod>2018-03-24</lastmod>
<lastmod>2018-03-26</lastmod>
<changefreq>daily</changefreq>
</url>
@ -36,7 +36,7 @@
<url>
<loc>https://Hieromon.github.io/AutoConnect//advancedusage/index.html</loc>
<lastmod>2018-03-24</lastmod>
<lastmod>2018-03-26</lastmod>
<changefreq>daily</changefreq>
</url>
@ -44,7 +44,7 @@
<url>
<loc>https://Hieromon.github.io/AutoConnect//api/index.html</loc>
<lastmod>2018-03-24</lastmod>
<lastmod>2018-03-26</lastmod>
<changefreq>daily</changefreq>
</url>
@ -52,7 +52,7 @@
<url>
<loc>https://Hieromon.github.io/AutoConnect//examples/index.html</loc>
<lastmod>2018-03-24</lastmod>
<lastmod>2018-03-26</lastmod>
<changefreq>daily</changefreq>
</url>
@ -60,7 +60,7 @@
<url>
<loc>https://Hieromon.github.io/AutoConnect//faq/index.html</loc>
<lastmod>2018-03-24</lastmod>
<lastmod>2018-03-26</lastmod>
<changefreq>daily</changefreq>
</url>
@ -68,7 +68,7 @@
<url>
<loc>https://Hieromon.github.io/AutoConnect//changelog/index.html</loc>
<lastmod>2018-03-24</lastmod>
<lastmod>2018-03-26</lastmod>
<changefreq>daily</changefreq>
</url>
@ -76,7 +76,7 @@
<url>
<loc>https://Hieromon.github.io/AutoConnect//license/index.html</loc>
<lastmod>2018-03-24</lastmod>
<lastmod>2018-03-26</lastmod>
<changefreq>daily</changefreq>
</url>

@ -34,13 +34,15 @@ AutoConnect()
<a id="withparameter"></a>
AutoConnect default constructor. This entry activates WebServer internally and the web server is allocated internal.
AutoConnect default constructor. This entry internally allocates the ESP8266WebServer and is activated internally.
```cpp
AutoConnect(ESP8266WebServer& webServer)
```
Run the AutoConnect site using the externally ensured ESP 8266 WebServer. User's added URI handler response can be included in handleClient method.
Run the AutoConnect site using the externally ensured ESP8266WebServer.
The [**handleClient**](api.md#handleclient) function of AutoConnect can include the response of the URI handler added by the user using the "*on*" function of ESP8266WebServer. If ESP8266WebServer is assigned internally by AutoConnect, the sketch can obtain that reference with the [**host**](api.me#host) function.
<dl class="apidl">
<dt>**Parameters**</dt>
<dd><span class="apidef">webServer</span>A reference of ESP8266WebServer instance.</dd>
@ -60,7 +62,10 @@ bool begin(const char* ssid, const char* passphraase)
bool begin(const char* ssid, const char* passphraase, unsinged long timeout)
```
Starts establishing WiFi connection. Before establishing, start the Web server and DNS server for the captive portal. Then begins connection establishment in WIFI_STA mode. If connection can not established with the specified SSID and password, switch to WIFI_AP_STA mode and activate SoftAP.
Starts establishing the WiFi connection.
AutoConnect first invokes *WiFi.begin*. If the case of SSID and Password missing, its *WiFi.begin* has no SSID and Password. The WiFi mode at this time is WIFI_STA. Then ESP8266WebServer will be started immediately after the first *WiFi.beign* regardless of the result.
The captive portal will not be started if the connection has been established with first *WiFi.begin*. If the connection cannot establish, switch to WIFI_AP_STA mode and activate SoftAP. Then DNS server starts.
<dl class="apidl">
<dt>**Parameters**</dt>
<dd><span class="apidef">ssid</span>SSID to be connected.</dd>
@ -80,10 +85,10 @@ bool config(AutoConnectConfig& config)
bool config(const char* ap, const char* password = nullptr)
```
Sets SoftAP's WiFi configuration.
Set SoftAP's WiFi configuration and static IP configuration.
<dl class="apidl">
<dt>**Parameters**</dt>
<dd><span class="apidef">config</span>Reference to AutoConnectConfig containing SoftAP's parameters.</dd>
<dd><span class="apidef">config</span>Reference to [**AutoConnectConfig**](api.md#autoconnectconfig) containing SoftAP's parameters and static IP parameters.</dd>
<dd><span class="apidef">ap</span>SSID for SoftAP. The default value is **esp8266ap**.</dd>
<dd><span class="apidef">password</span>Password for SodtAP. The default value is **12345678**.</dd>
<dt>**Return value**</dt>
@ -108,7 +113,7 @@ Stops AutoConnect captive portal service. Release ESP8266WebServer and DNSServer
void handleClient()
```
Handling for the AutoConnect web interface. Invoke the handleClient of the parent web server to process client request of the AutoConnect WEB interface. No effects when the web server is not available.
Process the AutoConnect menu interface. It will be processed the client request too contained in the user sketch handler by calling the host *handleClient::ESP8266WebServer* from the Autoconnect internally.
#### handleRequest
@ -127,7 +132,7 @@ Handling for the AutoConnect menu request.
void home(String uri)
```
Put a user site's home URI. The URI specified by home is linked from "HOME" in the AutoConnect portal menu.
Put a user site's home URI. The URI specified by home is linked from "HOME" in the AutoConnect menu.
<dl class="apidl">
<dt>**Parameters**</dt>
<dd><span class="apidef">uri</span> A URI string of user site's home path.</dd>

Loading…
Cancel
Save