Module DetectionManager
This module contains the DETECTION_MANAGER class and derived classes.
1) DetectionManager#DETECTION_MANAGER class, extends Fsm#FSM
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.SetRefreshTimeInterval(). 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.
Contributions: Mechanist, Prof_Hilactic, FlightControl - Concept & Testing
Author: FlightControl - Framework Design & Programming
Global(s)
| DETECTION_MANAGER | |
| DETECTION_REPORTING |
Type DETECTION_MANAGER
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_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:OnAfterStart(From, Event, To)
-
Start Handler OnAfter for DETECTION_MANAGER
Parameters
-
#string From: -
#string Event: -
#string To:
-
- DETECTION_MANAGER:OnAfterStop(From, Event, To)
-
Stop Handler OnAfter for DETECTION_MANAGER
Parameters
-
#string From: -
#string Event: -
#string To:
-
- DETECTION_MANAGER:OnBeforeStart(From, Event, To)
-
Start Handler OnBefore for DETECTION_MANAGER
Parameters
-
#string From: -
#string Event: -
#string To:
Return value
#boolean:
-
- DETECTION_MANAGER:OnBeforeStop(From, Event, To)
-
Stop Handler OnBefore for DETECTION_MANAGER
Parameters
-
#string From: -
#string Event: -
#string To:
Return value
#boolean:
-
- DETECTION_MANAGER:ProcessDetected(Detection)
-
Reports the detected items to the Set#SET_GROUP.
Parameter
-
Functional.Detection#DETECTION_BASE Detection:
Return value
#DETECTION_MANAGER: self
-
- Set#SET_GROUP DETECTION_MANAGER.SetGroup
-
The groups to which the FAC will report to.
- DETECTION_MANAGER:SetRefreshTimeInterval(RefreshTimeInterval)
-
Set the reporting time interval.
Parameter
-
#number RefreshTimeInterval: The interval in seconds when a report needs to be done.
Return value
#DETECTION_MANAGER: self
-
- 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:Start()
-
Start Trigger for DETECTION_MANAGER
- DETECTION_MANAGER:Stop()
-
Stop Trigger for DETECTION_MANAGER
- DETECTION_MANAGER:__Start(Delay)
-
Start Asynchronous Trigger for DETECTION_MANAGER
Parameter
-
#number Delay:
-
- DETECTION_MANAGER:__Stop(Delay)
-
Stop Asynchronous Trigger for DETECTION_MANAGER
Parameter
-
#number Delay:
-
- DETECTION_MANAGER:onafterReport(From, Event, To)
-
Parameters
-
From: -
Event: -
To:
-
- DETECTION_MANAGER:onafterStart(From, Event, To)
-
Parameters
-
From: -
Event: -
To:
-
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.