1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
5 <title>Reference</title>
6 <link rel="stylesheet" href="../luadoc.css" type="text/css" />
7 <!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/-->
14 <div id="product_logo"></div>
15 <div id="product_name"><big><b></b></big></div>
16 <div id="product_description"></div>
17 </div> <!-- id="product" -->
27 <li><a href="../index.html">Index</a></li>
38 <a href="../modules/luci.dispatcher.html">luci.dispatcher</a>
42 <a href="../modules/luci.http.html">luci.http</a>
46 <a href="../modules/luci.http.conditionals.html">luci.http.conditionals</a>
50 <a href="../modules/luci.http.date.html">luci.http.date</a>
54 <a href="../modules/luci.http.mime.html">luci.http.mime</a>
58 <a href="../modules/luci.i18n.html">luci.i18n</a>
62 <a href="../modules/luci.ip.html">luci.ip</a>
66 <a href="../modules/luci.ip.cidr.html">luci.ip.cidr</a>
70 <a href="../modules/luci.json.html">luci.json</a>
74 <a href="../modules/luci.jsonc.html">luci.jsonc</a>
78 <a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</a>
82 <a href="../modules/luci.model.ipkg.html">luci.model.ipkg</a>
86 <a href="../modules/luci.model.uci.html">luci.model.uci</a>
90 <a href="../modules/luci.rpcc.html">luci.rpcc</a>
94 <a href="../modules/luci.rpcc.ruci.html">luci.rpcc.ruci</a>
98 <a href="../modules/luci.sys.html">luci.sys</a>
102 <a href="../modules/luci.sys.init.html">luci.sys.init</a>
106 <a href="../modules/luci.sys.iptparser.html">luci.sys.iptparser</a>
110 <a href="../modules/luci.sys.net.html">luci.sys.net</a>
114 <a href="../modules/luci.sys.process.html">luci.sys.process</a>
118 <a href="../modules/luci.sys.user.html">luci.sys.user</a>
122 <a href="../modules/luci.sys.wifi.html">luci.sys.wifi</a>
126 <a href="../modules/luci.util.html">luci.util</a>
130 <a href="../modules/nixio.html">nixio</a>
134 <a href="../modules/nixio.CHANGELOG.html">nixio.CHANGELOG</a>
138 <a href="../modules/nixio.CryptoHash.html">nixio.CryptoHash</a>
142 <a href="../modules/nixio.File.html">nixio.File</a>
146 <a href="../modules/nixio.README.html">nixio.README</a>
150 <a href="../modules/nixio.Socket.html">nixio.Socket</a>
154 <a href="../modules/nixio.TLSContext.html">nixio.TLSContext</a>
158 <a href="../modules/nixio.TLSSocket.html">nixio.TLSSocket</a>
162 <a href="../modules/nixio.UnifiedIO.html">nixio.UnifiedIO</a>
166 <a href="../modules/nixio.bin.html">nixio.bin</a>
169 <li><strong>nixio.bit</strong></li>
172 <a href="../modules/nixio.crypto.html">nixio.crypto</a>
176 <a href="../modules/nixio.fs.html">nixio.fs</a>
191 </div><!-- id="navigation" -->
195 <h1>Class <code>nixio.bit</code></h1>
198 Bitfield operators and mainpulation functions.
199 Can be used as a drop-in replacement for bitlib.</p>
208 <table class="function_list">
211 <td class="name" nowrap><a href="#arshift">arshift</a> (oper, shift)</td>
213 Arithmetically right shift a number.</td>
217 <td class="name" nowrap><a href="#band">band</a> (oper1, oper2, ...)</td>
219 Bitwise AND several numbers.</td>
223 <td class="name" nowrap><a href="#bnot">bnot</a> (oper)</td>
225 Invert given number.</td>
229 <td class="name" nowrap><a href="#bor">bor</a> (oper1, oper2, ...)</td>
231 Bitwise OR several numbers.</td>
235 <td class="name" nowrap><a href="#bxor">bxor</a> (oper1, oper2, ...)</td>
237 Bitwise XOR several numbers.</td>
241 <td class="name" nowrap><a href="#cast">cast</a> (oper)</td>
243 Cast a number to the bit-operating range.</td>
247 <td class="name" nowrap><a href="#check">check</a> (bitfield, flag1, ...)</td>
249 Checks whether given flags are set in a bitfield.</td>
253 <td class="name" nowrap><a href="#div">div</a> (oper1, oper2, ...)</td>
255 Integer division of 2 or more numbers.</td>
259 <td class="name" nowrap><a href="#lshift">lshift</a> (oper, shift)</td>
261 Left shift a number.</td>
265 <td class="name" nowrap><a href="#rshift">rshift</a> (oper, shift)</td>
267 Right shift a number.</td>
271 <td class="name" nowrap><a href="#set">set</a> (bitfield, flag1, ...)</td>
273 Sets one or more flags of a bitfield.</td>
277 <td class="name" nowrap><a href="#unset">unset</a> (bitfield, flag1, ...)</td>
279 Unsets one or more flags of a bitfield.</td>
293 <h2><a name="functions"></a>Functions</h2>
294 <dl class="function">
298 <dt><a name="arshift"></a><strong>arshift</strong> (oper, shift)</dt>
301 Arithmetically right shift a number.
322 <h3>Return value:</h3>
332 <dt><a name="band"></a><strong>band</strong> (oper1, oper2, ...)</dt>
335 Bitwise AND several numbers.
346 oper2: Second Operand
360 <h3>Return value:</h3>
370 <dt><a name="bnot"></a><strong>bnot</strong> (oper)</dt>
390 <h3>Return value:</h3>
400 <dt><a name="bor"></a><strong>bor</strong> (oper1, oper2, ...)</dt>
403 Bitwise OR several numbers.
414 oper2: Second Operand
428 <h3>Return value:</h3>
438 <dt><a name="bxor"></a><strong>bxor</strong> (oper1, oper2, ...)</dt>
441 Bitwise XOR several numbers.
452 oper2: Second Operand
466 <h3>Return value:</h3>
476 <dt><a name="cast"></a><strong>cast</strong> (oper)</dt>
479 Cast a number to the bit-operating range.
496 <h3>Return value:</h3>
506 <dt><a name="check"></a><strong>check</strong> (bitfield, flag1, ...)</dt>
509 Checks whether given flags are set in a bitfield.
534 <h3>Return value:</h3>
535 true when all flags are set, otherwise false
544 <dt><a name="div"></a><strong>div</strong> (oper1, oper2, ...)</dt>
547 Integer division of 2 or more numbers.
572 <h3>Return value:</h3>
582 <dt><a name="lshift"></a><strong>lshift</strong> (oper, shift)</dt>
606 <h3>Return value:</h3>
616 <dt><a name="rshift"></a><strong>rshift</strong> (oper, shift)</dt>
619 Right shift a number.
640 <h3>Return value:</h3>
650 <dt><a name="set"></a><strong>set</strong> (bitfield, flag1, ...)</dt>
653 Sets one or more flags of a bitfield.
678 <h3>Return value:</h3>
688 <dt><a name="unset"></a><strong>unset</strong> (bitfield, flag1, ...)</dt>
691 Unsets one or more flags of a bitfield.
716 <h3>Return value:</h3>
730 </div> <!-- id="content" -->
732 </div> <!-- id="main" -->
735 <p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p>
736 </div> <!-- id="about" -->
738 </div> <!-- id="container" -->