Boeing Simulation 3.1 API Specification

command.visualizer
Class GraphicalCCVisualizer

java.lang.Object
  |
  +--visualizer.SocketVisualizerTemplate
        |
        +--command.visualizer.GraphicalCCVisualizer
All Implemented Interfaces:
CommandControlVisualizer

public class GraphicalCCVisualizer
extends SocketVisualizerTemplate
implements CommandControlVisualizer

A visualizer designed to interact with an currently operating Command Control component. Mouse clicks are interpreted as different commands, based on the click location and the target on screen. The result of these clicks can be sent to the Command Control component to be sent out as a Mission request.

Version:
$Revision: 1.9 $
Author:
Dave Jurgens

Field Summary
protected static double CLICK_SIGNIFICANCE
          The distance on the unit square at which the user's click is defined as clicking on a displayed object.
private  world.WorldState currentState
          The most recent WorldState sent by the CommandControl.
private  List followingTargets
          The List of all target to be continuously followed that are currently selected for the Mission waiting to be sent.
private static long serialVersionUID
          This is hard-coded for cross-machine compatibility.
private  boolean targetListed
          Whether selected objects are added to the target list.
private  List targets
          The List of all target currently selected for the Mission waiting to be sent.
private  connect.SupplierChannel toCommandControl
          The supplier connection to the CommandControl that is connected.
private  boolean unitListed
          Whether selected objects are added to the units list.
private  List units
          The List of all units currently selected for the Mission waiting to be sent.
private  visualizer.WorldStateViz worldViz
          This visualization for the current WorldState.
 
Fields inherited from class visualizer.SocketVisualizerTemplate
 
Constructor Summary
GraphicalCCVisualizer(connect.CreatesConnection remoteComponent)
           
 
Method Summary
protected  void addFollowingTarget(objects.Location clickLoc)
          Identifies the closest non-Targetable object with in the significant range and add it to the list of units.
protected  void addTarget(objects.Location clickLoc)
          Identifies the closest non-Targetable object with in the significant range and add it to the list of units.
protected  void addUnit(objects.Location clickLoc)
          Identifies the closest non-Targetable object with in the significant range and add it to the list of units.
protected  void processAcceptedConnection(Class hostType, connect.ChannelBundle acceptedConnection)
          When a component connects to the component that it requested the connection to, this method is called.
private  void resetMission()
          Resets the current list of targets and units.
private  void sendMission()
          Send the Mission to the associated CommandControl if it is fully formed.
 
Methods inherited from class visualizer.SocketVisualizerTemplate
connect, getComponentEmissary
 
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
This is hard-coded for cross-machine compatibility.

See Also:
Constant Field Values

worldViz

private visualizer.WorldStateViz worldViz
This visualization for the current WorldState.


currentState

private world.WorldState currentState
The most recent WorldState sent by the CommandControl.


CLICK_SIGNIFICANCE

protected static final double CLICK_SIGNIFICANCE
The distance on the unit square at which the user's click is defined as clicking on a displayed object.

See Also:
Constant Field Values

targetListed

private boolean targetListed
Whether selected objects are added to the target list.


unitListed

private boolean unitListed
Whether selected objects are added to the units list.


units

private List units
The List of all units currently selected for the Mission waiting to be sent.


targets

private List targets
The List of all target currently selected for the Mission waiting to be sent.


followingTargets

private List followingTargets
The List of all target to be continuously followed that are currently selected for the Mission waiting to be sent.


toCommandControl

private connect.SupplierChannel toCommandControl
The supplier connection to the CommandControl that is connected.

Constructor Detail

GraphicalCCVisualizer

public GraphicalCCVisualizer(connect.CreatesConnection remoteComponent)
Method Detail

addUnit

protected void addUnit(objects.Location clickLoc)
Identifies the closest non-Targetable object with in the significant range and add it to the list of units.


addTarget

protected void addTarget(objects.Location clickLoc)
Identifies the closest non-Targetable object with in the significant range and add it to the list of units. If no object is located and the current list of units is all of type UAV, a Location will be put in the target list.


addFollowingTarget

protected void addFollowingTarget(objects.Location clickLoc)
Identifies the closest non-Targetable object with in the significant range and add it to the list of units.


processAcceptedConnection

protected void processAcceptedConnection(Class hostType,
                                         connect.ChannelBundle acceptedConnection)
Description copied from class: SocketVisualizerTemplate
When a component connects to the component that it requested the connection to, this method is called.

Specified by:
processAcceptedConnection in class SocketVisualizerTemplate

sendMission

private void sendMission()
Send the Mission to the associated CommandControl if it is fully formed. If it does not include both units and targets, reset all current lists of each.


resetMission

private void resetMission()
Resets the current list of targets and units.


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.