public abstract class Strategic extends Object implements Runnable
Modifier and Type | Field and Description |
---|---|
static String |
CONFIG_DIR |
static String |
CONFIG_FILE |
static String |
LOG_FILE |
static String |
MISSION_DIR |
static String |
MISSION_FILE |
Modifier | Constructor and Description |
---|---|
protected |
Strategic(Execution passedExecutionLevel,
VehicleCharacteristics passedVehicleCharacteristics,
AvclMission passedAvclMission)
Creates a new instance of Strategic
|
protected |
Strategic(VehicleCharacteristics chars,
AvclMission mission,
boolean networkComms)
Creates a new instance of Strategic that does not have an execution level object on this JVM
|
Modifier and Type | Method and Description |
---|---|
abstract void |
createContaminantRecordEvent(int contaminant,
int pType,
double x,
double y,
int vType,
double v1,
double v2,
String description)
Creates an event log element for a contaminant detection or removal event
|
static Strategic |
createStrategicLevel(Execution execution,
VehicleCharacteristics chars,
AvclMission mission) |
AvclPlannerFlowController |
getAvclPlannerFlowController() |
GeoAreaSet |
getAvoidAreaSet() |
int |
getCurrentGoalStatus() |
Execution |
getExecution() |
AvclMission |
getMission() |
static double |
getMissionTime() |
Tactical |
getTactical() |
TacticalConnection |
getTacticalComms() |
VehicleCharacteristics |
getVehicleCharacteristics() |
void |
incrementMissionStateMachine()
Increments the mission state machine (if required) based on the status of the currently executing goal
|
abstract void |
logContactEvent(int contactID,
String name,
int pType,
double x,
double y,
double heading,
double velocity,
int vType,
double v1,
double v2,
String description)
Creates an event log element for a contact detection or update
|
abstract void |
logEvent(Object event)
Logs an event
|
abstract void |
logGoalStatusEvent(Object goal,
String status,
String description)
Creates an event log element for a change in goal execution status
|
abstract void |
logSignalOfInterestEvent(double frequency,
int units,
String content,
String description)
Creates an event log element for a signal of interest detection
|
abstract void |
logVehicleStatusEvent(String system,
String status,
String description)
Creates an event log element for a change in vehicle status
|
void |
marshalLog()
Marshals the mission log object
|
static void |
parseArguments(String[] arguments) |
void |
processIVMessage(AvclMessage message)
Processes a message received from another vehicle
|
String |
readMessageFromTactical() |
protected void |
reportEvent(Object evt) |
void |
run()
Implementation of the Runnable interface
|
void |
sendCommandScriptElementListToTactical(List<JAXBElement<?>> cmdElementList)
Sends a sequential List of AVCL commands to the tactical level for execution
|
void |
sendMessageToTactical(String msg)
Writes a message to the tactical level
|
void |
setAvclPlannerFlowController(AvclPlannerFlowController controller) |
void |
setExecution(Execution execution)
Sets the execution level of the controller
|
void |
setIVCommunicator(CommunicationsHandler ivComms)
Sets the communicator object in the planners so that they can communicate with other vehicles
|
void |
setTactical(Tactical tactical)
Sets the tactical level of the controller
|
void |
setWorldModel(WorldModel world)
Sets the world model that the planners are to use
|
static void |
startTiming()
Starts the Strategic Level clock
|
public static final String MISSION_DIR
public static String MISSION_FILE
public static final String CONFIG_DIR
public static String CONFIG_FILE
public static String LOG_FILE
protected Strategic(Execution passedExecutionLevel, VehicleCharacteristics passedVehicleCharacteristics, AvclMission passedAvclMission)
passedExecutionLevel
- reference to the execution level object of the vehiclepassedVehicleCharacteristics
- defines what goals the vehicle is capable of completing and how it will do sopassedAvclMission
- AVCL mission object (JAXB) containing the declarative mission being runprotected Strategic(VehicleCharacteristics chars, AvclMission mission, boolean networkComms)
chars
- defines what goals the vehicle is capable of completing and how it will do somission
- AVCL mission object (JAXB) containing the declarative mission being runnetworkComms
- set to true if tactical level communications are networked, false if threadedpublic abstract void logEvent(Object event)
event
- eventpublic abstract void logGoalStatusEvent(Object goal, String status, String description)
goal
- the goal to which the change in status appliesstatus
- a description of the status changedescription
- value of the goal status element's description fieldpublic abstract void logVehicleStatusEvent(String system, String status, String description)
system
- the effected vehicle systemstatus
- a description of the new status of the effected systemdescription
- value of the goal status element's description fieldpublic abstract void logSignalOfInterestEvent(double frequency, int units, String content, String description)
frequency
- frequencyunits
- enumeration for the units of the signal frequencycontent
- any loggable signal contentdescription
- value of the signal of interest element's description attributepublic abstract void logContactEvent(int contactID, String name, int pType, double x, double y, double heading, double velocity, int vType, double v1, double v2, String description)
contactID
- numerical identifier of the contactname
- string identifier of the contactpType
- enumeration for the type of position (Cartesian or latitude/longitude)x
- X or latitude coordinate of the contacty
- Y or longitude coordinate of the contactheading
- heading (degrees) of the contactvelocity
- speed (meters per second) of the contactvType
- enumeration for the type of vertical component of the contactv1
- a depth or altitudev2
- a depth or altitudedescription
- value of the contact element description attributepublic abstract void createContaminantRecordEvent(int contaminant, int pType, double x, double y, int vType, double v1, double v2, String description)
contaminant
- enumeration identifying the type of contaminantpType
- enumeration for the type of position (Cartesian or latitude/longitude)x
- X or latitude coordinate of the contacty
- Y or longitude coordinate of the contactvType
- enumeration for the type of vertical component of the contaminantv1
- a depth or altitudev2
- a depth or altitudedescription
- value of the contact element description attributepublic static Strategic createStrategicLevel(Execution execution, VehicleCharacteristics chars, AvclMission mission)
execution
- execution level object (AUV, USV, UGV, or UAV)chars
- defines what goals the vehicle is capable of completing and how it will do somission
- AVCL mission object (JAXB)public AvclMission getMission()
public Execution getExecution()
public Tactical getTactical()
public void setIVCommunicator(CommunicationsHandler ivComms)
ivComms
- public GeoAreaSet getAvoidAreaSet()
public static void startTiming()
public static double getMissionTime()
public VehicleCharacteristics getVehicleCharacteristics()
public TacticalConnection getTacticalComms()
public void sendMessageToTactical(String msg)
msg
- String message that is to be writtenpublic String readMessageFromTactical()
public void sendCommandScriptElementListToTactical(List<JAXBElement<?>> cmdElementList)
cmdElementList
- sequential List of AVCL commands (JAXB) that are to be executed by the tactical levelpublic void setTactical(Tactical tactical)
tactical
- tactical level object being controlled by the strategic levelpublic void setWorldModel(WorldModel world)
world
- public void setExecution(Execution execution)
execution
- execution level object being controlled by the strategic levelpublic AvclPlannerFlowController getAvclPlannerFlowController()
public final void setAvclPlannerFlowController(AvclPlannerFlowController controller)
public void processIVMessage(AvclMessage message)
message
- public int getCurrentGoalStatus()
public void incrementMissionStateMachine()
public static void parseArguments(String[] arguments)
public void marshalLog()
public void run()
protected void reportEvent(Object evt)