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#FAC_REPORTING class, extends DetectionManager#DETECTION_MANAGER
The DetectionManager#FAC_REPORTING class implements detected units reporting. Reporting can be controlled using the reporting methods available in the DetectionManager#DETECTION_MANAGER class.
2.1) FAC_REPORTING constructor:
The DetectionManager#FAC_REPORTING.New() method creates a new FAC_REPORTING instance.
Contributions: Mechanic, Prof_Hilactic, FlightControl - Concept & Testing
Author: FlightControl - Framework Design & Programming
Global(s)
| DETECTION_MANAGER | |
| FAC_REPORTING | |
| TASK_DISPATCHER |
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 FAC_REPORTING
| FAC_REPORTING.ClassName | |
| FAC_REPORTING.Detection |
The DETECTION_BASE object that is used to report the detected objects. |
| FAC_REPORTING:GetDetectedItemsText(DetectedSet) |
Creates a string of the detected items in a Detection. |
| FAC_REPORTING:New(SetGroup, Detection) |
FAC_REPORTING constructor. |
| FAC_REPORTING:ProcessDetected(Group, Detection) |
Reports the detected items to the Set#SET_GROUP. |
| FAC_REPORTING.SetGroup |
The groups to which the FAC will report to. |
Type TASK_DISPATCHER
| TASK_DISPATCHER.ClassName | |
| TASK_DISPATCHER.CommandCenter | |
| TASK_DISPATCHER.Detection |
The DETECTION_BASE object that is used to report the detected objects. |
| TASK_DISPATCHER:EvaluateTaskCAS(Mission, DetectedArea) |
Creates a CAS task when there are targets for it. |
| TASK_DISPATCHER:EvaluateTaskSEAD(Mission, DetectedArea) |
Creates a SEAD task when there are targets for it. |
| TASK_DISPATCHER:GetDetectedItemsText(DetectedSet) |
Creates a string of the detected items in a Detection. |
| TASK_DISPATCHER.Mission | |
| TASK_DISPATCHER:New(SetGroup, Detection, Mission, CommandCenter) |
TASK_DISPATCHER constructor. |
| TASK_DISPATCHER:ProcessDetected(Group, Detection, TaskGroup) |
Assigns tasks in relation to the detected items to the Set#SET_GROUP. |
| TASK_DISPATCHER.SetGroup |
The groups to which the FAC will report to. |
Global(s)
Type DetectionManager
Type DETECTION_MANAGER
DETECTION_MANAGER class.
Field(s)
- #string DETECTION_MANAGER.ClassName
- 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: -
Detection#DETECTION_BASE Detection:
Return value
#DETECTION_MANAGER: self
-
- DETECTION_MANAGER:ReportDetected(Detection)
-
Reports the detected items to the Set#SET_GROUP.
Parameter
-
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 FAC_REPORTING
FAC_REPORTING class.
Field(s)
- #string FAC_REPORTING.ClassName
- Detection#DETECTION_BASE FAC_REPORTING.Detection
-
The DETECTION_BASE object that is used to report the detected objects.
- FAC_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
-
- FAC_REPORTING:New(SetGroup, Detection)
-
FAC_REPORTING constructor.
Parameters
-
Set#SET_GROUP SetGroup: -
Detection#DETECTION_UNITGROUPS Detection:
Return value
#FAC_REPORTING: self
-
- FAC_REPORTING:ProcessDetected(Group, Detection)
-
Reports the detected items to the Set#SET_GROUP.
Parameters
-
Group#GROUP Group: The Group object to where the report needs to go. -
Detection#DETECTION_UNITGROUPS 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 FAC_REPORTING.SetGroup
-
The groups to which the FAC will report to.
Type TASK_DISPATCHER
TASK_DISPATCHER class.
Field(s)
- #string TASK_DISPATCHER.ClassName
- Detection#DETECTION_BASE TASK_DISPATCHER.Detection
-
The DETECTION_BASE object that is used to report the detected objects.
- TASK_DISPATCHER:EvaluateTaskCAS(Mission, DetectedArea)
-
Creates a CAS task when there are targets for it.
Parameters
-
Mission#MISSION Mission: -
Detection#DETECTION_UNITGROUPS.DetectedArea DetectedArea:
Return value
#string: Message explaining which task was added.
-
- TASK_DISPATCHER:EvaluateTaskSEAD(Mission, DetectedArea)
-
Creates a SEAD task when there are targets for it.
Parameters
-
Mission#MISSION Mission: -
Detection#DETECTION_UNITGROUPS.DetectedArea DetectedArea:
Return value
#string: Message explaining which task was added.
-
- TASK_DISPATCHER: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
#string: The text
-
- TASK_DISPATCHER:New(SetGroup, Detection, Mission, CommandCenter)
-
TASK_DISPATCHER constructor.
Parameters
-
Set#SET_GROUP SetGroup: -
Detection#DETECTION_BASE Detection: -
Mission: -
CommandCenter:
Return value
#TASK_DISPATCHER: self
-
- TASK_DISPATCHER:ProcessDetected(Group, Detection, TaskGroup)
-
Assigns tasks in relation to the detected items to the Set#SET_GROUP.
Parameters
-
Group#GROUP Group: The Group object to where the report needs to go. -
Detection#DETECTION_UNITGROUPS Detection: The detection created by the Detection#DETECTION_UNITGROUPS object. -
TaskGroup:
Return value
#boolean: Return true if you want the task assigning to continue... false will cancel the loop.
-
- Set#SET_GROUP TASK_DISPATCHER.SetGroup
-
The groups to which the FAC will report to.