|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpamvotis.core.MobileNode
public class MobileNode
Simulates a mobile node
Field Summary | |
---|---|
static java.util.Random |
generator
|
Method Summary | |
---|---|
void |
addSource(Source s)
Adds a new source to the source manager |
PacketBuffer |
getPacketBuffer()
Gets the packet buffer of the node. |
Source |
getSource(int sourceId)
Returns a source identified by its Id. |
java.util.Vector<Packet> |
pollPacketsFromSources()
Calls the corresponding function of the source manager to poll one packet from each source |
void |
removeAllSources()
Removes all the sources of a node. |
void |
removeSource(int sourceId)
Removes a source from the source manager |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.util.Random generator
Method Detail |
---|
public Source getSource(int sourceId) throws ElementDoesNotExistException
sourceId
- The Id of the source
ElementDoesNotExistException
SourceManager.getSource(int)
public void addSource(Source s) throws ElementExistsException
s
- The source to be added
ElementExistsException
SourceManager.addSource(Source)
public void removeSource(int sourceId) throws ElementDoesNotExistException
sourceId
- The Id of the source to be removed.
ElementDoesNotExistException
SourceManager.removeSource(int)
public java.util.Vector<Packet> pollPacketsFromSources()
SourceManager.pollPacketsFromSources()
public PacketBuffer getPacketBuffer()
PacketBuffer
public void removeAllSources()
SourceManager.clear()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |