|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfaa.tg.sp.SpCommandResult
public class SpCommandResult
SpCommandResult is the object returned upon execution of a SpCommand.
It contains the original SpCommand, as well as any Command-related
feedback
See the source: SpCommandResult.java
The abstract class for classes that make these,
Serialized Form| Field Summary | |
|---|---|
private Acid |
acid
|
private Aircraft |
aircraft
|
private java.lang.String |
aircraftID
Deprecated. Use acid instead of aircraftID. |
private SpID |
assignSpID
|
private SpCommand |
cmd
|
static java.lang.String |
CVS_VERSION_ID
The CVS Version ID |
private Frequency |
freq
|
private static MethodMap |
methodMap
|
private java.lang.String |
msg
|
private java.lang.String |
name
|
private SimulationTime |
resultTime
|
private Sector |
sector
|
(package private) static long |
serialVersionUID
|
private boolean |
success
|
| Constructor Summary | |
|---|---|
SpCommandResult(SpCommand spCmd,
Aircraft ac,
boolean success)
Constructor |
|
SpCommandResult(SpCommand spCmd,
Aircraft ac,
boolean success,
java.lang.String spMsg)
Constructor |
|
SpCommandResult(SpCommand spCmd,
java.lang.String acid,
boolean success,
java.lang.String spMsg,
Sector sector,
Frequency freq,
SimulationTime time)
Constructor |
|
| Method Summary | |
|---|---|
java.lang.String |
frequency()
If applicable, the frequency of the aircraft the message is relevant to. |
Acid |
getAcid()
Returns the Acid of the aircraft acted on. |
Aircraft |
getAircraft()
Returns the Aircraft: will return null after deserialization. |
java.lang.String |
getAircraftID()
Returns the aircraft's ACID: only ac info once this is deserialized. |
java.lang.String |
getAssignedSp()
Returns the simpilot assigned to the aircraft when command was given. |
java.lang.String |
getBaseCommand()
If applicable, the command type this message is a response to. |
java.lang.String |
getCmdLine()
Returns the command line typed in |
java.lang.String |
getEventDetail()
Returns the fix name as other info describing the event. |
java.lang.String |
getEventName()
Returns the EventFileCombinable tag for this class of objects. |
Frequency |
getFrequency()
|
java.lang.String |
getMessage()
A general multi-purpose message field for any listener. |
MethodMap |
getMethodMap()
Returns the SpCmdResult information in DelimWritable format. |
java.lang.String |
getName()
Returns the unique identifier for the simpilot command. |
Sector |
getSector()
This provides the type of this command as an SpCmdType. |
SimulationTime |
getSimTime()
Returns the SimulationTime that this aircraft event refers to. |
CommandLineSource |
getSource()
returns where the command came from |
SpCmdType |
getSpCmdType()
This provides the type of this command as an SpCmdType. |
SpCommand |
getSpCommand()
Returns the SP command object. |
private static MethodMap |
makeMethodMap()
Creates the map of field names and MethodSpecs |
private void |
readObject(java.io.ObjectInputStream in)
Set acid if the version deserialized did not have it defined. |
java.lang.String |
source()
Yields a unique String description of the source of the message. |
java.lang.String |
successful()
If applicable, a description of the success or failure of the command that this message is a response to. |
java.lang.String |
time()
By convention, this returns the current simulation time when the message was issued in a HH:MM:SS format. |
java.lang.String |
toDraText()
Returns the SpCommandResult information as a DR&A text String. |
Element |
toElement()
Returns the event information as a jdom XML Element with a root element of type SimEvent (if added to a simevent object, a event file can be created duplicating the command(s) in the SimEventObject XML. |
Element |
toElement(SimulationTime useTime)
Returns the event information with the specified time as a jdom XML Element with a root element of type SimEvent (if added to a simevent object, a event file can be created duplicating the command(s) in the SimEventObject XML. |
java.lang.String |
toString()
This toString method returns the command text that was executed as well as weather or not it was succesful and the msg (if any) |
boolean |
wasSuccessful()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
static final long serialVersionUID
public static final java.lang.String CVS_VERSION_ID
private SpCommand cmd
private java.lang.String msg
private boolean success
private SimulationTime resultTime
private Acid acid
private java.lang.String aircraftID
private Sector sector
private Frequency freq
private SpID assignSpID
private java.lang.String name
private transient Aircraft aircraft
private static MethodMap methodMap
| Constructor Detail |
|---|
public SpCommandResult(SpCommand spCmd,
Aircraft ac,
boolean success)
spCmd - The SpCommand that was issued.ac - The Aircraft the command was executed upon.success - If the command succeeded, as a boolean.
public SpCommandResult(SpCommand spCmd,
Aircraft ac,
boolean success,
java.lang.String spMsg)
spCmd - The SpCommand that was issued.ac - The Aircraft the command was executed upon.success - If the command succeeded, as a boolean.spMsg - Any command related feedback, as a String.
public SpCommandResult(SpCommand spCmd,
java.lang.String acid,
boolean success,
java.lang.String spMsg,
Sector sector,
Frequency freq,
SimulationTime time)
spCmd - The SpCommand that was issued.acid - The acid of the Aircraft the command was executed upon.success - If the command succeeded, as a boolean.spMsg - Any command related feedback, as a String.sector - Sector that the aircraft was in when the command was giventime - SimulationTime that the command was given| Method Detail |
|---|
private void readObject(java.io.ObjectInputStream in)
throws java.io.IOException,
java.lang.ClassNotFoundException
java.io.IOException
java.lang.ClassNotFoundExceptionpublic java.lang.String getName()
getName in interface MethodMapCombinablegetName in interface ManagedObjectpublic Acid getAcid()
getAcid in interface MethodMapCombinablegetAcid in interface HasAcidpublic final java.lang.String getCmdLine()
getCmdLine in interface CommandFeedbackpublic final java.lang.String getEventName()
getEventName in interface MethodMapCombinablepublic final java.lang.String getEventDetail()
getEventDetail in interface MethodMapCombinablepublic CommandLineSource getSource()
getSource in interface HasSpCmdpublic java.lang.String source()
CommandFeedback
source in interface CommandFeedbackpublic Sector getSector()
getSector in interface HasSectorpublic SpCmdType getSpCmdType()
getSpCmdType in interface HasSpCmdpublic Element toElement()
toElement in interface SimEventXmlWritabletoElement in interface XmlWritablepublic Element toElement(SimulationTime useTime)
useTime - Allows the Element's simulation time to be specified.
public java.lang.String toDraText()
toDraText in interface TextWritablepublic java.lang.String toString()
toString in class java.lang.Objectpublic SpCommand getSpCommand()
public java.lang.String getBaseCommand()
CommandFeedback
getBaseCommand in interface CommandFeedbackpublic Aircraft getAircraft()
public java.lang.String getAssignedSp()
public java.lang.String getMessage()
CommandFeedback
getMessage in interface CommandFeedbackpublic SimulationTime getSimTime()
MethodMapCombinable
getSimTime in interface MethodMapCombinablegetSimTime in interface HasSimTimepublic boolean wasSuccessful()
public java.lang.String getAircraftID()
getAircraftID in interface CommandFeedbackprivate static MethodMap makeMethodMap()
public MethodMap getMethodMap()
getMethodMap in interface DelimWritablepublic Frequency getFrequency()
public java.lang.String frequency()
CommandFeedback
frequency in interface CommandFeedbackpublic java.lang.String successful()
CommandFeedback
successful in interface CommandFeedbackpublic java.lang.String time()
CommandFeedback
time in interface CommandFeedback
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||