|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sentilla.platform.tmote.CollectionProtocol.NeighborTable
public class CollectionProtocol.NeighborTable
Data structure containing the known neighbors of a mote. Used by the CollectionProtocol for storing neighbors and information on routing messages to a host server.
CollectionProtocol
Nested Class Summary | |
---|---|
class |
CollectionProtocol.NeighborTable.Iterator
Iterator class for the NeighborTable. |
Constructor Summary | |
---|---|
CollectionProtocol.NeighborTable(int maxSize)
Creates a NeighborTable with a max size of maxSize. |
Method Summary | |
---|---|
void |
add(CollectionProtocol.RTable t)
Add an entry to the table. |
void |
clear()
Remove all entries from the neighbor table. |
boolean |
contains(long id)
Returns true if the table contains the MAC address id. |
CollectionProtocol.RTable |
first()
|
CollectionProtocol.RTable |
get(long id)
Get the RTable object contained in the table with MAC address id. |
boolean |
isEmpty()
Return true if the table is empty. |
CollectionProtocol.NeighborTable.Iterator |
iterator()
Returns an iterator for the neighbor table. |
int |
size()
Returns the size of the table. |
void |
update(long nodeID,
byte hops,
short cost,
int hostSeq)
Update the table entry. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CollectionProtocol.NeighborTable(int maxSize)
maxSize
- maximum size of the tableMethod Detail |
---|
public CollectionProtocol.RTable first()
public void add(CollectionProtocol.RTable t)
t
- RTable object to add to the tablepublic void update(long nodeID, byte hops, short cost, int hostSeq)
nodeID
- the truncated mote MAC addresshops
- the number of hops to the hostcost
- the cost of the route through this neighborhostSeq
- the sequence id that the host transmittedpublic CollectionProtocol.RTable get(long id)
id
- MAC address of the neighbor
public boolean contains(long id)
id
- MAC address of the neighbor
public void clear()
public boolean isEmpty()
public int size()
public CollectionProtocol.NeighborTable.Iterator iterator()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |