|
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
|
+--connect.socket.SocketComponentTemplate
|
+--ucavmanager.SimulatorUCAVManager
A socket-based implementation of UCAVManager that communicates to
SimulatorUCAV components.
UCAV,
SimulatorUAVManager,
ComponentizedSimulator| Nested Class Summary | |
protected static class |
SimulatorUCAVManager.BasicUCAVInfo
|
| Field Summary | |
private static boolean |
debug
|
private Map |
idToUCAV
Maps the unique ID of the ucav to the ucav itself. |
private int |
nextID
|
private Set |
permittedConnections
|
private boolean |
serverConnected
|
private util.ConsumerQueue |
serverQueue
The queue structure that will hold objects sent by the Server. |
private connect.CreatesConnection |
toServer
|
private Map |
ucavInfoToConnection
|
private util.SinglePermitMap |
ucavToChannels
Map linking UCAV to ChannelBundle. |
| Fields inherited from class connect.socket.SocketComponentTemplate |
portNumber |
| Constructor Summary | |
SimulatorUCAVManager(int port)
|
|
| Method Summary | |
protected boolean |
accept(Class requestingType)
Returns whether this component will accept a connection from the the requesting object of the speicifed type. |
protected boolean |
allowMethod(util.MethodRequest request)
Returns true if this component allows the MethodRequest to be invoked upon itself. |
void |
attackWithUCAV(ucav.UCAV ucavObject,
objects.Targetable t)
Acquires the channel resources when available, and then sends out set location request to the ucav. |
private ucav.UCAV |
bind(ucav.UCAV ucavObject)
Returns the SimulatorUCAV associated with this UCAVObject. |
private void |
debug(String s)
Emits a debug message if the debug flag is enabled. |
List |
getAvailableUCAVs()
Return a list of all UCAVs that are not currently assigned to a
mission. |
protected int |
getMaxPoints()
Returns 1 so that a single RelayPoint may be created. |
int |
getNextConnection()
|
int |
getSourceType()
|
List |
getUCAVConnections()
Return a list containing the CreatesConnections for all UCAVs
connected to this manager. |
static void |
main(String[] args)
|
void |
moveUnit(ucav.UCAV ucavObject,
objects.Locatable loc)
Acquires the channel resources for the ucav, and then sends a request that the ucav for the ucav to begin moving to the location. |
private int |
nextUCAVID()
|
protected void |
processAcceptedConnection(Class hostType,
connect.ChannelBundle channels)
Handles transactions with the Server. |
protected void |
processRequestingConnection(connect.ComponentEmissary requesting,
connect.ChannelBundle channels)
All implementers should extends this method to define their behavior when another component connects. |
connect.CreatesConnection |
provideConnection(ucav.UCAVInfo uav)
For a specific (@link UCAV}, return the CreatesConnection that will
connect to it. |
| Methods inherited from class connect.socket.SocketComponentTemplate |
connect, getComponentEmissary, getConnection, processRelayPoint, spawnRelayPoint |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private final Map ucavInfoToConnection
private final Set permittedConnections
private final util.SinglePermitMap ucavToChannels
UCAV to ChannelBundle.
A single permit map is used to control access to a ucav between
threads.
private final Map idToUCAV
private int nextID
private boolean serverConnected
private connect.CreatesConnection toServer
private static boolean debug
private util.ConsumerQueue serverQueue
Server.
| Constructor Detail |
public SimulatorUCAVManager(int port)
| Method Detail |
protected boolean accept(Class requestingType)
SocketComponentTemplate
accept in class SocketComponentTemplatepublic int getSourceType()
protected boolean allowMethod(util.MethodRequest request)
SocketComponentTemplate
allowMethod in class SocketComponentTemplate
public void attackWithUCAV(ucav.UCAV ucavObject,
objects.Targetable t)
UCAV.dropBomb request when the ucav is in the
appropriate position. An attack request is viewed as an atomic
action that cannot be int1errupted.
private ucav.UCAV bind(ucav.UCAV ucavObject)
SimulatorUCAV associated with this UCAVObject. This method is necessary to bind the Server representation of the UCAV to the ComponentizedSimulator representation of the object. The
UCAVManager can only communicate with the simulator version of
the object. Note that this method looks for the SimulatorUCAV
that is closest to the UCAVObject.
public List getAvailableUCAVs()
UCAVManagerUCAVs that are not currently assigned to a
mission.
getAvailableUCAVs in interface UCAVManagerprotected int getMaxPoints()
RelayPoint may be created.
getMaxPoints in class SocketComponentTemplateSocketComponentTemplate.spawnRelayPoint(int)public int getNextConnection()
public List getUCAVConnections()
UCAVManagerCreatesConnections for all UCAVs
connected to this manager.
getUCAVConnections in interface UCAVManager
public void moveUnit(ucav.UCAV ucavObject,
objects.Locatable loc)
private int nextUCAVID()
protected void processAcceptedConnection(Class hostType,
connect.ChannelBundle channels)
Server.
processAcceptedConnection in class SocketComponentTemplate
protected void processRequestingConnection(connect.ComponentEmissary requesting,
connect.ChannelBundle channels)
SocketComponentTemplate
processRequestingConnection in class SocketComponentTemplateprivate void debug(String s)
public connect.CreatesConnection provideConnection(ucav.UCAVInfo uav)
UCAVManagerCreatesConnection that will
connect to it.
provideConnection in interface UCAVManagerpublic static void main(String[] args)
|
Boeing Simulation 3.1 API Specification | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||