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

📄 tos.interfaces.send.nc.html

📁 tinyos中文手册,是根据tinyos系统自带手册翻译过来的,虽然质量不好,但是对英文不强的人还是有用的
💻 HTML
字号:
<html><head><title>Interface: Send</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.Send.nc.source">tos.interfaces.Send.nc</a></b></font></td></tr></table><hr><h1 align="center">Interface: Send</h1><p>  <table border="0" cellpadding="0"><tr valign="top"><td><b>Author:</b><td> Jason Hill  </td></tr><tr valign="top"><td>&nbsp;</td><td> David Gay  </td></tr><tr valign="top"><td>&nbsp;</td><td> Philip Levis  </td></tr><tr valign="top"><td>&nbsp;</td><td> Chris Karlof </td></tr></table><p><dl><dt>Components providing this interface:<dd>    <a href="tos.lib.Route.MultiHopEngineM.nc.html">tos.lib.Route.MultiHopEngineM</a><br>    <a href="tos.lib.Route.MultiHopRouter.nc.html">tos.lib.Route.MultiHopRouter</a><br></dl><p><dl><dt>Components requiring this interface:<dd>    <a href="apps.surge.SurgeM.nc.html">apps.surge.SurgeM</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 send(TOS_MsgPtr msg, uint16_t length)"><b>send</b>    </a>(TOS_MsgPtr msg, uint16_t length)<menu> Send a message buffer with a data payload of a specific length.</menu><p><li>         void     <a href="# void getBuffer(TOS_MsgPtr msg, uint16_t *length)"><b>getBuffer</b>    </a>(TOS_MsgPtr msg, uint16_t *length)<menu> Given a TinyOS message buffer, provide a pointer to the data buffer within it that an application can use as well as its length.</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     <a href="# result_t sendDone(TOS_MsgPtr msg, result_t success)"><b>sendDone</b>    </a>(TOS_MsgPtr msg, result_t success)<menu> Signaled when a packet sent with send() completes.</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 send(TOS_MsgPtr msg, uint16_t length)"></a>        <h4>send</h4>         result_t <b>send</b>(TOS_MsgPtr msg, uint16_t length)<P><menu> Send a message buffer with a data payload of a specific length. The buffer should have its protocol fields set already, either through a protocol-aware component or by getBuffer(). <table border="0" cellpadding="0"></td></tr><tr valign="top"><td><br><b>Parameters:</b></td><td><menu><p STYLE="text-indent: -1cm"><b>msg</b> -  The buffer to send. </p><p STYLE="text-indent: -1cm"><b>length</b> -  The length of the data buffer sent using this component. This must be <= the maximum length provided by getBuffer(). </menu></td></tr><tr valign="top"><td><b>Returns:</b></td><td> Whether the send request was successful: SUCCESS means a sendDone() event will be signaled later, FAIL means one will not.</td></tr></table></menu><hr>    <a name=" void getBuffer(TOS_MsgPtr msg, uint16_t *length)"></a>        <h4>getBuffer</h4>         void <b>getBuffer</b>(TOS_MsgPtr msg, uint16_t *length)<P><menu> Given a TinyOS message buffer, provide a pointer to the data buffer within it that an application can use as well as its length. If a protocol-unaware application is sending a packet with this interface, it must first call getBuffer() to get a pointer to the valid data region. This allows the application to send a specific buffer while not requiring knowledge of the packet structure. When getBuffer() is called, protocol fields should be set to note that this packet requires those fields to be later filled in properly. Protocol-aware components (such as a routing layer that use this interface to send) should not use getBuffer(); they can have their own separate calls for getting the buffer. <table border="0" cellpadding="0"></td></tr><tr valign="top"><td><br><b>Parameters:</b></td><td><menu><p STYLE="text-indent: -1cm"><b>msg</b> -  The message to get the data region of. </p><p STYLE="text-indent: -1cm"><b>length</b> -  Pointer to a field to store the length of the data region. </menu></td></tr><tr valign="top"><td><b>Returns:</b></td><td> A pointer to the data region.</td></tr></table></menu><table BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><tr BGCOLOR="#CCCCFF"><td><h3>Events - Details</h3></td></tr></table>    <a name=" result_t sendDone(TOS_MsgPtr msg, result_t success)"></a>        <h4>sendDone</h4>         result_t <b>sendDone</b>(TOS_MsgPtr msg, result_t success)<P><menu> Signaled when a packet sent with send() completes. <table border="0" cellpadding="0"></td></tr><tr valign="top"><td><br><b>Parameters:</b></td><td><menu><p STYLE="text-indent: -1cm"><b>msg</b> -  The message sent. </p><p STYLE="text-indent: -1cm"><b>success</b> -  Whether the send was successful. </menu></td></tr><tr valign="top"><td><b>Returns:</b></td><td> Should always return SUCCESS.</td></tr></table></menu>

⌨️ 快捷键说明

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