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.protocol.html">luci.http.protocol</a>
46 <a href="../modules/luci.http.protocol.conditionals.html">luci.http.protocol.conditionals</a>
50 <a href="../modules/luci.http.protocol.date.html">luci.http.protocol.date</a>
54 <a href="../modules/luci.http.protocol.mime.html">luci.http.protocol.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.jsonc.html">luci.jsonc</a>
74 <a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</a>
78 <a href="../modules/luci.sys.init.html">luci.sys.init</a>
82 <a href="../modules/luci.sys.iptparser.html">luci.sys.iptparser</a>
86 <a href="../modules/luci.sys.net.html">luci.sys.net</a>
90 <a href="../modules/luci.sys.process.html">luci.sys.process</a>
94 <a href="../modules/luci.sys.user.html">luci.sys.user</a>
98 <a href="../modules/luci.sys.wifi.html">luci.sys.wifi</a>
102 <a href="../modules/nixio.html">nixio</a>
106 <a href="../modules/nixio.CHANGELOG.html">nixio.CHANGELOG</a>
110 <a href="../modules/nixio.CryptoHash.html">nixio.CryptoHash</a>
114 <a href="../modules/nixio.File.html">nixio.File</a>
118 <a href="../modules/nixio.README.html">nixio.README</a>
122 <a href="../modules/nixio.Socket.html">nixio.Socket</a>
126 <a href="../modules/nixio.TLSContext.html">nixio.TLSContext</a>
130 <a href="../modules/nixio.TLSSocket.html">nixio.TLSSocket</a>
134 <a href="../modules/nixio.UnifiedIO.html">nixio.UnifiedIO</a>
138 <a href="../modules/nixio.bin.html">nixio.bin</a>
141 <li><strong>nixio.bit</strong></li>
144 <a href="../modules/nixio.crypto.html">nixio.crypto</a>
148 <a href="../modules/nixio.fs.html">nixio.fs</a>
163 </div><!-- id="navigation" -->
167 <h1>Class <code>nixio.bit</code></h1>
170 Bitfield operators and mainpulation functions.
171 Can be used as a drop-in replacement for bitlib.</p>
180 <table class="function_list">
183 <td class="name" nowrap><a href="#arshift">arshift</a> (oper, shift)</td>
185 Arithmetically right shift a number.</td>
189 <td class="name" nowrap><a href="#band">band</a> (oper1, oper2, ...)</td>
191 Bitwise AND several numbers.</td>
195 <td class="name" nowrap><a href="#bnot">bnot</a> (oper)</td>
197 Invert given number.</td>
201 <td class="name" nowrap><a href="#bor">bor</a> (oper1, oper2, ...)</td>
203 Bitwise OR several numbers.</td>
207 <td class="name" nowrap><a href="#bxor">bxor</a> (oper1, oper2, ...)</td>
209 Bitwise XOR several numbers.</td>
213 <td class="name" nowrap><a href="#cast">cast</a> (oper)</td>
215 Cast a number to the bit-operating range.</td>
219 <td class="name" nowrap><a href="#check">check</a> (bitfield, flag1, ...)</td>
221 Checks whether given flags are set in a bitfield.</td>
225 <td class="name" nowrap><a href="#div">div</a> (oper1, oper2, ...)</td>
227 Integer division of 2 or more numbers.</td>
231 <td class="name" nowrap><a href="#lshift">lshift</a> (oper, shift)</td>
233 Left shift a number.</td>
237 <td class="name" nowrap><a href="#rshift">rshift</a> (oper, shift)</td>
239 Right shift a number.</td>
243 <td class="name" nowrap><a href="#set">set</a> (bitfield, flag1, ...)</td>
245 Sets one or more flags of a bitfield.</td>
249 <td class="name" nowrap><a href="#unset">unset</a> (bitfield, flag1, ...)</td>
251 Unsets one or more flags of a bitfield.</td>
265 <h2><a name="functions"></a>Functions</h2>
266 <dl class="function">
270 <dt><a name="arshift"></a><strong>arshift</strong> (oper, shift)</dt>
273 Arithmetically right shift a number.
294 <h3>Return value:</h3>
304 <dt><a name="band"></a><strong>band</strong> (oper1, oper2, ...)</dt>
307 Bitwise AND several numbers.
318 oper2: Second Operand
332 <h3>Return value:</h3>
342 <dt><a name="bnot"></a><strong>bnot</strong> (oper)</dt>
362 <h3>Return value:</h3>
372 <dt><a name="bor"></a><strong>bor</strong> (oper1, oper2, ...)</dt>
375 Bitwise OR several numbers.
386 oper2: Second Operand
400 <h3>Return value:</h3>
410 <dt><a name="bxor"></a><strong>bxor</strong> (oper1, oper2, ...)</dt>
413 Bitwise XOR several numbers.
424 oper2: Second Operand
438 <h3>Return value:</h3>
448 <dt><a name="cast"></a><strong>cast</strong> (oper)</dt>
451 Cast a number to the bit-operating range.
468 <h3>Return value:</h3>
478 <dt><a name="check"></a><strong>check</strong> (bitfield, flag1, ...)</dt>
481 Checks whether given flags are set in a bitfield.
506 <h3>Return value:</h3>
507 true when all flags are set, otherwise false
516 <dt><a name="div"></a><strong>div</strong> (oper1, oper2, ...)</dt>
519 Integer division of 2 or more numbers.
544 <h3>Return value:</h3>
554 <dt><a name="lshift"></a><strong>lshift</strong> (oper, shift)</dt>
578 <h3>Return value:</h3>
588 <dt><a name="rshift"></a><strong>rshift</strong> (oper, shift)</dt>
591 Right shift a number.
612 <h3>Return value:</h3>
622 <dt><a name="set"></a><strong>set</strong> (bitfield, flag1, ...)</dt>
625 Sets one or more flags of a bitfield.
650 <h3>Return value:</h3>
660 <dt><a name="unset"></a><strong>unset</strong> (bitfield, flag1, ...)</dt>
663 Unsets one or more flags of a bitfield.
688 <h3>Return value:</h3>
702 </div> <!-- id="content" -->
704 </div> <!-- id="main" -->
707 <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>
708 </div> <!-- id="about" -->
710 </div> <!-- id="container" -->