faa.tg.aircraft
Class Transponder

java.lang.Object
  extended by faa.tg.aircraft.Transponder
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class Transponder
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable

 The transponder class replicates the functionality of the real world
 transponder in the tail of an aircraft. The beacon code and Mode C
 altitude are the primary data managed here.
 
See the source: Transponder.java

Version:
$Id: Transponder.java,v 3.5 2008/09/22 21:18:28 lykensj Exp $
See Also:
Serialized Form

Field Summary
private  BeaconCode beaconCode
           
static java.lang.String CVS_VERSION_ID
          The CVS Version ID
private static SimulationTime DEFAULT_IDENT_TIME
          Default time to ident for
private  boolean ident
           
private  SimulationTime identTime
           
private  boolean modeC
           
(package private) static long serialVersionUID
           
private  boolean transmitterOn
           
 
Constructor Summary
Transponder()
          Constructor.
Transponder(Scenario scenario)
           
 
Method Summary
 Transponder clone()
          Return a true copy of the Transponder Object.
 BeaconCode getBeaconCode()
          The following is the accessor method for the transponder beacon code for this aircraft.
 int getBeaconCodeInt()
           
 java.lang.String getBeaconCodeStr()
           
 boolean getModeC()
           
 void ident(Scenario scenario)
          Sets ident on and schedules a SimEvent to set ident off in Ident Time seconds.
 void ident(SimulationTime identDuration, Scenario scenario)
          Sets ident on and schedules a SimEvent to set ident off in a given amount of time
 boolean isIdenting()
          Returns true if Transponder is identing; false if not.
 boolean isTransmitterOn()
           
 void setBeaconCode(BeaconCode beaconCode)
           
 void setBeaconCode(int beaconInt)
           
 void setBeaconCode(java.lang.String beaconStr)
           
 void setIdent(boolean enable)
          Turns ident on and off.
 void setModeC(boolean enable)
          The following are the accessor methods for enabling and disabling the mode C altitude part of the transponder transmitter.
 void setTransmitterOn(boolean transmitterOn)
          The following are the accessor methods for enabling and disabling the transponder transmitter.
 java.lang.String toDraText()
          Returns a the transponder information in text format.
 java.lang.String toString()
          Returns a string representation of the transponder information.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values

CVS_VERSION_ID

public static final java.lang.String CVS_VERSION_ID
The CVS Version ID

See Also:
Constant Field Values

beaconCode

private BeaconCode beaconCode

transmitterOn

private boolean transmitterOn

modeC

private boolean modeC

ident

private boolean ident

identTime

private final SimulationTime identTime

DEFAULT_IDENT_TIME

private static final SimulationTime DEFAULT_IDENT_TIME
Default time to ident for

Constructor Detail

Transponder

public Transponder()
Constructor.


Transponder

public Transponder(Scenario scenario)
Method Detail

clone

public Transponder clone()
Return a true copy of the Transponder Object.

Overrides:
clone in class java.lang.Object
Returns:
Returns a true copy of the Transponder as an Object.

getBeaconCode

public BeaconCode getBeaconCode()
The following is the accessor method for the transponder beacon code for this aircraft. This is a 4 digit Octal number assigned by ATC to uniquely identify an aircraft (each digit ranges from 0 to 7). The beacon code is stored as a BeaconCode.

Returns:
Transponder code: a 4 digit octal number assigned by ATC to uniquely identify an aircraft (digits range from 0 to 7).

getBeaconCodeStr

public java.lang.String getBeaconCodeStr()

getBeaconCodeInt

public int getBeaconCodeInt()

setBeaconCode

public void setBeaconCode(BeaconCode beaconCode)

setBeaconCode

public void setBeaconCode(int beaconInt)

setBeaconCode

public void setBeaconCode(java.lang.String beaconStr)

setTransmitterOn

public void setTransmitterOn(boolean transmitterOn)
The following are the accessor methods for enabling and disabling the transponder transmitter. Search only targets need to have the transponder turned off.


isTransmitterOn

public boolean isTransmitterOn()

ident

public void ident(Scenario scenario)
Sets ident on and schedules a SimEvent to set ident off in Ident Time seconds.


ident

public void ident(SimulationTime identDuration,
                  Scenario scenario)
Sets ident on and schedules a SimEvent to set ident off in a given amount of time


setIdent

public void setIdent(boolean enable)
Turns ident on and off.


isIdenting

public boolean isIdenting()
Returns true if Transponder is identing; false if not.


setModeC

public void setModeC(boolean enable)
The following are the accessor methods for enabling and disabling the mode C altitude part of the transponder transmitter.


getModeC

public boolean getModeC()

toDraText

public java.lang.String toDraText()
Returns a the transponder information in text format.

Returns:
The transponder information as a String.

toString

public java.lang.String toString()
Returns a string representation of the transponder information. In general, the toString method returns a String that "textually represents" this object.

Overrides:
toString in class java.lang.Object
Returns:
String a String representation of this object