Boeing Simulation 3.1 API Specification

command
Class TargetControl

java.lang.Object
  |
  +--connect.socket.SocketComponentTemplate
        |
        +--command.TargetControl
All Implemented Interfaces:
Component

public class TargetControl
extends SocketComponentTemplate

A TargetControl is responsible for moving the objects that fall outside the jurisdiction of the CommandControl. In the current simulation, these objects may be of type Bus, Tank, or School. The TargetControl receives its information directly from the ComponentizedSimulator and issues commands directly to the units themselves. Commands are issues as MethodRequest objects since the units are responsible for moving themselves. Connections to the units are obtained by the SimulatorComponentGenerator.

Version:
Author:
Dave Jurgens

Field Summary
private  world.WorldState currentState
          The most recently sent WorldState that is provided by the ComponentizedSimulator.
static int DEFAULT_PORT
          The default port to initialize a TargetControl on.
private  PropertyChangeSupport pcs
          The bean by which the Visualizers will be notified of when the simulator updates this Component's current WorldState.
private static long serialVersionUID
           
private  boolean simulatorConnected
          Whether the simulator is currently connected.
private  Map unitToBundle
          A map from any known unit to the ChannelBundle through which this component may communicate to it.
 
Fields inherited from class connect.socket.SocketComponentTemplate
portNumber
 
Constructor Summary
TargetControl()
           
TargetControl(int port)
           
 
Method Summary
protected  boolean accept(Class requestingType)
          Returns true only if the requesting component is a Command Control visualizer.
protected  boolean allowMethod(util.MethodRequest request)
          Allows visualizers to request the method BasicCommandControl.requestMission(mission.Mission).
protected  void processAcceptedConnection(Class hostType, connect.ChannelBundle acceptedConnection)
          Processes requests from a single connection to the ComponentizedSimulator and no other component.
protected  void processRequestingConnection(connect.ComponentEmissary requesting, connect.ChannelBundle incomingConnection)
          Process an accepted request from a GraphicalTCVisualizer.
 void requestMission(Set units, objects.Locatable loc)
          Issues commands to all the units to move the specified location.
 
Methods inherited from class connect.socket.SocketComponentTemplate
connect, getComponentEmissary, getConnection, getMaxPoints, processRelayPoint, spawnRelayPoint
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

simulatorConnected

private boolean simulatorConnected
Whether the simulator is currently connected.


DEFAULT_PORT

public static final int DEFAULT_PORT
The default port to initialize a TargetControl on.

See Also:
Constant Field Values

pcs

private PropertyChangeSupport pcs
The bean by which the Visualizers will be notified of when the simulator updates this Component's current WorldState.


unitToBundle

private final Map unitToBundle
A map from any known unit to the ChannelBundle through which this component may communicate to it.


currentState

private world.WorldState currentState
The most recently sent WorldState that is provided by the ComponentizedSimulator.

Constructor Detail

TargetControl

public TargetControl(int port)

TargetControl

public TargetControl()
Method Detail

requestMission

public void requestMission(Set units,
                           objects.Locatable loc)
Issues commands to all the units to move the specified location. If a unit in the set is not known about, no action is taken for that unit and no error occurs.


processRequestingConnection

protected void processRequestingConnection(connect.ComponentEmissary requesting,
                                           connect.ChannelBundle incomingConnection)
Process an accepted request from a GraphicalTCVisualizer.

Specified by:
processRequestingConnection in class SocketComponentTemplate

processAcceptedConnection

protected void processAcceptedConnection(Class hostType,
                                         connect.ChannelBundle acceptedConnection)
Processes requests from a single connection to the ComponentizedSimulator and no other component.

Specified by:
processAcceptedConnection in class SocketComponentTemplate

accept

protected boolean accept(Class requestingType)
Returns true only if the requesting component is a Command Control visualizer.

Specified by:
accept in class SocketComponentTemplate

allowMethod

protected boolean allowMethod(util.MethodRequest request)
Allows visualizers to request the method BasicCommandControl.requestMission(mission.Mission).

Specified by:
allowMethod in class SocketComponentTemplate

Boeing Simulation 3.1 API Specification

To submit a bug or feature email the author of that class. Funding for this research was provided by Boeing and DARPA.