/** * Jeff Rupp * Master's Thesis * 2005 * * class to contain the nodes this node has heard during the 'hello' sequence. * * Since the hello starts with the lowest power level and works up, the first time * we hear another node is the lowest power we can hear it at * Assumes that if this node can hear another at power p, this node can hear that node at * any power >= p */ package jdr.mobisim; public class NodeHeard { public int m_nodeNumber = -1; public byte m_lowestLevelHeard = -1; public NodeHeard() { } public NodeHeard(int node, byte lvl) { m_nodeNumber = node; m_lowestLevelHeard = lvl; } public boolean equals(Object obj) { boolean rc = false; if(obj instanceof NodeHeard) { rc = (((NodeHeard)obj).m_nodeNumber == m_nodeNumber); } return rc; } public String toString() { return "Node: " + m_nodeNumber + " level: " + m_lowestLevelHeard; } }