📄 tos.interfaces.routeselect.nc.html
字号:
<html><head><title>Interface: RouteSelect</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.RouteSelect.nc.source">tos.interfaces.RouteSelect.nc</a></b></font></td></tr></table><hr><h1 align="center">Interface: RouteSelect</h1><p> Interface to a route selection component in the TinyOS ad-hoc system architecture. <table border="0" cellpadding="0"><tr valign="top"><td><b>Author:</b><td> Philip Levis</td></tr></table><p><dl><dt>Components providing this interface:<dd> <a href="apps.last.Multihop.nc.html">apps.last.Multihop</a><br> <a href="apps.last.MultihopM.nc.html">apps.last.MultihopM</a><br> <a href="apps.newtopo.Multihop.nc.html">apps.newtopo.Multihop</a><br> <a href="apps.newtopo.MultihopM.nc.html">apps.newtopo.MultihopM</a><br> <a href="apps.topo.Multihop.nc.html">apps.topo.Multihop</a><br> <a href="apps.topo.MultihopM.nc.html">apps.topo.MultihopM</a><br> <a href="tos.lib.Route.MultiHopLEPSM.nc.html">tos.lib.Route.MultiHopLEPSM</a><br></dl><p><dl><dt>Components requiring this interface:<dd> <a href="tos.lib.Route.MultiHopEngineM.nc.html">tos.lib.Route.MultiHopEngineM</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> bool <a href="# bool isActive(void)"><b>isActive</b> </a>(void)<menu> Whether there is currently a valid route.</menu><p><li> result_t <a href="# result_t selectRoute(TOS_MsgPtr msg, uint8_t id)"><b>selectRoute</b> </a>(TOS_MsgPtr msg, uint8_t id)<menu> Select a route and fill in all of the necessary routing information to a packet.</menu><p><li> result_t <a href="# result_t initializeFields(TOS_MsgPtr msg, uint8_t id)"><b>initializeFields</b> </a>(TOS_MsgPtr msg, uint8_t id)<menu> Given a TOS_MstPtr, initialize its routing fields to a known state, specifying that the message is originating from this node.</menu><p><li> uint8_t <a href="# uint8_t getBuffer(TOS_MsgPtr msg, uint16_t *len)"><b>getBuffer</b> </a>(TOS_MsgPtr msg, uint16_t *len)<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><li> uint16_t <b>addrselect</b>(TOS_MsgPtr msg, uint8_t id)</ul><table BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><tr BGCOLOR="#CCCCFF"><td><h3>Commands - Details</h3></td></tr></table> <a name=" bool isActive(void)"></a> <h4>isActive</h4> bool <b>isActive</b>(void)<P><menu> Whether there is currently a valid route. <table border="0" cellpadding="0"><tr valign="top"><td><b>Returns:</b></td><td> Whether there is a valid route.</td></tr></table></menu><hr> <a name=" result_t selectRoute(TOS_MsgPtr msg, uint8_t id)"></a> <h4>selectRoute</h4> result_t <b>selectRoute</b>(TOS_MsgPtr msg, uint8_t id)<P><menu> Select a route and fill in all of the necessary routing information to a packet. <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> - Message to select route for and fill in routing information. </menu></td></tr><tr valign="top"><td><b>Returns:</b></td><td> Whether a route was selected succesfully. On FAIL the packet should not be sent.</td></tr></table></menu><hr> <a name=" result_t initializeFields(TOS_MsgPtr msg, uint8_t id)"></a> <h4>initializeFields</h4> result_t <b>initializeFields</b>(TOS_MsgPtr msg, uint8_t id)<P><menu> Given a TOS_MstPtr, initialize its routing fields to a known state, specifying that the message is originating from this node. This known state can then be used by selectRoute() to fill in the necessary data. <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> - Message to select route for and fill in init data. </menu></td></tr><tr valign="top"><td><b>Returns:</b></td><td> Should always return SUCCESS.</td></tr></table></menu><hr> <a name=" uint8_t getBuffer(TOS_MsgPtr msg, uint16_t *len)"></a> <h4>getBuffer</h4> uint8_t <b>getBuffer</b>(TOS_MsgPtr msg, uint16_t *len)<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. Unlike the getBuffer of the Send interface, this can be called freely and does not modify 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>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -