📄 tos.lib.route.multihoplepsm.nc.html
字号:
<html><head><title>Component: MultiHopLEPSM</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.lib.Route.MultiHopLEPSM.nc.source">tos.lib.Route.MultiHopLEPSM.nc</a></b></font></td></tr></table><hr><h1 align="center">Component: MultiHopLEPSM</h1><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.ReceiveMsg.nc.html">ReceiveMsg</a> <li> <a href="tos.interfaces.Intercept.nc.html">Intercept</a> Snoop<li> <a href="tos.interfaces.SendMsg.nc.html">SendMsg</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> <li> <a href="tos.interfaces.RouteSelect.nc.html">RouteSelect</a> <li> <a href="tos.interfaces.RouteControl.nc.html">RouteControl</a> </ul><table BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><tr BGCOLOR="#CCCCFF"><td><h3>Variables</h3></td></tr></table><ul><li> typedef struct MultiHopLEPSM.RPEstEntry { uint16_t id; uint8_t receiveEst;} __attribute((packed)) RPEstEntry<li> typedef struct MultiHopLEPSM.RoutePacket { uint16_t parent; uint8_t estEntries; MultiHopLEPSM.RPEstEntry estList[1];} __attribute((packed)) RoutePacket<li> typedef struct MultiHopLEPSM.TableEntry { uint16_t id; uint16_t parent; uint16_t missed; uint16_t received; int16_t lastSeqno; uint8_t flags; uint8_t liveliness; uint8_t hop; uint8_t receiveEst; uint8_t sendEst;} TableEntry<li> TOS_Msg routeMsg<li> bool gfSendRouteBusy<li> MultiHopLEPSM.TableEntry BaseStation<li> MultiHopLEPSM.TableEntry NeighborTbl[MultiHopLEPSM.ROUTE_TABLE_SIZE]<li> MultiHopLEPSM.TableEntry *gpCurrentParent<li> uint8_t gbCurrentHopCount<li> int16_t gCurrentSeqNo<li> uint16_t gwEstTicks<li> uint32_t gUpdateInterval</ul><table BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><tr BGCOLOR="#CCCCFF"><td><h3>Function Index</h3></td></tr></table><ul><li> uint8_t <b>findEntry</b>(uint8_t id)<menu> Return index into neighbor table of the given node addr <table border="0" cellpadding="0"><tr valign="top"><td><b>Author:</b><td> terence </td></tr><tr valign="top"><td><br><b>Parameters:</b></td><td><menu><p STYLE="text-indent: -1cm"><b>id</b> - </menu></td></tr><tr valign="top"><td><b>Returns:</b></td><td> index, if not found return ROUTE_INVALID</td></tr></table></menu><p><li> uint8_t <b>findEntryToBeReplaced</b>(void)<menu> This function determines which entry should be replace in this case, we find the one with the lease send estimate <table border="0" cellpadding="0"><tr valign="top"><td><b>Author:</b><td> terence </td></tr><tr valign="top"><td><br><b>Parameters:</b></td><td><menu><p STYLE="text-indent: -1cm"><b>void</b> - </menu></td></tr><tr valign="top"><td><b>Returns:</b></td><td> index of the table</td></tr></table></menu><p><li> void <b>newEntry</b>(uint8_t indes, uint16_t id)<menu> This is going to make a new entry give an index and a id <table border="0" cellpadding="0"><tr valign="top"><td><b>Author:</b><td> terence </td></tr><tr valign="top"><td><br><b>Parameters:</b></td><td><menu><p STYLE="text-indent: -1cm"><b>index,</b> - the index of the table </p><p STYLE="text-indent: -1cm"><b>id,</b> - the node id </menu></td></tr><tr valign="top"><td><b>Returns:</b></td><td> void</td></tr></table></menu><p><li> uint8_t <a href="#uint8_t findPreparedIndex(uint16_t id)"><b>findPreparedIndex</b> </a>(uint16_t id)<menu> Get neighbor table entry corresponding to the given address.</menu><p><li> int <b>sortByReceiveEstFcn</b>(const void *x, const void *y)<li> uint32_t <b>evaluateCost</b>(uint8_t sendEst, uint8_t receiveEst)<li> void <b>updateEst</b>(MultiHopLEPSM.TableEntry *Nbr)<li> void <b>updateTable</b>(void)<li> bool <b>updateNbrCounters</b>(uint16_t saddr, int16_t seqno, uint8_t *NbrIndex)<li> void <b>chooseParent</b>(void)<li> task void <b>SendRouteTask</b>(void)<li> task void <b>TimerTask</b>(void)<li> command result_t <a href="tos.interfaces.StdControl.nc.html#command result_t StdControl.init(void)"><b>StdControl.init</b> </a>(void)<li> command result_t <a href="tos.interfaces.StdControl.nc.html#command result_t StdControl.start(void)"><b>StdControl.start</b> </a>(void)<li> command result_t <a href="tos.interfaces.StdControl.nc.html#command result_t StdControl.stop(void)"><b>StdControl.stop</b> </a>(void)<li> command bool <a href="tos.interfaces.RouteSelect.nc.html#command bool RouteSelect.isActive(void)"><b>RouteSelect.isActive</b> </a>(void)<li> command result_t <a href="tos.interfaces.RouteSelect.nc.html#command result_t RouteSelect.selectRoute(TOS_MsgPtr Msg, uint8_t id)"><b>RouteSelect.selectRoute</b> </a>(TOS_MsgPtr Msg, uint8_t id)<li> command result_t <a href="tos.interfaces.RouteSelect.nc.html#command result_t RouteSelect.initializeFields(TOS_MsgPtr Msg, uint8_t id)"><b>RouteSelect.initializeFields</b> </a>(TOS_MsgPtr Msg, uint8_t id)<li> command uint8_t <a href="tos.interfaces.RouteSelect.nc.html#command uint8_t RouteSelect.getBuffer(TOS_MsgPtr Msg, uint16_t *Len)"><b>RouteSelect.getBuffer</b> </a>(TOS_MsgPtr Msg, uint16_t *Len)<li> command uint16_t <a href="tos.interfaces.RouteControl.nc.html#command uint16_t RouteControl.getParent(void)"><b>RouteControl.getParent</b> </a>(void)<li> command uint8_t <a href="tos.interfaces.RouteControl.nc.html#command uint8_t RouteControl.getQuality(void)"><b>RouteControl.getQuality</b> </a>(void)<li> command uint8_t <a href="tos.interfaces.RouteControl.nc.html#command uint8_t RouteControl.getDepth(void)"><b>RouteControl.getDepth</b> </a>(void)<li> command uint8_t <a href="tos.interfaces.RouteControl.nc.html#command uint8_t RouteControl.getOccupancy(void)"><b>RouteControl.getOccupancy</b> </a>(void)<li> command uint16_t <a href="tos.interfaces.RouteControl.nc.html#command uint16_t RouteControl.getSender(TOS_MsgPtr msg)"><b>RouteControl.getSender</b> </a>(TOS_MsgPtr msg)<li> command result_t <a href="tos.interfaces.RouteControl.nc.html#command result_t RouteControl.setUpdateInterval(uint16_t Interval)"><b>RouteControl.setUpdateInterval</b> </a>(uint16_t Interval)<li> command result_t <a href="tos.interfaces.RouteControl.nc.html#command result_t RouteControl.manualUpdate(void)"><b>RouteControl.manualUpdate</b> </a>(void)<li> event result_t <a href="tos.interfaces.Timer.nc.html#event result_t Timer.fired(void)"><b>Timer.fired</b> </a>(void)<li> event TOS_MsgPtr <a href="tos.interfaces.ReceiveMsg.nc.html#event TOS_MsgPtr ReceiveMsg.receive(TOS_MsgPtr Msg)"><b>ReceiveMsg.receive</b> </a>(TOS_MsgPtr Msg)<li> event result_t <a href="tos.interfaces.Intercept.nc.html#event result_t Snoop.intercept(uint8_t id, TOS_MsgPtr Msg, void *Payload, uint16_t Len)"><b>Snoop.intercept</b> </a>(uint8_t id, TOS_MsgPtr Msg, void *Payload, uint16_t Len)<li> event result_t <a href="tos.interfaces.SendMsg.nc.html#event result_t SendMsg.sendDone(TOS_MsgPtr pMsg, result_t success)"><b>SendMsg.sendDone</b> </a>(TOS_MsgPtr pMsg, result_t success)</ul><table BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><tr BGCOLOR="#CCCCFF"><td><h3>Function Descriptions</h3></td></tr></table> <a name="uint8_t findPreparedIndex(uint16_t id)"></a> <h4>findPreparedIndex</h4> uint8_t <b>findPreparedIndex</b>(uint16_t id)<P><menu> Get neighbor table entry corresponding to the given address. If current entry doesn't exist, then create one, possibly evicting a previous entry. XXX - what if it evicts the parent??? <table border="0" cellpadding="0"><tr valign="top"><td><b>Author:</b><td> terence </td></tr><tr valign="top"><td><br><b>Parameters:</b></td><td><menu><p STYLE="text-indent: -1cm"><b>id,</b> - node id </menu></td></tr><tr valign="top"><td><b>Returns:</b></td><td> index</td></tr></table></menu>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -