Module DetectionManager
This module contains the DETECTION_MANAGER class and derived classes.
1) DetectionManager#DETECTION_MANAGER class, extends Base#BASE
The DetectionManager#DETECTION_MANAGER class defines the core functions to report detected objects to groups. Reportings can be done in several manners, and it is up to the derived classes if DETECTION_MANAGER to model the reporting behaviour.
1.1) DETECTION_MANAGER constructor:
* DetectionManager#DETECTION_MANAGER.New(): Create a new DETECTION_MANAGER instance.
1.2) DETECTION_MANAGER reporting:
Derived DETECTION_MANAGER classes will reports detected units using the method DetectionManager#DETECTION_MANAGER.ReportDetected(). This method implements polymorphic behaviour.
The time interval in seconds of the reporting can be changed using the methods DetectionManager#DETECTION_MANAGER.SetReportInterval(). To control how long a reporting message is displayed, use DetectionManager#DETECTION_MANAGER.SetReportDisplayTime(). Derived classes need to implement the method DetectionManager#DETECTION_MANAGER.GetReportDisplayTime() to use the correct display time for displayed messages during a report.
Reporting can be started and stopped using the methods DetectionManager#DETECTION_MANAGER.StartReporting() and DetectionManager#DETECTION_MANAGER.StopReporting() respectively. If an ad-hoc report is requested, use the method DetectionManager#DETECTION_MANAGER().
The default reporting interval is every 60 seconds. The reporting messages are displayed 15 seconds.
2) DetectionManager#DETECTION_REPORTING class, extends DetectionManager#DETECTION_MANAGER
The DetectionManager#DETECTION_REPORTING class implements detected units reporting. Reporting can be controlled using the reporting methods available in the DetectionManager#DETECTION_MANAGER class.
2.1) DETECTION_REPORTING constructor:
The DetectionManager#DETECTION_REPORTING.New() method creates a new DETECTION_REPORTING instance.
3) #DETECTION_DISPATCHER class, extends #DETECTION_MANAGER
The #DETECTION_DISPATCHER 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...
3.1) DETECTION_DISPATCHER constructor:
The DETECTION_DISPATCHER.New() method creates a new DETECTION_DISPATCHER instance.
Contributions: Mechanist, Prof_Hilactic, FlightControl - Concept & Testing
Author: FlightControl - Framework Design & Programming
Global(s)
| DETECTION_DISPATCHER | |
| DETECTION_MANAGER | |
| DETECTION_REPORTING |
Type DETECTION_DISPATCHER
| DETECTION_DISPATCHER.ClassName | |
| DETECTION_DISPATCHER.CommandCenter | |
| DETECTION_DISPATCHER.Detection |
The DETECTION_BASE object that is used to report the detected objects. |
| DETECTION_DISPATCHER:EvaluateBAI(DetectedArea, FriendlyCoalition) |
Creates a BAI task when there are targets for it. |
| DETECTION_DISPATCHER:EvaluateCAS(DetectedArea) |
Creates a CAS task when there are targets for it. |
| DETECTION_DISPATCHER:EvaluateRemoveTask(Mission, Task, DetectedArea) |
Evaluates the removal of the Task from the Mission. |
| DETECTION_DISPATCHER:EvaluateSEAD(DetectedArea) |
Creates a SEAD task when there are targets for it. |
| DETECTION_DISPATCHER.Mission | |
| DETECTION_DISPATCHER:New(SetGroup, Detection, Mission, CommandCenter) |
DETECTION_DISPATCHER constructor. |
| DETECTION_DISPATCHER:ProcessDetected(Detection) |
Assigns tasks in relation to the detected items to the Set#SET_GROUP. |
| DETECTION_DISPATCHER.SetGroup |
The groups to which the FAC will report to. |
Type DETECTION_MANAGER
| DETECTION_MANAGER.ClassName | |
| DETECTION_MANAGER.Detection |
The DETECTION_BASE object that is used to report the detected objects. |
| DETECTION_MANAGER.FacScheduler | |
| DETECTION_MANAGER:GetReportDisplayTime() |
Get the reporting message display time. |
| DETECTION_MANAGER:New(SetGroup, Detection) |
FAC constructor. |
| DETECTION_MANAGER:ReportDetected(Detection) |
Reports the detected items to the Set#SET_GROUP. |
| DETECTION_MANAGER:Schedule(DelayTime, ReportInterval) |
Schedule the FAC reporting. |
| DETECTION_MANAGER.SetGroup |
The groups to which the FAC will report to. |
| DETECTION_MANAGER:SetReportDisplayTime(ReportDisplayTime) |
Set the reporting message display time. |
| DETECTION_MANAGER:SetReportInterval(ReportInterval) |
Set the reporting time interval. |
| DETECTION_MANAGER:_FacScheduler(SchedulerName) |
Report the detected Unit#UNITs detected within the Detection#DETECTION_BASE object to the Set#SET_GROUPs. |
| DETECTION_MANAGER._ReportDisplayTime | |
| DETECTION_MANAGER._ReportInterval | |
| DETECTION_MANAGER._ScheduleDelayTime |
Type DETECTION_REPORTING
| DETECTION_REPORTING.ClassName | |
| DETECTION_REPORTING.Detection |
The DETECTION_BASE object that is used to report the detected objects. |
| DETECTION_REPORTING:GetDetectedItemsText(DetectedSet) |
Creates a string of the detected items in a Detection. |
| DETECTION_REPORTING:New(SetGroup, Detection) |
DETECTION_REPORTING constructor. |
| DETECTION_REPORTING:ProcessDetected(Group, Detection) |
Reports the detected items to the Set#SET_GROUP. |
| DETECTION_REPORTING.SetGroup |
The groups to which the FAC will report to. |
Global(s)
Type DetectionManager
Type DETECTION_DISPATCHER
DETECTION_DISPATCHER class.
Field(s)
- #string DETECTION_DISPATCHER.ClassName
- Functional.Detection#DETECTION_BASE DETECTION_DISPATCHER.Detection
-
The DETECTION_BASE object that is used to report the detected objects.
- DETECTION_DISPATCHER:EvaluateBAI(DetectedArea, FriendlyCoalition)
-
Creates a BAI task when there are targets for it.
Parameters
-
Functional.Detection#DETECTION_AREAS.DetectedArea DetectedArea: -
FriendlyCoalition:
Return value
-
- DETECTION_DISPATCHER:EvaluateCAS(DetectedArea)
-
Creates a CAS task when there are targets for it.
Parameter
-
Functional.Detection#DETECTION_AREAS.DetectedArea DetectedArea:
Return value
-
- DETECTION_DISPATCHER:EvaluateRemoveTask(Mission, Task, DetectedArea)
-
Evaluates the removal of the Task from the Mission.
Can only occur when the DetectedArea is Changed AND the state of the Task is "Planned".
Parameters
-
Tasking.Mission#MISSION Mission: -
Tasking.Task#TASK Task: -
Functional.Detection#DETECTION_AREAS.DetectedArea DetectedArea:
Return value
-
- DETECTION_DISPATCHER:EvaluateSEAD(DetectedArea)
-
Creates a SEAD task when there are targets for it.
Parameter
-
Functional.Detection#DETECTION_AREAS.DetectedArea DetectedArea:
Return values
-
Set#SET_UNIT: TargetSetUnit: The target set of units.
-
#nil: If there are no targets to be set.
-
- DETECTION_DISPATCHER:New(SetGroup, Detection, Mission, CommandCenter)
-
DETECTION_DISPATCHER constructor.
Parameters
-
Set#SET_GROUP SetGroup: -
Functional.Detection#DETECTION_BASE Detection: -
Mission: -
CommandCenter:
Return value
#DETECTION_DISPATCHER: self
-
- DETECTION_DISPATCHER:ProcessDetected(Detection)
-
Assigns tasks in relation to the detected items to the Set#SET_GROUP.
Parameter
-
Functional.Detection#DETECTION_AREAS Detection: The detection created by the Detection#DETECTION_AREAS object.
Return value
#boolean: Return true if you want the task assigning to continue... false will cancel the loop.
-
- Set#SET_GROUP DETECTION_DISPATCHER.SetGroup
-
The groups to which the FAC will report to.
Type DETECTION_MANAGER
DETECTION_MANAGER class.
Field(s)
- #string DETECTION_MANAGER.ClassName
- Functional.Detection#DETECTION_BASE DETECTION_MANAGER.Detection
-
The DETECTION_BASE object that is used to report the detected objects.
- DETECTION_MANAGER:GetReportDisplayTime()
-
Get the reporting message display time.
Return value
#number: ReportDisplayTime The display time in seconds when a report needs to be done.
- DETECTION_MANAGER:New(SetGroup, Detection)
-
FAC constructor.
Parameters
-
Set#SET_GROUP SetGroup: -
Functional.Detection#DETECTION_BASE Detection:
Return value
#DETECTION_MANAGER: self
-
- DETECTION_MANAGER:ReportDetected(Detection)
-
Reports the detected items to the Set#SET_GROUP.
Parameter
-
Functional.Detection#DETECTION_BASE Detection:
Return value
#DETECTION_MANAGER: self
-
- DETECTION_MANAGER:Schedule(DelayTime, ReportInterval)
-
Schedule the FAC reporting.
Parameters
-
#number DelayTime: The delay in seconds to wait the reporting. -
#number ReportInterval: The repeat interval in seconds for the reporting to happen repeatedly.
Return value
#DETECTION_MANAGER: self
-
- Set#SET_GROUP DETECTION_MANAGER.SetGroup
-
The groups to which the FAC will report to.
- DETECTION_MANAGER:SetReportDisplayTime(ReportDisplayTime)
-
Set the reporting message display time.
Parameter
-
#number ReportDisplayTime: The display time in seconds when a report needs to be done.
Return value
#DETECTION_MANAGER: self
-
- DETECTION_MANAGER:SetReportInterval(ReportInterval)
-
Set the reporting time interval.
Parameter
-
#number ReportInterval: The interval in seconds when a report needs to be done.
Return value
#DETECTION_MANAGER: self
-
- DETECTION_MANAGER:_FacScheduler(SchedulerName)
-
Report the detected Unit#UNITs detected within the Detection#DETECTION_BASE object to the Set#SET_GROUPs.
Parameter
-
SchedulerName:
-
Type DETECTION_REPORTING
DETECTION_REPORTING class.
Field(s)
- #string DETECTION_REPORTING.ClassName
- Functional.Detection#DETECTION_BASE DETECTION_REPORTING.Detection
-
The DETECTION_BASE object that is used to report the detected objects.
- DETECTION_REPORTING:GetDetectedItemsText(DetectedSet)
-
Creates a string of the detected items in a Detection.
Parameter
-
Set#SET_UNIT DetectedSet: The detected Set created by the Detection#DETECTION_BASE object.
Return value
#DETECTION_MANAGER: self
-
- DETECTION_REPORTING:New(SetGroup, Detection)
-
DETECTION_REPORTING constructor.
Parameters
-
Set#SET_GROUP SetGroup: -
Functional.Detection#DETECTION_AREAS Detection:
Return value
#DETECTION_REPORTING: self
-
- DETECTION_REPORTING:ProcessDetected(Group, Detection)
-
Reports the detected items to the Set#SET_GROUP.
Parameters
-
Wrapper.Group#GROUP Group: The Group object to where the report needs to go. -
Functional.Detection#DETECTION_AREAS Detection: The detection created by the Detection#DETECTION_BASE object.
Return value
#boolean: Return true if you want the reporting to continue... false will cancel the reporting loop.
-
- Set#SET_GROUP DETECTION_REPORTING.SetGroup
-
The groups to which the FAC will report to.