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

📄 apps.sense.sensem.nc.html

📁 tinyos中文手册,是根据tinyos系统自带手册翻译过来的,虽然质量不好,但是对英文不强的人还是有用的
💻 HTML
字号:
<html><head><title>Component: SenseM</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="apps.Sense.SenseM.nc.source">apps.Sense.SenseM.nc</a></b></font></td></tr></table><hr><h1 align="center">Component: SenseM</h1><p> Implementation for Sense application.  (Lesson 2 in the tutorial) When clock fires, this application  reads the sensor and displays the higher 3 bits of the ADC readings to LEDs. <table border="0" cellpadding="0"><tr valign="top"><td><b>Author:</b><td> David Culler </td></tr><tr valign="top"><td>&nbsp;</td><td> Su Ping </td></tr><tr valign="top"><td>&nbsp;</td><td> Intel Research Berkeley Lab</td></tr></table><p><table BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><tr BGCOLOR="#CCCCFF"><td><h3>Required Interfaces</h3></td></tr></table><ul><li>    <a href="tos.interfaces.Timer.nc.html">Timer</a> <li>    <a href="tos.interfaces.ADC.nc.html">ADC</a> <li>    <a href="tos.interfaces.StdControl.nc.html">StdControl</a> ADCControl<li>    <a href="tos.interfaces.Leds.nc.html">Leds</a> </ul><table BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><tr BGCOLOR="#CCCCFF"><td><h3>Provided Interfaces</h3></td></tr></table><ul><li>    <a href="tos.interfaces.StdControl.nc.html">StdControl</a> </ul><table BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><tr BGCOLOR="#CCCCFF"><td><h3>Function Index</h3></td></tr></table><ul><li>        result_t     <a href="#result_t display(uint16_t value)"><b>display</b>    </a>(uint16_t value)<menu> Module scoped method. </menu><p><li>        command result_t     <a href="#command result_t StdControl.init(void)"><b>StdControl.init</b>    </a>(void)<menu> Initialize the component.</menu><p><li>        command result_t     <a href="#command result_t StdControl.start(void)"><b>StdControl.start</b>    </a>(void)<menu> Start the component.</menu><p><li>        command result_t     <a href="#command result_t StdControl.stop(void)"><b>StdControl.stop</b>    </a>(void)<menu> Stop the component.</menu><p><li>        event result_t     <a href="#event result_t Timer.fired(void)"><b>Timer.fired</b>    </a>(void)<menu> Read sensor data in response to the <code>Timer.fired</code> event.  </menu><p><li>        async event result_t     <a href="#async event result_t ADC.dataReady(uint16_t data)"><b>ADC.dataReady</b>    </a>(uint16_t data)<menu> Display the upper 3 bits of sensor reading to LEDs in response to the <code>ADC.dataReady</code> event.  </menu><p></ul><table BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><tr BGCOLOR="#CCCCFF"><td><h3>Function Descriptions</h3></td></tr></table>    <a name="result_t display(uint16_t value)"></a>        <h4>display</h4>        result_t <b>display</b>(uint16_t value)<P><menu> Module scoped method.  Displays the lowest 3 bits to the LEDs, with RED being the most signficant and YELLOW being the least significant. <table border="0" cellpadding="0"><tr valign="top"><td><b>Returns:</b></td><td> returns <code>SUCCESS</code></td></tr></table></menu><hr>    <a name="command result_t StdControl.init(void)"></a>        <h4>StdControl.init</h4>        command result_t     <a href="tos.interfaces.StdControl.nc.html#command result_t StdControl.init(void)"><b>StdControl.init</b>    </a>(void)<P><menu> Initialize the component. Initialize ADCControl, Leds  <table border="0" cellpadding="0"><tr valign="top"><td><b>Returns:</b></td><td> returns <code>SUCCESS</code> or <code>FAILED</code></td></tr></table></menu><hr>    <a name="command result_t StdControl.start(void)"></a>        <h4>StdControl.start</h4>        command result_t     <a href="tos.interfaces.StdControl.nc.html#command result_t StdControl.start(void)"><b>StdControl.start</b>    </a>(void)<P><menu> Start the component. Start the clock.  <table border="0" cellpadding="0"><tr valign="top"><td><b>Returns:</b></td><td> returns <code>SUCCESS</code> or <code>FAILED</code></td></tr></table></menu><hr>    <a name="command result_t StdControl.stop(void)"></a>        <h4>StdControl.stop</h4>        command result_t     <a href="tos.interfaces.StdControl.nc.html#command result_t StdControl.stop(void)"><b>StdControl.stop</b>    </a>(void)<P><menu> Stop the component. Stop the clock.  <table border="0" cellpadding="0"><tr valign="top"><td><b>Returns:</b></td><td> returns <code>SUCCESS</code> or <code>FAILED</code></td></tr></table></menu><hr>    <a name="event result_t Timer.fired(void)"></a>        <h4>Timer.fired</h4>        event result_t     <a href="tos.interfaces.Timer.nc.html#event result_t Timer.fired(void)"><b>Timer.fired</b>    </a>(void)<P><menu> Read sensor data in response to the <code>Timer.fired</code> event.   <table border="0" cellpadding="0"><tr valign="top"><td><b>Returns:</b></td><td> The result of calling ADC.getData().</td></tr></table></menu><hr>    <a name="async event result_t ADC.dataReady(uint16_t data)"></a>        <h4>ADC.dataReady</h4>        async event result_t     <a href="tos.interfaces.ADC.nc.html#async event result_t ADC.dataReady(uint16_t data)"><b>ADC.dataReady</b>    </a>(uint16_t data)<P><menu> Display the upper 3 bits of sensor reading to LEDs in response to the <code>ADC.dataReady</code> event.   <table border="0" cellpadding="0"><tr valign="top"><td><b>Returns:</b></td><td> Always returns <code>SUCCESS</code></td></tr></table></menu>

⌨️ 快捷键说明

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