📄 tos.interfaces.random.nc.html
字号:
<html><head><title>Interface: Random</title></head><body><table BORDER="0" CELLPADDING="3" CELLSPACING="0" width="100%"><tr><td><font size="-1"><b><font color="blue"><a href="apps_p.html">Apps</a></font></b> <b><a href="components_p.html">Components</a></b> <b><a href="interfaces_p.html">Interfaces</a></b> <b><a href="allfiles_p.html">All Files</a></b> <b><a href="index.html">Source Tree</a></b> </font></td><td align="right"><font size="-1">source: <b><a href="tos.interfaces.Random.nc.source">tos.interfaces.Random.nc</a></b></font></td></tr></table><hr><h1 align="center">Interface: Random</h1><p> This is the interface to a simple pseudorandom number generator. Currently this interface is implemented by the RandomLFSR, which uses a linear feedback shift register to generate the sequence and mote address to initialize the register. <table border="0" cellpadding="0"><tr valign="top"><td><b>Author:</b><td> Jason Hill </td></tr><tr valign="top"><td> </td><td> David Gay </td></tr><tr valign="top"><td> </td><td> Philip Levis </td></tr><tr valign="top"><td> </td><td> Alec Woo </td></tr><tr valign="top"><td><b>Modified:</b><td> 6/25/02</td></tr></table><p><dl><dt>Components providing this interface:<dd> <a href="tos.system.RandomLFSR.nc.html">tos.system.RandomLFSR</a><br></dl><p><dl><dt>Components requiring this interface:<dd> <a href="apps.last.MultihopM.nc.html">apps.last.MultihopM</a><br> <a href="apps.last.TopologyM.nc.html">apps.last.TopologyM</a><br> <a href="apps.newtopo.MultihopM.nc.html">apps.newtopo.MultihopM</a><br> <a href="apps.newtopo.TopologyM.nc.html">apps.newtopo.TopologyM</a><br> <a href="apps.topo.MultihopM.nc.html">apps.topo.MultihopM</a><br> <a href="apps.topo.TopologyM.nc.html">apps.topo.TopologyM</a><br> <a href="tos.lib.CC2420Radio.CC2420RadioM.nc.html">tos.lib.CC2420Radio.CC2420RadioM</a><br></dl><p><table BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><tr BGCOLOR="#CCCCFF"><td><h3>Commands</h3></td></tr></table><ul><li> result_t <a href="# result_t init(void)"><b>init</b> </a>(void)<menu> Initialize the random number generator</menu><p><li> uint16_t <a href="# uint16_t rand(void)"><b>rand</b> </a>(void)<menu> Produces a 16-bit pseudorandom number. </menu><p></ul><table BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><tr BGCOLOR="#CCCCFF"><td><h3>Commands - Details</h3></td></tr></table> <a name=" result_t init(void)"></a> <h4>init</h4> result_t <b>init</b>(void)<P><menu> Initialize the random number generator <table border="0" cellpadding="0"><tr valign="top"><td><b>Returns:</b></td><td> Returns SUCCESS if the initialization is successful, or FAIL if the initialization failed. For the currently existing implementations there is no known faliure modes.</td></tr></table></menu><hr> <a name=" uint16_t rand(void)"></a> <h4>rand</h4> uint16_t <b>rand</b>(void)<P><menu> Produces a 16-bit pseudorandom number. <table border="0" cellpadding="0"><tr valign="top"><td><b>Returns:</b></td><td> Returns a 16-bit pseudorandom number.</td></tr></table></menu>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -