|
Boeing Simulation 3.1 API Specification | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--objects.WhatWhere
|
+--objects.MovableWhatWhere
|
+--worldsimulator.SimulatorUCAV
A component version of the UCAV.
| Field Summary | |
private boolean |
debug
Flag for enabling debug message output. |
protected static double |
DISTANCE_PER_PERIOD
The maximum percentage of the world that the UAV can move in one update cycle. |
private objects.Locatable |
goal
The location where this UCAV will attept to go towards. |
private Long |
id
The unique ID used to distinguish this UAV from another UAV. |
private util.Queue |
imageQueue
A queue that hold the images sent from the ComponentizedSimulator that have not been sent to the attached
ObjectLocater |
private connect.ChannelBundle |
managerConnection
The channels over which this UCAV will communicate with
the UCAVManager. |
private int |
num
|
private static long |
serialVersionUID
|
private connect.ChannelBundle |
simulatorConnection
The channels over which this UCAV will communicate with
the Simulator. |
private util.ConsumerQueue |
simulatorQueue
The multithreaded queue for reading in objects from the server. |
private boolean |
started
Flag for whether the ucav has begun executing periodic movements. |
protected static long |
STEP_COST
The time in milliseconds in which at step method can start and finish its execution. |
protected static objects.Dimension |
UCAV_DIM
|
private static int |
ucavNum
|
protected static long |
UPDATE_PERIOD
The time in milliseconds at which this UCAV will update it's movement. |
| Fields inherited from class objects.WhatWhere |
dim, loc |
| Constructor Summary | |
SimulatorUCAV(connect.CreatesConnection toUCAVManager,
connect.CreatesConnection toSimulator)
|
|
SimulatorUCAV(objects.Location loc,
connect.CreatesConnection toUCAVManager,
connect.CreatesConnection toSimulator)
Constructor that takes in the location of the UCAV |
|
| Method Summary | |
protected boolean |
allowMethod(util.MethodRequest request)
Returns true due to undefined behavior at this point. |
void |
connect(connect.CreatesConnection host)
This method will write out UAVImages that are in the imageQueue. |
private void |
debug(String s)
Emits a message if the debug flag is enabled. |
void |
dropBomb()
Notifies the ComponentizedSimulator that a bomb is to
be droped at the UCAVs current location. |
boolean |
equals(Object other)
Returns true if the object is a SimulatorUCAV and has the same ID value. |
connect.CreatesConnection |
getConnection()
return the CreatesConnection that would allow another component to connect. |
objects.Locatable |
getGoal()
|
long |
getID()
Returns the unique ID for this UCAV. |
worldsimulator.SimulatorUCAV |
getUCAV()
Returns an instance of this. |
int |
hashCode()
Returns the hash code based on its ID. |
void |
receiveImage(uav.UAVImage image)
|
void |
run()
Calls the periodic step function. |
void |
setGoal(objects.Locatable loc)
Sets the goal toward which this object will move. |
void |
startPeriodicMovements()
Starts the WorkerThread that moves this UCAV. |
void |
startProcessingThread()
This method handles MethodRequest objects that are
sent to this object. |
void |
step()
Moves the UCAV one step towards the goal. |
String |
toString()
|
| Methods inherited from class objects.MovableWhatWhere |
setLoc, setLoc |
| Methods inherited from class objects.WhatWhere |
bound, getCenter, getDimensions, getDistance, getHeight, getLoc, getWidth, isEastOf, isNorthOf, isSouthOf, isWestOf, overlaps |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface objects.Movable |
setLoc, setLoc |
| Methods inherited from interface objects.Locatable |
getDistance, getLoc, isEastOf, isNorthOf, isSouthOf, isWestOf |
| Field Detail |
private static final long serialVersionUID
protected static final objects.Dimension UCAV_DIM
private transient connect.ChannelBundle managerConnection
UCAV will communicate with
the UCAVManager.
private transient connect.ChannelBundle simulatorConnection
UCAV will communicate with
the Simulator.
private objects.Locatable goal
protected static final double DISTANCE_PER_PERIOD
protected static final long UPDATE_PERIOD
protected static final long STEP_COST
private final Long id
private final transient util.Queue imageQueue
ComponentizedSimulator that have not been sent to the attached
ObjectLocater
private boolean started
private boolean debug
private transient util.ConsumerQueue simulatorQueue
private static int ucavNum
private final int num
| Constructor Detail |
public SimulatorUCAV(connect.CreatesConnection toUCAVManager,
connect.CreatesConnection toSimulator)
public SimulatorUCAV(objects.Location loc,
connect.CreatesConnection toUCAVManager,
connect.CreatesConnection toSimulator)
| Method Detail |
public objects.Locatable getGoal()
public final void run()
run in interface Runnablestep()public void setGoal(objects.Locatable loc)
public void step()
public void startPeriodicMovements()
WorkerThread that moves this UCAV.
public void dropBomb()
ComponentizedSimulator that a bomb is to
be droped at the UCAVs current location. This is done through
a MethodRequest for the remote invocation of the
Simulator method "notifyBombDrop"
dropBomb in interface UCAVpublic void receiveImage(uav.UAVImage image)
public void startProcessingThread()
MethodRequest objects that are
sent to this object.
public void connect(connect.CreatesConnection host)
UAVImages that are in the imageQueue.
connect in interface Componentprotected boolean allowMethod(util.MethodRequest request)
private void debug(String s)
public connect.CreatesConnection getConnection()
Component
getConnection in interface Componentpublic long getID()
UCAV
getID in interface UCAVpublic worldsimulator.SimulatorUCAV getUCAV()
ComponentizedSimulator.
public boolean equals(Object other)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic String toString()
toString in class Object
|
Boeing Simulation 3.1 API Specification | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||