edu.cmu.emulator.world
Class Antenna

java.lang.Object
  extended by edu.cmu.emulator.world.MovableObject
      extended by edu.cmu.emulator.world.Antenna
Direct Known Subclasses:
IsotropicAntenna, SectionalAntenna, YagiAntenna

public abstract class Antenna
extends MovableObject

Parent of all antennas. Contains common functionality as well as the functionality needed to interface the antenna with the DSP. antennas are stored in an array that is indexed by the order of antenna definition


Field Summary
protected  int antennaIndex
           
protected  int elementN
           
protected  int emulatedTransmitPower
           
protected  EmuNIC emuNIC
           
protected  int emuPortID
          the global index of this antenna
protected  int hardwareTransmitPower
           
protected  double txAmpGain
           
 
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
Antenna(EmuNIC emuNIC, int hardwareTransmitPower, int emuPortID, int antennaIndex, int elementN)
          Constructor
 
Method Summary
 int getAntennaIndex()
           
 int getElementN()
           
 int getEmulatedTransmitPower()
          Returns the emulated transmit power of the antenna.
 int getEmuPortID()
           
 int getEmuPortIndex()
          Returns the index of the physical emulator port to which the antenna is connected.
abstract  double getGain(double[] direction)
          Abstract method that returns the Gain of the antenna in the direction specified.
 int getHardwareTransmitPower()
          Returns the hardware transmit power of the antenna.
 EmuNIC getNIC()
          Returns the NIC object to which the antenna is attached.
 double getTxAmpGain()
           
 void setEmulatedTransmitPower(int emulatedTransmitPower)
          Sets the antenna's emulated transmit power to the value specified.
 void setTxAmpGain(double txAmpGain)
           
 
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

emuNIC

protected EmuNIC emuNIC

antennaIndex

protected int antennaIndex

emuPortID

protected int emuPortID
the global index of this antenna


hardwareTransmitPower

protected int hardwareTransmitPower

emulatedTransmitPower

protected int emulatedTransmitPower

txAmpGain

protected double txAmpGain

elementN

protected int elementN
Constructor Detail

Antenna

public Antenna(EmuNIC emuNIC,
               int hardwareTransmitPower,
               int emuPortID,
               int antennaIndex,
               int elementN)
Constructor

Parameters:
emuNIC - The NIC object to which this antenna is attached.
hardwareTransmitPower - The hardware transmit power of the antenna.
emuPortIndex - The physical emulator port index to which the antenna is attached.
antennaIndex - The antenna index required by support routines which access the antennas
Method Detail

getAntennaIndex

public int getAntennaIndex()

getElementN

public int getElementN()

getGain

public abstract double getGain(double[] direction)
Abstract method that returns the Gain of the antenna in the direction specified. This method needs to be overridden by all subclasses.

Parameters:
direction - The EVector representation of the antenna orientation
Returns:
The calculated value of the Antenna gain.

getEmuPortID

public int getEmuPortID()

getEmuPortIndex

public int getEmuPortIndex()
Returns the index of the physical emulator port to which the antenna is connected.

Returns:
The port index.

getNIC

public EmuNIC getNIC()
Returns the NIC object to which the antenna is attached.

Returns:
The EmuNic object to which the antenna is attached.

getHardwareTransmitPower

public int getHardwareTransmitPower()
Returns the hardware transmit power of the antenna.

Returns:
The hardware transmit power of the antenna.

setEmulatedTransmitPower

public void setEmulatedTransmitPower(int emulatedTransmitPower)
Sets the antenna's emulated transmit power to the value specified.

Parameters:
emulatedTransmitPower - The value to which the antenna's emulated transmit power should be set to.

getEmulatedTransmitPower

public int getEmulatedTransmitPower()
Returns the emulated transmit power of the antenna.

Returns:
The emulated transmit power.

getTxAmpGain

public double getTxAmpGain()

setTxAmpGain

public void setTxAmpGain(double txAmpGain)


Copyright © 2013. All Rights Reserved.