documentation: add JS api docs
[oweals/luci.git] / documentation / jsapi / LuCI.Network.WifiDevice.html
1 <!DOCTYPE html>
2 <html lang="en">
3 <head>
4     <meta charset="utf-8">
5     <title>JSDoc: Class: WifiDevice</title>
6
7     <script src="scripts/prettify/prettify.js"> </script>
8     <script src="scripts/prettify/lang-css.js"> </script>
9     <!--[if lt IE 9]>
10       <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
11     <![endif]-->
12     <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
13     <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
14 </head>
15
16 <body>
17
18 <div id="main">
19
20     <h1 class="page-title">Class: WifiDevice</h1>
21
22     
23
24
25
26
27 <section>
28
29 <header>
30     
31         <h2><span class="attribs"><span class="type-signature"></span></span>
32             <span class="ancestors"><a href="LuCI.html">LuCI</a><a href="LuCI.Network.html">.Network</a>.</span>WifiDevice</h2>
33         
34             <div class="class-description"><p>A <code>Network.WifiDevice</code> class instance represents a wireless radio device
35 present on the system and provides wireless capability information as
36 well as methods for enumerating related wireless networks.</p></div>
37         
38     
39 </header>
40
41 <article>
42     <div class="container-overview">
43     
44         
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60 <dl class="details">
61
62     
63
64     
65
66     
67
68     
69
70     
71
72     
73
74     
75
76     
77
78     
79
80     
81
82     
83
84     
85
86     
87     <dt class="tag-source">Source:</dt>
88     <dd class="tag-source"><ul class="dummy"><li>
89         <a href="network.js.html">network.js</a>, <a href="network.js.html#line2957">line 2957</a>
90     </li></ul></dd>
91     
92
93     
94
95     
96
97     
98 </dl>
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119     
120     </div>
121
122     
123
124     
125
126     
127
128     
129
130     
131
132     
133
134     
135
136     
137         <h3 class="subsection-title">Methods</h3>
138
139         
140             
141
142     
143
144     
145     <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"> &rarr; {Promise.&lt;(null|<a href="LuCI.Network.WifiNetwork.html">LuCI.Network.WifiNetwork</a>)>}</span></h4>
146     
147
148     
149
150
151
152 <div class="description">
153     <p>Adds a new wireless network associated with this radio device to the
154 configuration and sets its options to the provided values.</p>
155 </div>
156
157
158
159
160
161
162
163
164
165     <h5>Parameters:</h5>
166     
167
168 <table class="params">
169     <thead>
170     <tr>
171         
172         <th>Name</th>
173         
174
175         <th>Type</th>
176
177         
178         <th>Attributes</th>
179         
180
181         
182
183         <th class="last">Description</th>
184     </tr>
185     </thead>
186
187     <tbody>
188     
189
190         <tr>
191             
192                 <td class="name"><code>options</code></td>
193             
194
195             <td class="type">
196             
197                 
198 <span class="param-type">Object.&lt;string, (string|Array.&lt;string>)></span>
199
200
201             
202             </td>
203
204             
205                 <td class="attributes">
206                 
207                     &lt;optional><br>
208                 
209
210                 
211
212                 
213                 </td>
214             
215
216             
217
218             <td class="description last"><p>The options to set for the newly added wireless network.</p></td>
219         </tr>
220
221     
222     </tbody>
223 </table>
224
225
226
227
228
229
230 <dl class="details">
231
232     
233
234     
235
236     
237
238     
239
240     
241
242     
243
244     
245
246     
247
248     
249
250     
251
252     
253
254     
255
256     
257     <dt class="tag-source">Source:</dt>
258     <dd class="tag-source"><ul class="dummy"><li>
259         <a href="network.js.html">network.js</a>, <a href="network.js.html#line3222">line 3222</a>
260     </li></ul></dd>
261     
262
263     
264
265     
266
267     
268 </dl>
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284 <h5>Returns:</h5>
285
286         
287 <div class="param-desc">
288     <p>Returns a promise resolving to a <code>WifiNetwork</code> instance describing
289 the newly added wireless network or <code>null</code> if the given options
290 were invalid.</p>
291 </div>
292
293
294
295 <dl>
296     <dt>
297         Type
298     </dt>
299     <dd>
300         
301 <span class="param-type">Promise.&lt;(null|<a href="LuCI.Network.WifiNetwork.html">LuCI.Network.WifiNetwork</a>)></span>
302
303
304     </dd>
305 </dl>
306
307     
308
309
310
311
312
313         
314             
315
316     
317
318     
319     <h4 class="name" id="deleteWifiNetwork"><span class="type-signature"></span>deleteWifiNetwork<span class="signature">(network)</span><span class="type-signature"> &rarr; {Promise.&lt;boolean>}</span></h4>
320     
321
322     
323
324
325
326 <div class="description">
327     <p>Deletes the wireless network with the given name associated with this
328 radio device.</p>
329 </div>
330
331
332
333
334
335
336
337
338
339     <h5>Parameters:</h5>
340     
341
342 <table class="params">
343     <thead>
344     <tr>
345         
346         <th>Name</th>
347         
348
349         <th>Type</th>
350
351         
352
353         
354
355         <th class="last">Description</th>
356     </tr>
357     </thead>
358
359     <tbody>
360     
361
362         <tr>
363             
364                 <td class="name"><code>network</code></td>
365             
366
367             <td class="type">
368             
369                 
370 <span class="param-type">string</span>
371
372
373             
374             </td>
375
376             
377
378             
379
380             <td class="description last"><p>The name of the wireless network to lookup. This may be either an uci
381 configuration section ID, a network ID in the form <code>radio#.network#</code>
382 or a Linux network device name like <code>wlan0</code> which is resolved to the
383 corresponding configuration section through <code>ubus</code> runtime information.</p></td>
384         </tr>
385
386     
387     </tbody>
388 </table>
389
390
391
392
393
394
395 <dl class="details">
396
397     
398
399     
400
401     
402
403     
404
405     
406
407     
408
409     
410
411     
412
413     
414
415     
416
417     
418
419     
420
421     
422     <dt class="tag-source">Source:</dt>
423     <dd class="tag-source"><ul class="dummy"><li>
424         <a href="network.js.html">network.js</a>, <a href="network.js.html#line3247">line 3247</a>
425     </li></ul></dd>
426     
427
428     
429
430     
431
432     
433 </dl>
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449 <h5>Returns:</h5>
450
451         
452 <div class="param-desc">
453     <p>Returns a promise resolving to <code>true</code> when the wireless network was
454 successfully deleted from the configuration or <code>false</code> when the given
455 network could not be found or if the found network was not associated
456 with this wireless radio device.</p>
457 </div>
458
459
460
461 <dl>
462     <dt>
463         Type
464     </dt>
465     <dd>
466         
467 <span class="param-type">Promise.&lt;boolean></span>
468
469
470     </dd>
471 </dl>
472
473     
474
475
476
477
478
479         
480             
481
482     
483
484     
485     <h4 class="name" id="get"><span class="type-signature"></span>get<span class="signature">(opt)</span><span class="type-signature"> &rarr; {null|string|Array.&lt;string>}</span></h4>
486     
487
488     
489
490
491
492 <div class="description">
493     <p>Read the given UCI option value of this wireless device.</p>
494 </div>
495
496
497
498
499
500
501
502
503
504     <h5>Parameters:</h5>
505     
506
507 <table class="params">
508     <thead>
509     <tr>
510         
511         <th>Name</th>
512         
513
514         <th>Type</th>
515
516         
517
518         
519
520         <th class="last">Description</th>
521     </tr>
522     </thead>
523
524     <tbody>
525     
526
527         <tr>
528             
529                 <td class="name"><code>opt</code></td>
530             
531
532             <td class="type">
533             
534                 
535 <span class="param-type">string</span>
536
537
538             
539             </td>
540
541             
542
543             
544
545             <td class="description last"><p>The UCI option name to read.</p></td>
546         </tr>
547
548     
549     </tbody>
550 </table>
551
552
553
554
555
556
557 <dl class="details">
558
559     
560
561     
562
563     
564
565     
566
567     
568
569     
570
571     
572
573     
574
575     
576
577     
578
579     
580
581     
582
583     
584     <dt class="tag-source">Source:</dt>
585     <dd class="tag-source"><ul class="dummy"><li>
586         <a href="network.js.html">network.js</a>, <a href="network.js.html#line2997">line 2997</a>
587     </li></ul></dd>
588     
589
590     
591
592     
593
594     
595 </dl>
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611 <h5>Returns:</h5>
612
613         
614 <div class="param-desc">
615     <p>Returns the UCI option value or <code>null</code> if the requested option is
616 not found.</p>
617 </div>
618
619
620
621 <dl>
622     <dt>
623         Type
624     </dt>
625     <dd>
626         
627 <span class="param-type">null</span>
628 |
629
630 <span class="param-type">string</span>
631 |
632
633 <span class="param-type">Array.&lt;string></span>
634
635
636     </dd>
637 </dl>
638
639     
640
641
642
643
644
645         
646             
647
648     
649
650     
651     <h4 class="name" id="getHTModes"><span class="type-signature"></span>getHTModes<span class="signature">()</span><span class="type-signature"> &rarr; {Array.&lt;string>}</span></h4>
652     
653
654     
655
656
657
658 <div class="description">
659     <p>Gets a list of supported htmodes.</p>
660 <p>The htmode values describe the wide-frequency options supported by
661 the wireless phy.</p>
662 </div>
663
664
665
666
667
668
669
670
671
672
673
674
675
676 <dl class="details">
677
678     
679
680     
681
682     
683
684     
685
686     
687
688     
689
690     
691
692     
693
694     
695
696     
697
698     
699
700     
701
702     
703     <dt class="tag-source">Source:</dt>
704     <dd class="tag-source"><ul class="dummy"><li>
705         <a href="network.js.html">network.js</a>, <a href="network.js.html#line3075">line 3075</a>
706     </li></ul></dd>
707     
708
709     
710
711     
712
713     
714 </dl>
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730 <h5>Returns:</h5>
731
732         
733 <div class="param-desc">
734     <p>Returns an array of valid htmode values for this radio. Currently
735 known mode values are:</p>
736 <ul>
737 <li><code>HT20</code> - applicable to IEEE 802.11n, 20 MHz wide channels</li>
738 <li><code>HT40</code> - applicable to IEEE 802.11n, 40 MHz wide channels</li>
739 <li><code>VHT20</code> - applicable to IEEE 802.11ac, 20 MHz wide channels</li>
740 <li><code>VHT40</code> - applicable to IEEE 802.11ac, 40 MHz wide channels</li>
741 <li><code>VHT80</code> - applicable to IEEE 802.11ac, 80 MHz wide channels</li>
742 <li><code>VHT160</code> - applicable to IEEE 802.11ac, 160 MHz wide channels</li>
743 </ul>
744 </div>
745
746
747
748 <dl>
749     <dt>
750         Type
751     </dt>
752     <dd>
753         
754 <span class="param-type">Array.&lt;string></span>
755
756
757     </dd>
758 </dl>
759
760     
761
762
763
764
765
766         
767             
768
769     
770
771     
772     <h4 class="name" id="getHWModes"><span class="type-signature"></span>getHWModes<span class="signature">()</span><span class="type-signature"> &rarr; {Array.&lt;string>}</span></h4>
773     
774
775     
776
777
778
779 <div class="description">
780     <p>Gets a list of supported hwmodes.</p>
781 <p>The hwmode values describe the frequency band and wireless standard
782 versions supported by the wireless phy.</p>
783 </div>
784
785
786
787
788
789
790
791
792
793
794
795
796
797 <dl class="details">
798
799     
800
801     
802
803     
804
805     
806
807     
808
809     
810
811     
812
813     
814
815     
816
817     
818
819     
820
821     
822
823     
824     <dt class="tag-source">Source:</dt>
825     <dd class="tag-source"><ul class="dummy"><li>
826         <a href="network.js.html">network.js</a>, <a href="network.js.html#line3054">line 3054</a>
827     </li></ul></dd>
828     
829
830     
831
832     
833
834     
835 </dl>
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851 <h5>Returns:</h5>
852
853         
854 <div class="param-desc">
855     <p>Returns an array of valid hwmode values for this radio. Currently
856 known mode values are:</p>
857 <ul>
858 <li><code>a</code> - Legacy 802.11a mode, 5 GHz, up to 54 Mbit/s</li>
859 <li><code>b</code> - Legacy 802.11b mode, 2.4 GHz, up to 11 Mbit/s</li>
860 <li><code>g</code> - Legacy 802.11g mode, 2.4 GHz, up to 54 Mbit/s</li>
861 <li><code>n</code> - IEEE 802.11n mode, 2.4 or 5 GHz, up to 600 Mbit/s</li>
862 <li><code>ac</code> - IEEE 802.11ac mode, 5 GHz, up to 6770 Mbit/s</li>
863 </ul>
864 </div>
865
866
867
868 <dl>
869     <dt>
870         Type
871     </dt>
872     <dd>
873         
874 <span class="param-type">Array.&lt;string></span>
875
876
877     </dd>
878 </dl>
879
880     
881
882
883
884
885
886         
887             
888
889     
890
891     
892     <h4 class="name" id="getI18n"><span class="type-signature"></span>getI18n<span class="signature">()</span><span class="type-signature"> &rarr; {string}</span></h4>
893     
894
895     
896
897
898
899 <div class="description">
900     <p>Get a string describing the wireless radio hardware.</p>
901 </div>
902
903
904
905
906
907
908
909
910
911
912
913
914
915 <dl class="details">
916
917     
918
919     
920
921     
922
923     
924
925     
926
927     
928
929     
930
931     
932
933     
934
935     
936
937     
938
939     
940
941     
942     <dt class="tag-source">Source:</dt>
943     <dd class="tag-source"><ul class="dummy"><li>
944         <a href="network.js.html">network.js</a>, <a href="network.js.html#line3086">line 3086</a>
945     </li></ul></dd>
946     
947
948     
949
950     
951
952     
953 </dl>
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969 <h5>Returns:</h5>
970
971         
972 <div class="param-desc">
973     <p>Returns the description string.</p>
974 </div>
975
976
977
978 <dl>
979     <dt>
980         Type
981     </dt>
982     <dd>
983         
984 <span class="param-type">string</span>
985
986
987     </dd>
988 </dl>
989
990     
991
992
993
994
995
996         
997             
998
999     
1000
1001     
1002     <h4 class="name" id="getName"><span class="type-signature"></span>getName<span class="signature">()</span><span class="type-signature"> &rarr; {string}</span></h4>
1003     
1004
1005     
1006
1007
1008
1009 <div class="description">
1010     <p>Get the configuration name of this wireless radio.</p>
1011 </div>
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025 <dl class="details">
1026
1027     
1028
1029     
1030
1031     
1032
1033     
1034
1035     
1036
1037     
1038
1039     
1040
1041     
1042
1043     
1044
1045     
1046
1047     
1048
1049     
1050
1051     
1052     <dt class="tag-source">Source:</dt>
1053     <dd class="tag-source"><ul class="dummy"><li>
1054         <a href="network.js.html">network.js</a>, <a href="network.js.html#line3035">line 3035</a>
1055     </li></ul></dd>
1056     
1057
1058     
1059
1060     
1061
1062     
1063 </dl>
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079 <h5>Returns:</h5>
1080
1081         
1082 <div class="param-desc">
1083     <p>Returns the UCI section name (e.g. <code>radio0</code>) of the corresponding
1084 radio configuration which also serves as unique logical identifier
1085 for the wireless phy.</p>
1086 </div>
1087
1088
1089
1090 <dl>
1091     <dt>
1092         Type
1093     </dt>
1094     <dd>
1095         
1096 <span class="param-type">string</span>
1097
1098
1099     </dd>
1100 </dl>
1101
1102     
1103
1104
1105
1106
1107
1108         
1109             
1110
1111     
1112
1113     
1114     <h4 class="name" id="getScanList"><span class="type-signature"></span>getScanList<span class="signature">()</span><span class="type-signature"> &rarr; {Promise.&lt;Array.&lt;<a href="LuCI.Network.html#.WifiScanResult">LuCI.Network.WifiScanResult</a>>>}</span></h4>
1115     
1116
1117     
1118
1119
1120
1121 <div class="description">
1122     <p>Trigger a wireless scan on this radio device and obtain a list of
1123 nearby networks.</p>
1124 </div>
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138 <dl class="details">
1139
1140     
1141
1142     
1143
1144     
1145
1146     
1147
1148     
1149
1150     
1151
1152     
1153
1154     
1155
1156     
1157
1158     
1159
1160     
1161
1162     
1163
1164     
1165     <dt class="tag-source">Source:</dt>
1166     <dd class="tag-source"><ul class="dummy"><li>
1167         <a href="network.js.html">network.js</a>, <a href="network.js.html#line3147">line 3147</a>
1168     </li></ul></dd>
1169     
1170
1171     
1172
1173     
1174
1175     
1176 </dl>
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192 <h5>Returns:</h5>
1193
1194         
1195 <div class="param-desc">
1196     <p>Returns a promise resolving to an array of scan result objects
1197 describing the networks found in the vincinity.</p>
1198 </div>
1199
1200
1201
1202 <dl>
1203     <dt>
1204         Type
1205     </dt>
1206     <dd>
1207         
1208 <span class="param-type">Promise.&lt;Array.&lt;<a href="LuCI.Network.html#.WifiScanResult">LuCI.Network.WifiScanResult</a>>></span>
1209
1210
1211     </dd>
1212 </dl>
1213
1214     
1215
1216
1217
1218
1219
1220         
1221             
1222
1223     
1224
1225     
1226     <h4 class="name" id="getWifiNetwork"><span class="type-signature"></span>getWifiNetwork<span class="signature">(network)</span><span class="type-signature"> &rarr; {Promise.&lt;<a href="LuCI.Network.WifiNetwork.html">LuCI.Network.WifiNetwork</a>>}</span></h4>
1227     
1228
1229     
1230
1231
1232
1233 <div class="description">
1234     <p>Get the wifi network of the given name belonging to this radio device</p>
1235 </div>
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245     <h5>Parameters:</h5>
1246     
1247
1248 <table class="params">
1249     <thead>
1250     <tr>
1251         
1252         <th>Name</th>
1253         
1254
1255         <th>Type</th>
1256
1257         
1258
1259         
1260
1261         <th class="last">Description</th>
1262     </tr>
1263     </thead>
1264
1265     <tbody>
1266     
1267
1268         <tr>
1269             
1270                 <td class="name"><code>network</code></td>
1271             
1272
1273             <td class="type">
1274             
1275                 
1276 <span class="param-type">string</span>
1277
1278
1279             
1280             </td>
1281
1282             
1283
1284             
1285
1286             <td class="description last"><p>The name of the wireless network to lookup. This may be either an uci
1287 configuration section ID, a network ID in the form <code>radio#.network#</code>
1288 or a Linux network device name like <code>wlan0</code> which is resolved to the
1289 corresponding configuration section through <code>ubus</code> runtime information.</p></td>
1290         </tr>
1291
1292     
1293     </tbody>
1294 </table>
1295
1296
1297
1298
1299
1300
1301 <dl class="details">
1302
1303     
1304
1305     
1306
1307     
1308
1309     
1310
1311     
1312
1313     
1314
1315     
1316
1317     
1318
1319     
1320
1321     
1322
1323     
1324
1325     
1326
1327     
1328     <dt class="tag-source">Source:</dt>
1329     <dd class="tag-source"><ul class="dummy"><li>
1330         <a href="network.js.html">network.js</a>, <a href="network.js.html#line3180">line 3180</a>
1331     </li></ul></dd>
1332     
1333
1334     
1335
1336     
1337
1338     
1339 </dl>
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355 <h5>Returns:</h5>
1356
1357         
1358 <div class="param-desc">
1359     <p>Returns a promise resolving to a <code>Network.WifiNetwork</code> instance
1360 representing the wireless network and rejecting with <code>null</code> if
1361 the given network could not be found or is not associated with
1362 this radio device.</p>
1363 </div>
1364
1365
1366
1367 <dl>
1368     <dt>
1369         Type
1370     </dt>
1371     <dd>
1372         
1373 <span class="param-type">Promise.&lt;<a href="LuCI.Network.WifiNetwork.html">LuCI.Network.WifiNetwork</a>></span>
1374
1375
1376     </dd>
1377 </dl>
1378
1379     
1380
1381
1382
1383
1384
1385         
1386             
1387
1388     
1389
1390     
1391     <h4 class="name" id="getWifiNetworks"><span class="type-signature"></span>getWifiNetworks<span class="signature">()</span><span class="type-signature"> &rarr; {Promise.&lt;Array.&lt;<a href="LuCI.Network.WifiNetwork.html">LuCI.Network.WifiNetwork</a>>>}</span></h4>
1392     
1393
1394     
1395
1396
1397
1398 <div class="description">
1399     <p>Get all wireless networks associated with this wireless radio device.</p>
1400 </div>
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414 <dl class="details">
1415
1416     
1417
1418     
1419
1420     
1421
1422     
1423
1424     
1425
1426     
1427
1428     
1429
1430     
1431
1432     
1433
1434     
1435
1436     
1437
1438     
1439
1440     
1441     <dt class="tag-source">Source:</dt>
1442     <dd class="tag-source"><ul class="dummy"><li>
1443         <a href="network.js.html">network.js</a>, <a href="network.js.html#line3199">line 3199</a>
1444     </li></ul></dd>
1445     
1446
1447     
1448
1449     
1450
1451     
1452 </dl>
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468 <h5>Returns:</h5>
1469
1470         
1471 <div class="param-desc">
1472     <p>Returns a promise resolving to an array of <code>Network.WifiNetwork</code>
1473 instances respresenting the wireless networks associated with this
1474 radio device.</p>
1475 </div>
1476
1477
1478
1479 <dl>
1480     <dt>
1481         Type
1482     </dt>
1483     <dd>
1484         
1485 <span class="param-type">Promise.&lt;Array.&lt;<a href="LuCI.Network.WifiNetwork.html">LuCI.Network.WifiNetwork</a>>></span>
1486
1487
1488     </dd>
1489 </dl>
1490
1491     
1492
1493
1494
1495
1496
1497         
1498             
1499
1500     
1501
1502     
1503     <h4 class="name" id="isDisabled"><span class="type-signature"></span>isDisabled<span class="signature">()</span><span class="type-signature"> &rarr; {boolean}</span></h4>
1504     
1505
1506     
1507
1508
1509
1510 <div class="description">
1511     <p>Checks whether this wireless radio is disabled.</p>
1512 </div>
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526 <dl class="details">
1527
1528     
1529
1530     
1531
1532     
1533
1534     
1535
1536     
1537
1538     
1539
1540     
1541
1542     
1543
1544     
1545
1546     
1547
1548     
1549
1550     
1551
1552     
1553     <dt class="tag-source">Source:</dt>
1554     <dd class="tag-source"><ul class="dummy"><li>
1555         <a href="network.js.html">network.js</a>, <a href="network.js.html#line3023">line 3023</a>
1556     </li></ul></dd>
1557     
1558
1559     
1560
1561     
1562
1563     
1564 </dl>
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580 <h5>Returns:</h5>
1581
1582         
1583 <div class="param-desc">
1584     <p>Returns <code>true</code> when the wireless radio is marked as disabled in <code>ubus</code>
1585 runtime state or when the <code>disabled</code> option is set in the corresponding
1586 UCI configuration.</p>
1587 </div>
1588
1589
1590
1591 <dl>
1592     <dt>
1593         Type
1594     </dt>
1595     <dd>
1596         
1597 <span class="param-type">boolean</span>
1598
1599
1600     </dd>
1601 </dl>
1602
1603     
1604
1605
1606
1607
1608
1609         
1610             
1611
1612     
1613
1614     
1615     <h4 class="name" id="isUp"><span class="type-signature"></span>isUp<span class="signature">()</span><span class="type-signature"> &rarr; {boolean}</span></h4>
1616     
1617
1618     
1619
1620
1621
1622 <div class="description">
1623     <p>Check whether the wireless radio is marked as up in the <code>ubus</code>
1624 runtime state.</p>
1625 </div>
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639 <dl class="details">
1640
1641     
1642
1643     
1644
1645     
1646
1647     
1648
1649     
1650
1651     
1652
1653     
1654
1655     
1656
1657     
1658
1659     
1660
1661     
1662
1663     
1664
1665     
1666     <dt class="tag-source">Source:</dt>
1667     <dd class="tag-source"><ul class="dummy"><li>
1668         <a href="network.js.html">network.js</a>, <a href="network.js.html#line3158">line 3158</a>
1669     </li></ul></dd>
1670     
1671
1672     
1673
1674     
1675
1676     
1677 </dl>
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693 <h5>Returns:</h5>
1694
1695         
1696 <div class="param-desc">
1697     <p>Returns <code>true</code> when the radio device is up, else <code>false</code>.</p>
1698 </div>
1699
1700
1701
1702 <dl>
1703     <dt>
1704         Type
1705     </dt>
1706     <dd>
1707         
1708 <span class="param-type">boolean</span>
1709
1710
1711     </dd>
1712 </dl>
1713
1714     
1715
1716
1717
1718
1719
1720         
1721             
1722
1723     
1724
1725     
1726     <h4 class="name" id="set"><span class="type-signature"></span>set<span class="signature">(opt, val)</span><span class="type-signature"></span></h4>
1727     
1728
1729     
1730
1731
1732
1733 <div class="description">
1734     <p>Set the given UCI option of this network to the given value.</p>
1735 </div>
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745     <h5>Parameters:</h5>
1746     
1747
1748 <table class="params">
1749     <thead>
1750     <tr>
1751         
1752         <th>Name</th>
1753         
1754
1755         <th>Type</th>
1756
1757         
1758
1759         
1760
1761         <th class="last">Description</th>
1762     </tr>
1763     </thead>
1764
1765     <tbody>
1766     
1767
1768         <tr>
1769             
1770                 <td class="name"><code>opt</code></td>
1771             
1772
1773             <td class="type">
1774             
1775                 
1776 <span class="param-type">string</span>
1777
1778
1779             
1780             </td>
1781
1782             
1783
1784             
1785
1786             <td class="description last"><p>The name of the UCI option to set.</p></td>
1787         </tr>
1788
1789     
1790
1791         <tr>
1792             
1793                 <td class="name"><code>val</code></td>
1794             
1795
1796             <td class="type">
1797             
1798                 
1799 <span class="param-type">null</span>
1800 |
1801
1802 <span class="param-type">string</span>
1803 |
1804
1805 <span class="param-type">Array.&lt;string></span>
1806
1807
1808             
1809             </td>
1810
1811             
1812
1813             
1814
1815             <td class="description last"><p>The value to set or <code>null</code> to remove the given option from the
1816 configuration.</p></td>
1817         </tr>
1818
1819     
1820     </tbody>
1821 </table>
1822
1823
1824
1825
1826
1827
1828 <dl class="details">
1829
1830     
1831
1832     
1833
1834     
1835
1836     
1837
1838     
1839
1840     
1841
1842     
1843
1844     
1845
1846     
1847
1848     
1849
1850     
1851
1852     
1853
1854     
1855     <dt class="tag-source">Source:</dt>
1856     <dd class="tag-source"><ul class="dummy"><li>
1857         <a href="network.js.html">network.js</a>, <a href="network.js.html#line3011">line 3011</a>
1858     </li></ul></dd>
1859     
1860
1861     
1862
1863     
1864
1865     
1866 </dl>
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887         
1888     
1889
1890     
1891
1892     
1893 </article>
1894
1895 </section>
1896
1897
1898
1899
1900 </div>
1901
1902 <nav>
1903     <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>
1904 </nav>
1905
1906 <br class="clear">
1907
1908 <footer>
1909     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)
1910 </footer>
1911
1912 <script> prettyPrint(); </script>
1913 <script src="scripts/linenumber.js"> </script>
1914 </body>
1915 </html>