⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tos.interfaces.timer.nc.html

📁 tinyos中文手册,是根据tinyos系统自带手册翻译过来的,虽然质量不好,但是对英文不强的人还是有用的
💻 HTML
字号:
<html><head><title>Interface: Timer</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>&nbsp;&nbsp;&nbsp;<b><a href="components_p.html">Components</a></b>&nbsp;&nbsp;&nbsp;<b><a href="interfaces_p.html">Interfaces</a></b>&nbsp;&nbsp;&nbsp;<b><a href="allfiles_p.html">All Files</a></b>&nbsp;&nbsp;&nbsp;<b><a href="index.html">Source Tree</a></b>&nbsp;&nbsp;&nbsp;</font></td><td align="right"><font size="-1">source: <b><a href="tos.interfaces.Timer.nc.source">tos.interfaces.Timer.nc</a></b></font></td></tr></table><hr><h1 align="center">Interface: Timer</h1><p> This interface provides a generic timer that can be used to generate events at regular intervals. <table border="0" cellpadding="0"><tr valign="top"><td><b>Author:</b><td> Su Ping </td></tr><tr valign="top"><td>&nbsp;</td><td> Sam Madden </td></tr><tr valign="top"><td>&nbsp;</td><td> David Gay </td></tr><tr valign="top"><td><b>Modified:</b><td> 7/16/02</td></tr></table><p><dl><dt>Components providing this interface:<dd>    <a href="tos.system.TimerC.nc.html">tos.system.TimerC</a><br>    <a href="tos.system.TimerM.nc.html">tos.system.TimerM</a><br></dl><p><dl><dt>Components requiring this interface:<dd>    <a href="apps.Oscilloscope.OscilloscopeM.nc.html">apps.Oscilloscope.OscilloscopeM</a><br>    <a href="apps.Sense.SenseM.nc.html">apps.Sense.SenseM</a><br>    <a href="apps.Userfuc.M2MFuncM.nc.html">apps.Userfuc.M2MFuncM</a><br>    <a href="apps.last.M2MFuncM.nc.html">apps.last.M2MFuncM</a><br>    <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.M2MFuncM.nc.html">apps.newtopo.M2MFuncM</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.surge.SurgeM.nc.html">apps.surge.SurgeM</a><br>    <a href="apps.topo.M2MFuncM.nc.html">apps.topo.M2MFuncM</a><br>    <a href="apps.topo.MultihopM.nc.html">apps.topo.MultihopM</a><br>    <a href="tos.lib.Counters.SenseToInt.nc.html">tos.lib.Counters.SenseToInt</a><br>    <a href="tos.lib.Route.MultiHopLEPSM.nc.html">tos.lib.Route.MultiHopLEPSM</a><br>    <a href="tos.platform.mica2.ADCREFM.nc.html">tos.platform.mica2.ADCREFM</a><br>    <a href="tos.sensorboards.micasb.PhotoTempM.nc.html">tos.sensorboards.micasb.PhotoTempM</a><br>    <a href="tos.system.AMPromiscuous.nc.html">tos.system.AMPromiscuous</a><br>    <a href="tos.system.AMStandard.nc.html">tos.system.AMStandard</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 start(char type, uint32_t interval)"><b>start</b>    </a>(char type, uint32_t interval)<menu> Start the timer. </menu><p><li>         result_t     <a href="# result_t stop(void)"><b>stop</b>    </a>(void)<menu> Stop the timer, preventing it from firing again.</menu><p></ul><table BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><tr BGCOLOR="#CCCCFF"><td><h3>Events</h3></td></tr></table><ul><li>         result_t <b>fired</b>(void)<menu> The signal generated by the timer when it fires.</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 start(char type, uint32_t interval)"></a>        <h4>start</h4>         result_t <b>start</b>(char type, uint32_t interval)<P><menu> Start the timer.  <table border="0" cellpadding="0"></td></tr><tr valign="top"><td><br><b>Parameters:</b></td><td><menu><p STYLE="text-indent: -1cm"><b>type</b> -  The type of timer to start. Valid values include  'TIMER_REPEAT' for a timer that fires repeatedly, or   'TIMER_ONE_SHOT' for a timer that fires once.  </p><p STYLE="text-indent: -1cm"><b>interval</b> -  The timer interval in <b>binary milliseconds</b> (1/1024  second). Note that the     timer cannot support an arbitrary range of intervals.    (Unfortunately this interface does not specify the valid range    of timer intervals, which are specific to a platform.)  </menu></td></tr><tr valign="top"><td><b>Returns:</b></td><td> Returns SUCCESS if the timer could be started with the     given type and interval. Returns FAIL if the type is not    one of TIMER_REPEAT or TIMER_ONE_SHOT, if the timer rate is    too high, or if there are too many timers currently active.</td></tr></table></menu><hr>    <a name=" result_t stop(void)"></a>        <h4>stop</h4>         result_t <b>stop</b>(void)<P><menu> Stop the timer, preventing it from firing again. If this is a TIMER_ONE_SHOT timer and it has not fired yet, prevents it from firing. <table border="0" cellpadding="0"><tr valign="top"><td><b>Returns:</b></td><td> SUCCESS if the timer could be stopped, or FAIL if the timer  is not running or the timer ID is out of range.</td></tr></table></menu>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -