diff options
author | Jo-Philipp Wich <jo@mein.io> | 2019-11-05 09:33:40 +0100 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2019-11-05 09:37:52 +0100 |
commit | 3942789dc62d6a0e7fcfb0a935bfe5c8d372245b (patch) | |
tree | 9ec432a1dc31c7d837575e7989a47d7cca93e86b /documentation/jsapi/LuCI.Network.WifiDevice.html | |
parent | 9b92b2c8f9ce69cfe89c231311d37177ecaa8d43 (diff) |
documentation: add JS api docs
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit d9452d1157aef6b8752fac0f4ed1e0b9221abb31)
Diffstat (limited to 'documentation/jsapi/LuCI.Network.WifiDevice.html')
-rw-r--r-- | documentation/jsapi/LuCI.Network.WifiDevice.html | 1915 |
1 files changed, 1915 insertions, 0 deletions
diff --git a/documentation/jsapi/LuCI.Network.WifiDevice.html b/documentation/jsapi/LuCI.Network.WifiDevice.html new file mode 100644 index 000000000..b050c68bc --- /dev/null +++ b/documentation/jsapi/LuCI.Network.WifiDevice.html @@ -0,0 +1,1915 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title>JSDoc: Class: WifiDevice</title> + + <script src="scripts/prettify/prettify.js"> </script> + <script src="scripts/prettify/lang-css.js"> </script> + <!--[if lt IE 9]> + <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> + <![endif]--> + <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css"> + <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css"> +</head> + +<body> + +<div id="main"> + + <h1 class="page-title">Class: WifiDevice</h1> + + + + + + +<section> + +<header> + + <h2><span class="attribs"><span class="type-signature"></span></span> + <span class="ancestors"><a href="LuCI.html">LuCI</a><a href="LuCI.Network.html">.Network</a>.</span>WifiDevice</h2> + + <div class="class-description"><p>A <code>Network.WifiDevice</code> class instance represents a wireless radio device +present on the system and provides wireless capability information as +well as methods for enumerating related wireless networks.</p></div> + + +</header> + +<article> + <div class="container-overview"> + + + + + + + + + + + + + + + + + +<dl class="details"> + + + + + + + + + + + + + + + + + + + + + + + + + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="network.js.html">network.js</a>, <a href="network.js.html#line2957">line 2957</a> + </li></ul></dd> + + + + + + + +</dl> + + + + + + + + + + + + + + + + + + + + + + </div> + + + + + + + + + + + + + + + + + <h3 class="subsection-title">Methods</h3> + + + + + + + + <h4 class="name" id="addWifiNetwork"><span class="type-signature"></span>addWifiNetwork<span class="signature">(options<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {Promise.<(null|<a href="LuCI.Network.WifiNetwork.html">LuCI.Network.WifiNetwork</a>)>}</span></h4> + + + + + + +<div class="description"> + <p>Adds a new wireless network associated with this radio device to the +configuration and sets its options to the provided values.</p> +</div> + + + + + + + + + + <h5>Parameters:</h5> + + +<table class="params"> + <thead> + <tr> + + <th>Name</th> + + + <th>Type</th> + + + <th>Attributes</th> + + + + + <th class="last">Description</th> + </tr> + </thead> + + <tbody> + + + <tr> + + <td class="name"><code>options</code></td> + + + <td class="type"> + + +<span class="param-type">Object.<string, (string|Array.<string>)></span> + + + + </td> + + + <td class="attributes"> + + <optional><br> + + + + + + </td> + + + + + <td class="description last"><p>The options to set for the newly added wireless network.</p></td> + </tr> + + + </tbody> +</table> + + + + + + +<dl class="details"> + + + + + + + + + + + + + + + + + + + + + + + + + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="network.js.html">network.js</a>, <a href="network.js.html#line3222">line 3222</a> + </li></ul></dd> + + + + + + + +</dl> + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>Returns a promise resolving to a <code>WifiNetwork</code> instance describing +the newly added wireless network or <code>null</code> if the given options +were invalid.</p> +</div> + + + +<dl> + <dt> + Type + </dt> + <dd> + +<span class="param-type">Promise.<(null|<a href="LuCI.Network.WifiNetwork.html">LuCI.Network.WifiNetwork</a>)></span> + + + </dd> +</dl> + + + + + + + + + + + + + + <h4 class="name" id="deleteWifiNetwork"><span class="type-signature"></span>deleteWifiNetwork<span class="signature">(network)</span><span class="type-signature"> → {Promise.<boolean>}</span></h4> + + + + + + +<div class="description"> + <p>Deletes the wireless network with the given name associated with this +radio device.</p> +</div> + + + + + + + + + + <h5>Parameters:</h5> + + +<table class="params"> + <thead> + <tr> + + <th>Name</th> + + + <th>Type</th> + + + + + + <th class="last">Description</th> + </tr> + </thead> + + <tbody> + + + <tr> + + <td class="name"><code>network</code></td> + + + <td class="type"> + + +<span class="param-type">string</span> + + + + </td> + + + + + + <td class="description last"><p>The name of the wireless network to lookup. This may be either an uci +configuration section ID, a network ID in the form <code>radio#.network#</code> +or a Linux network device name like <code>wlan0</code> which is resolved to the +corresponding configuration section through <code>ubus</code> runtime information.</p></td> + </tr> + + + </tbody> +</table> + + + + + + +<dl class="details"> + + + + + + + + + + + + + + + + + + + + + + + + + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="network.js.html">network.js</a>, <a href="network.js.html#line3247">line 3247</a> + </li></ul></dd> + + + + + + + +</dl> + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>Returns a promise resolving to <code>true</code> when the wireless network was +successfully deleted from the configuration or <code>false</code> when the given +network could not be found or if the found network was not associated +with this wireless radio device.</p> +</div> + + + +<dl> + <dt> + Type + </dt> + <dd> + +<span class="param-type">Promise.<boolean></span> + + + </dd> +</dl> + + + + + + + + + + + + + + <h4 class="name" id="get"><span class="type-signature"></span>get<span class="signature">(opt)</span><span class="type-signature"> → {null|string|Array.<string>}</span></h4> + + + + + + +<div class="description"> + <p>Read the given UCI option value of this wireless device.</p> +</div> + + + + + + + + + + <h5>Parameters:</h5> + + +<table class="params"> + <thead> + <tr> + + <th>Name</th> + + + <th>Type</th> + + + + + + <th class="last">Description</th> + </tr> + </thead> + + <tbody> + + + <tr> + + <td class="name"><code>opt</code></td> + + + <td class="type"> + + +<span class="param-type">string</span> + + + + </td> + + + + + + <td class="description last"><p>The UCI option name to read.</p></td> + </tr> + + + </tbody> +</table> + + + + + + +<dl class="details"> + + + + + + + + + + + + + + + + + + + + + + + + + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="network.js.html">network.js</a>, <a href="network.js.html#line2997">line 2997</a> + </li></ul></dd> + + + + + + + +</dl> + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>Returns the UCI option value or <code>null</code> if the requested option is +not found.</p> +</div> + + + +<dl> + <dt> + Type + </dt> + <dd> + +<span class="param-type">null</span> +| + +<span class="param-type">string</span> +| + +<span class="param-type">Array.<string></span> + + + </dd> +</dl> + + + + + + + + + + + + + + <h4 class="name" id="getHTModes"><span class="type-signature"></span>getHTModes<span class="signature">()</span><span class="type-signature"> → {Array.<string>}</span></h4> + + + + + + +<div class="description"> + <p>Gets a list of supported htmodes.</p> +<p>The htmode values describe the wide-frequency options supported by +the wireless phy.</p> +</div> + + + + + + + + + + + + + +<dl class="details"> + + + + + + + + + + + + + + + + + + + + + + + + + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="network.js.html">network.js</a>, <a href="network.js.html#line3075">line 3075</a> + </li></ul></dd> + + + + + + + +</dl> + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>Returns an array of valid htmode values for this radio. Currently +known mode values are:</p> +<ul> +<li><code>HT20</code> - applicable to IEEE 802.11n, 20 MHz wide channels</li> +<li><code>HT40</code> - applicable to IEEE 802.11n, 40 MHz wide channels</li> +<li><code>VHT20</code> - applicable to IEEE 802.11ac, 20 MHz wide channels</li> +<li><code>VHT40</code> - applicable to IEEE 802.11ac, 40 MHz wide channels</li> +<li><code>VHT80</code> - applicable to IEEE 802.11ac, 80 MHz wide channels</li> +<li><code>VHT160</code> - applicable to IEEE 802.11ac, 160 MHz wide channels</li> +</ul> +</div> + + + +<dl> + <dt> + Type + </dt> + <dd> + +<span class="param-type">Array.<string></span> + + + </dd> +</dl> + + + + + + + + + + + + + + <h4 class="name" id="getHWModes"><span class="type-signature"></span>getHWModes<span class="signature">()</span><span class="type-signature"> → {Array.<string>}</span></h4> + + + + + + +<div class="description"> + <p>Gets a list of supported hwmodes.</p> +<p>The hwmode values describe the frequency band and wireless standard +versions supported by the wireless phy.</p> +</div> + + + + + + + + + + + + + +<dl class="details"> + + + + + + + + + + + + + + + + + + + + + + + + + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="network.js.html">network.js</a>, <a href="network.js.html#line3054">line 3054</a> + </li></ul></dd> + + + + + + + +</dl> + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>Returns an array of valid hwmode values for this radio. Currently +known mode values are:</p> +<ul> +<li><code>a</code> - Legacy 802.11a mode, 5 GHz, up to 54 Mbit/s</li> +<li><code>b</code> - Legacy 802.11b mode, 2.4 GHz, up to 11 Mbit/s</li> +<li><code>g</code> - Legacy 802.11g mode, 2.4 GHz, up to 54 Mbit/s</li> +<li><code>n</code> - IEEE 802.11n mode, 2.4 or 5 GHz, up to 600 Mbit/s</li> +<li><code>ac</code> - IEEE 802.11ac mode, 5 GHz, up to 6770 Mbit/s</li> +</ul> +</div> + + + +<dl> + <dt> + Type + </dt> + <dd> + +<span class="param-type">Array.<string></span> + + + </dd> +</dl> + + + + + + + + + + + + + + <h4 class="name" id="getI18n"><span class="type-signature"></span>getI18n<span class="signature">()</span><span class="type-signature"> → {string}</span></h4> + + + + + + +<div class="description"> + <p>Get a string describing the wireless radio hardware.</p> +</div> + + + + + + + + + + + + + +<dl class="details"> + + + + + + + + + + + + + + + + + + + + + + + + + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="network.js.html">network.js</a>, <a href="network.js.html#line3086">line 3086</a> + </li></ul></dd> + + + + + + + +</dl> + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>Returns the description string.</p> +</div> + + + +<dl> + <dt> + Type + </dt> + <dd> + +<span class="param-type">string</span> + + + </dd> +</dl> + + + + + + + + + + + + + + <h4 class="name" id="getName"><span class="type-signature"></span>getName<span class="signature">()</span><span class="type-signature"> → {string}</span></h4> + + + + + + +<div class="description"> + <p>Get the configuration name of this wireless radio.</p> +</div> + + + + + + + + + + + + + +<dl class="details"> + + + + + + + + + + + + + + + + + + + + + + + + + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="network.js.html">network.js</a>, <a href="network.js.html#line3035">line 3035</a> + </li></ul></dd> + + + + + + + +</dl> + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>Returns the UCI section name (e.g. <code>radio0</code>) of the corresponding +radio configuration which also serves as unique logical identifier +for the wireless phy.</p> +</div> + + + +<dl> + <dt> + Type + </dt> + <dd> + +<span class="param-type">string</span> + + + </dd> +</dl> + + + + + + + + + + + + + + <h4 class="name" id="getScanList"><span class="type-signature"></span>getScanList<span class="signature">()</span><span class="type-signature"> → {Promise.<Array.<<a href="LuCI.Network.html#.WifiScanResult">LuCI.Network.WifiScanResult</a>>>}</span></h4> + + + + + + +<div class="description"> + <p>Trigger a wireless scan on this radio device and obtain a list of +nearby networks.</p> +</div> + + + + + + + + + + + + + +<dl class="details"> + + + + + + + + + + + + + + + + + + + + + + + + + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="network.js.html">network.js</a>, <a href="network.js.html#line3147">line 3147</a> + </li></ul></dd> + + + + + + + +</dl> + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>Returns a promise resolving to an array of scan result objects +describing the networks found in the vincinity.</p> +</div> + + + +<dl> + <dt> + Type + </dt> + <dd> + +<span class="param-type">Promise.<Array.<<a href="LuCI.Network.html#.WifiScanResult">LuCI.Network.WifiScanResult</a>>></span> + + + </dd> +</dl> + + + + + + + + + + + + + + <h4 class="name" id="getWifiNetwork"><span class="type-signature"></span>getWifiNetwork<span class="signature">(network)</span><span class="type-signature"> → {Promise.<<a href="LuCI.Network.WifiNetwork.html">LuCI.Network.WifiNetwork</a>>}</span></h4> + + + + + + +<div class="description"> + <p>Get the wifi network of the given name belonging to this radio device</p> +</div> + + + + + + + + + + <h5>Parameters:</h5> + + +<table class="params"> + <thead> + <tr> + + <th>Name</th> + + + <th>Type</th> + + + + + + <th class="last">Description</th> + </tr> + </thead> + + <tbody> + + + <tr> + + <td class="name"><code>network</code></td> + + + <td class="type"> + + +<span class="param-type">string</span> + + + + </td> + + + + + + <td class="description last"><p>The name of the wireless network to lookup. This may be either an uci +configuration section ID, a network ID in the form <code>radio#.network#</code> +or a Linux network device name like <code>wlan0</code> which is resolved to the +corresponding configuration section through <code>ubus</code> runtime information.</p></td> + </tr> + + + </tbody> +</table> + + + + + + +<dl class="details"> + + + + + + + + + + + + + + + + + + + + + + + + + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="network.js.html">network.js</a>, <a href="network.js.html#line3180">line 3180</a> + </li></ul></dd> + + + + + + + +</dl> + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>Returns a promise resolving to a <code>Network.WifiNetwork</code> instance +representing the wireless network and rejecting with <code>null</code> if +the given network could not be found or is not associated with +this radio device.</p> +</div> + + + +<dl> + <dt> + Type + </dt> + <dd> + +<span class="param-type">Promise.<<a href="LuCI.Network.WifiNetwork.html">LuCI.Network.WifiNetwork</a>></span> + + + </dd> +</dl> + + + + + + + + + + + + + + <h4 class="name" id="getWifiNetworks"><span class="type-signature"></span>getWifiNetworks<span class="signature">()</span><span class="type-signature"> → {Promise.<Array.<<a href="LuCI.Network.WifiNetwork.html">LuCI.Network.WifiNetwork</a>>>}</span></h4> + + + + + + +<div class="description"> + <p>Get all wireless networks associated with this wireless radio device.</p> +</div> + + + + + + + + + + + + + +<dl class="details"> + + + + + + + + + + + + + + + + + + + + + + + + + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="network.js.html">network.js</a>, <a href="network.js.html#line3199">line 3199</a> + </li></ul></dd> + + + + + + + +</dl> + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>Returns a promise resolving to an array of <code>Network.WifiNetwork</code> +instances respresenting the wireless networks associated with this +radio device.</p> +</div> + + + +<dl> + <dt> + Type + </dt> + <dd> + +<span class="param-type">Promise.<Array.<<a href="LuCI.Network.WifiNetwork.html">LuCI.Network.WifiNetwork</a>>></span> + + + </dd> +</dl> + + + + + + + + + + + + + + <h4 class="name" id="isDisabled"><span class="type-signature"></span>isDisabled<span class="signature">()</span><span class="type-signature"> → {boolean}</span></h4> + + + + + + +<div class="description"> + <p>Checks whether this wireless radio is disabled.</p> +</div> + + + + + + + + + + + + + +<dl class="details"> + + + + + + + + + + + + + + + + + + + + + + + + + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="network.js.html">network.js</a>, <a href="network.js.html#line3023">line 3023</a> + </li></ul></dd> + + + + + + + +</dl> + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>Returns <code>true</code> when the wireless radio is marked as disabled in <code>ubus</code> +runtime state or when the <code>disabled</code> option is set in the corresponding +UCI configuration.</p> +</div> + + + +<dl> + <dt> + Type + </dt> + <dd> + +<span class="param-type">boolean</span> + + + </dd> +</dl> + + + + + + + + + + + + + + <h4 class="name" id="isUp"><span class="type-signature"></span>isUp<span class="signature">()</span><span class="type-signature"> → {boolean}</span></h4> + + + + + + +<div class="description"> + <p>Check whether the wireless radio is marked as up in the <code>ubus</code> +runtime state.</p> +</div> + + + + + + + + + + + + + +<dl class="details"> + + + + + + + + + + + + + + + + + + + + + + + + + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="network.js.html">network.js</a>, <a href="network.js.html#line3158">line 3158</a> + </li></ul></dd> + + + + + + + +</dl> + + + + + + + + + + + + + + + +<h5>Returns:</h5> + + +<div class="param-desc"> + <p>Returns <code>true</code> when the radio device is up, else <code>false</code>.</p> +</div> + + + +<dl> + <dt> + Type + </dt> + <dd> + +<span class="param-type">boolean</span> + + + </dd> +</dl> + + + + + + + + + + + + + + <h4 class="name" id="set"><span class="type-signature"></span>set<span class="signature">(opt, val)</span><span class="type-signature"></span></h4> + + + + + + +<div class="description"> + <p>Set the given UCI option of this network to the given value.</p> +</div> + + + + + + + + + + <h5>Parameters:</h5> + + +<table class="params"> + <thead> + <tr> + + <th>Name</th> + + + <th>Type</th> + + + + + + <th class="last">Description</th> + </tr> + </thead> + + <tbody> + + + <tr> + + <td class="name"><code>opt</code></td> + + + <td class="type"> + + +<span class="param-type">string</span> + + + + </td> + + + + + + <td class="description last"><p>The name of the UCI option to set.</p></td> + </tr> + + + + <tr> + + <td class="name"><code>val</code></td> + + + <td class="type"> + + +<span class="param-type">null</span> +| + +<span class="param-type">string</span> +| + +<span class="param-type">Array.<string></span> + + + + </td> + + + + + + <td class="description last"><p>The value to set or <code>null</code> to remove the given option from the +configuration.</p></td> + </tr> + + + </tbody> +</table> + + + + + + +<dl class="details"> + + + + + + + + + + + + + + + + + + + + + + + + + + + <dt class="tag-source">Source:</dt> + <dd class="tag-source"><ul class="dummy"><li> + <a href="network.js.html">network.js</a>, <a href="network.js.html#line3011">line 3011</a> + </li></ul></dd> + + + + + + + +</dl> + + + + + + + + + + + + + + + + + + + + + + + + + + +</article> + +</section> + + + + +</div> + +<nav> + <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="LuCI.html">LuCI</a></li><li><a href="LuCI.Class.html">Class</a></li><li><a href="LuCI.dom.html">dom</a></li><li><a href="LuCI.fs.html">fs</a></li><li><a href="LuCI.Headers.html">Headers</a></li><li><a href="LuCI.Network.html">Network</a></li><li><a href="LuCI.Network.Device.html">Device</a></li><li><a href="LuCI.Network.Hosts.html">Hosts</a></li><li><a href="LuCI.Network.Protocol.html">Protocol</a></li><li><a href="LuCI.Network.WifiDevice.html">WifiDevice</a></li><li><a href="LuCI.Network.WifiNetwork.html">WifiNetwork</a></li><li><a href="LuCI.Poll.html">Poll</a></li><li><a href="LuCI.Request.html">Request</a></li><li><a href="LuCI.Request.poll.html">poll</a></li><li><a href="LuCI.Response.html">Response</a></li><li><a href="LuCI.rpc.html">rpc</a></li><li><a href="LuCI.uci.html">uci</a></li><li><a href="LuCI.view.html">view</a></li><li><a href="LuCI.XHR.html">XHR</a></li></ul> +</nav> + +<br class="clear"> + +<footer> + Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.3</a> on Tue Nov 05 2019 09:33:05 GMT+0100 (Central European Standard Time) +</footer> + +<script> prettyPrint(); </script> +<script src="scripts/linenumber.js"> </script> +</body> +</html>
\ No newline at end of file |