Module Task_A2G_Dispatcher

Tasking - The TASKA2GDISPATCHER creates and manages player TASK_A2G tasks based on detected targets.


Author: Sven Van de Velde (FlightControl)

Contributions:


Global(s)

TASK_A2G_DISPATCHER

TASKA2GDISPATCHE} class, extends #DETECTION_MANAGER

The TASKA2GDISPATCHER class implements the dynamic dispatching of tasks upon groups of detected units determined a Set of FAC (groups).

Type TASK_A2G_DISPATCHER

TASK_A2G_DISPATCHER.Detection

The DETECTION_BASE object that is used to report the detected objects.

TASK_A2G_DISPATCHER:EvaluateBAI(DetectedItem, FriendlyCoalition)

Creates a BAI task when there are targets for it.

TASK_A2G_DISPATCHER:EvaluateCAS(DetectedItem)

Creates a CAS task when there are targets for it.

TASK_A2G_DISPATCHER:EvaluateRemoveTask(Mission, Task, DetectedItemID, DetectedItemChange, TaskIndex, DetectedItemChanged)

Evaluates the removal of the Task from the Mission.

TASK_A2G_DISPATCHER:EvaluateSEAD(DetectedItem)

Creates a SEAD task when there are targets for it.

TASK_A2G_DISPATCHER.Mission
TASK_A2G_DISPATCHER:New(Mission, SetGroup, Detection)

TASKA2GDISPATCHER constructor.

TASK_A2G_DISPATCHER:OnAfterAssign(From, Event, To, Task, TaskUnit, PlayerName)

OnAfter Transition Handler for Event Assign.

TASK_A2G_DISPATCHER:ProcessDetected(Detection)

Assigns tasks in relation to the detected items to the Set#SET_GROUP.

TASK_A2G_DISPATCHER:RemoveTask(TaskIndex)
TASK_A2G_DISPATCHER.SetGroup

The groups to which the FAC will report to.

Global(s)

#TASK_A2G_DISPATCHER TASK_A2G_DISPATCHER

TASKA2GDISPATCHE} class, extends #DETECTION_MANAGER

The TASKA2GDISPATCHER class implements the dynamic dispatching of tasks upon groups of detected units determined a Set of FAC (groups).

The FAC will detect units, will group them, and will dispatch Tasks to groups. Depending on the type of target detected, different tasks will be dispatched. Find a summary below describing for which situation a task type is created:

  • CAS Task: Is created when there are enemy ground units within range of the FAC, while there are friendly units in the FAC perimeter.
  • BAI Task: Is created when there are enemy ground units within range of the FAC, while there are NO other friendly units within the FAC perimeter.
  • SEAD Task: Is created when there are enemy ground units wihtin range of the FAC, with air search radars.

Other task types will follow...

TASKA2GDISPATCHER constructor

The TASKA2GDISPATCHER.New() method creates a new TASKA2GDISPATCHER instance.

Type Task_A2G_Dispatcher

Type TASK_A2G_DISPATCHER

TASKA2GDISPATCHER class.

Field(s)

Functional.Detection#DETECTION_BASE TASK_A2G_DISPATCHER.Detection

The DETECTION_BASE object that is used to report the detected objects.

TASK_A2G_DISPATCHER:EvaluateBAI(DetectedItem, FriendlyCoalition)

Creates a BAI task when there are targets for it.

Parameters

Return values

  1. Core.Set#SET_UNIT: TargetSetUnit: The target set of units.

  2. #nil: If there are no targets to be set.

TASK_A2G_DISPATCHER:EvaluateCAS(DetectedItem)

Creates a CAS task when there are targets for it.

Parameter

Return values

  1. Core.Set#SET_UNIT: TargetSetUnit: The target set of units.

  2. #nil: If there are no targets to be set.

TASK_A2G_DISPATCHER:EvaluateRemoveTask(Mission, Task, DetectedItemID, DetectedItemChange, TaskIndex, DetectedItemChanged)

Evaluates the removal of the Task from the Mission.

Can only occur when the DetectedItem is Changed AND the state of the Task is "Planned".

Parameters

Return value

Tasking.Task#TASK:

TASK_A2G_DISPATCHER:EvaluateSEAD(DetectedItem)

Creates a SEAD task when there are targets for it.

Parameter

Return values

  1. Core.Set#SET_UNIT: TargetSetUnit: The target set of units.

  2. #nil: If there are no targets to be set.

Tasking.Mission#MISSION TASK_A2G_DISPATCHER.Mission
TASK_A2G_DISPATCHER:New(Mission, SetGroup, Detection)

TASKA2GDISPATCHER constructor.

Parameters

Return value

#TASKA2GDISPATCHER: self

TASK_A2G_DISPATCHER:OnAfterAssign(From, Event, To, Task, TaskUnit, PlayerName)

OnAfter Transition Handler for Event Assign.

Parameters

TASK_A2G_DISPATCHER:ProcessDetected(Detection)

Assigns tasks in relation to the detected items to the Set#SET_GROUP.

Parameter

Return value

#boolean: Return true if you want the task assigning to continue... false will cancel the loop.

TASK_A2G_DISPATCHER:RemoveTask(TaskIndex)

Parameter

  • TaskIndex :

Set#SET_GROUP TASK_A2G_DISPATCHER.SetGroup

The groups to which the FAC will report to.