edu.cmu.emulator.world
Class EmuNode

java.lang.Object
  extended by edu.cmu.emulator.world.MovableObject
      extended by edu.cmu.emulator.world.EmuNode

public class EmuNode
extends MovableObject

This class represents a physical device in the emulator - usually a laptop. An EmuNode has one or more NICs. This class tracks the node's position in the emulated world and controls sending of traffic. The wired IP address is used for control purposes only.


Field Summary
protected  boolean active
           
protected  Antenna[] antennas
           
protected  int channelGroupID
           
protected  String color
           
private static String DEF_COLOR
           
protected  Logger log
           
protected  EmuNIC[] nics
           
protected  int portID
           
protected  String wiredNicIpAddress
           
 
Fields inherited from class edu.cmu.emulator.world.MovableObject
accelerationMPS2, attributeMap, children, dirOrientation, groupWorker, ID_ACCELERATION_MPS2, ID_ORIENTATION, ID_POSITION, ID_ROTATION, ID_VELOCITY_MPS, name, navigator, OM_PARENT, OM_VELOCITY, orientation, orientationMode, parent, position, rotation, segmentEndMillis, segmentEndPos, segmentListenerManager, segmentStartMillis, segmentStartPos, uName, velocityMPS
 
Constructor Summary
EmuNode(String name)
           
EmuNode(String name, MovableObject parent)
           
 
Method Summary
 Antenna changeAntenna(String type)
           
 Antenna changeNodeAntenna(String type)
           
 Antenna getAntenna(int index)
           
 int getChannelGroupID()
           
 String getColor()
           
 String getIpAddress()
           
 EmuNIC getNIC(int index)
           
 EmuNIC[] getNICs()
           
 int getNumAntennas()
           
 int getNumNICs()
           
 int getPortID()
           
 String getWiredIPAddress()
           
 boolean isActive()
           
 void setActiveStatus(boolean status)
           
 void setChannelGroupID(int groupID)
           
 void setColor(String color)
           
 void setIpAddress(String ipAddress)
           
 void setNICs(EmuNIC[] nics)
           
 void setPortID(int ID)
           
 
Methods inherited from class edu.cmu.emulator.world.MovableObject
addChild, addSegmentListener, addWaypointListener, addWaypointListener, endSegment, fixOrientation, getAbsAcceleration, getAbsAcceleration, getAbsOrientation, getAbsOrientation, getAbsPosition, getAbsPosition, getAbsRotation, getAbsRotation, getAbsVelocity, getAbsVelocity, getAcceleration, getAttribute, getChild, getDistance, getName, getNumChildren, getOrientation, getOrientation, getOrientationMode, getParent, getPosition, getRotation, getUName, getVelocity, isMoving, moveToOverTime, moveToOverTime, moveToOverTime, moveToOverTime, moveToWithSpeed, moveToWithSpeed, moveToWithSpeed, notifySegmentListeners, removeSegmentListener, removeWaypointListener, setAttribute, setName, setOrientationMode, setStationaryAtPos, setUName, startRoute, startSegment, stopInPlace, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

wiredNicIpAddress

protected String wiredNicIpAddress

nics

protected EmuNIC[] nics

color

protected String color

log

protected Logger log

portID

protected int portID

active

protected boolean active

channelGroupID

protected int channelGroupID

antennas

protected Antenna[] antennas

DEF_COLOR

private static final String DEF_COLOR
See Also:
Constant Field Values
Constructor Detail

EmuNode

public EmuNode(String name,
               MovableObject parent)

EmuNode

public EmuNode(String name)
Method Detail

setActiveStatus

public void setActiveStatus(boolean status)

isActive

public boolean isActive()

setPortID

public void setPortID(int ID)

getPortID

public int getPortID()

setColor

public void setColor(String color)

getColor

public String getColor()

setChannelGroupID

public void setChannelGroupID(int groupID)

getChannelGroupID

public int getChannelGroupID()

setIpAddress

public void setIpAddress(String ipAddress)

getWiredIPAddress

public String getWiredIPAddress()

getIpAddress

public String getIpAddress()

setNICs

public void setNICs(EmuNIC[] nics)

getNumNICs

public int getNumNICs()

getNIC

public EmuNIC getNIC(int index)

getNICs

public EmuNIC[] getNICs()

getNumAntennas

public int getNumAntennas()

getAntenna

public Antenna getAntenna(int index)

changeAntenna

public Antenna changeAntenna(String type)

changeNodeAntenna

public Antenna changeNodeAntenna(String type)


Copyright © 2013. All Rights Reserved.