|
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
|
+--uavmanager.SimulatorUAVManager
A socket-based implementation of UAVManager that communicates with
SimulatorUAV components.
UAV,
ucav.SimulatorUCAVManager,
ComponentizedSimulator| Field Summary | |
private Map |
idToUAV
Maps the unique ID of the uav to the ucav itself. |
private int |
nextID
|
private Set |
permittedConnections
A set containing the class type of all components that are allowed to connect to this component. |
private boolean |
serverConnected
Flag indicating the current connection status with the server. |
private util.ConsumerQueue |
serverQueue
The queue structure that will hold objects sent by the Server. |
private static boolean |
SHOW_REQUESTS
Flag indicating whether this class will show the method requests it receives. |
private connect.CreatesConnection |
toServer
A link back to the server. |
private Map |
uavInfoToConnection
|
private util.SinglePermitMap |
uavToChannels
Map linking UAV to ChannelBundle. |
| Fields inherited from class connect.socket.SocketComponentTemplate |
portNumber |
| Constructor Summary | |
SimulatorUAVManager(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. |
private uav.UAV |
bind(uav.UAV uavObject)
Returns the SimulatorUAV associated with this UAVObject. |
protected int |
getMaxPoints()
Returns 1 so that a single RelayPoint may be created. |
int |
getNextConnection()
|
int |
getSourceType()
|
Set |
getUAVConnections()
Returns a colletion of all the CreatesConnection
objects associated with the connected UAV
components. |
static void |
main(String[] args)
|
void |
moveUnit(uav.UAV uavObject,
objects.Locatable loc)
Acquires the channel resources for the uav, and then sends a request that the ucav for the uav to begin moving to the location. |
private int |
nextUAVID()
|
protected void |
processAcceptedConnection(Class hostType,
connect.ChannelBundle channels)
When a component connects to the component that it requested the connection to, this method is called. |
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(uav.UAVInfo uav)
Returns the CreatesConnection based upon the argument. |
| 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 int nextID
private final Set permittedConnections
private boolean serverConnected
private util.ConsumerQueue serverQueue
Server.
private static final boolean SHOW_REQUESTS
private connect.CreatesConnection toServer
private final Map idToUAV
private final Map uavInfoToConnection
private final util.SinglePermitMap uavToChannels
UAV to ChannelBundle. A single
permit map is used to control access to a ucav between
threads.
| Constructor Detail |
public SimulatorUAVManager(int port)
| Method Detail |
public int getSourceType()
protected boolean accept(Class requestingType)
SocketComponentTemplate
accept in class SocketComponentTemplateprotected boolean allowMethod(util.MethodRequest request)
SocketComponentTemplate
allowMethod in class SocketComponentTemplateprivate uav.UAV bind(uav.UAV uavObject)
SimulatorUAV associated with this UAVObject. This method is necessary to bind the Server representation of the UAV to the ComponentizedSimulator representation of the object. The
UAVManager can only communicate with the simulator version of
the object. Note that this method looks for the SimulatorUAV
that is closest to the UAVObject.
protected int getMaxPoints()
RelayPoint may be created.
getMaxPoints in class SocketComponentTemplateSocketComponentTemplate.spawnRelayPoint(int)public int getNextConnection()
public Set getUAVConnections()
UAVManagerCreatesConnection
objects associated with the connected UAV
components.
getUAVConnections in interface UAVManager
public void moveUnit(uav.UAV uavObject,
objects.Locatable loc)
public connect.CreatesConnection provideConnection(uav.UAVInfo uav)
UAVManager
provideConnection in interface UAVManager
protected void processAcceptedConnection(Class hostType,
connect.ChannelBundle channels)
SocketComponentTemplate
processAcceptedConnection in class SocketComponentTemplate
protected void processRequestingConnection(connect.ComponentEmissary requesting,
connect.ChannelBundle channels)
SocketComponentTemplate
processRequestingConnection in class SocketComponentTemplateprivate int nextUAVID()
public 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 | ||||||||||