Module Fac

This module contains the FAC classes.


1) Fac#FAC_BASE class, extends Base#BASE

The Fac#FAC_BASE class defines the core functions to report detected objects to clients. Reportings can be done in several manners, and it is up to the derived classes if FAC_BASE to model the reporting behaviour.

1.1) FAC_BASE constructor:

* Fac#FAC_BASE.New(): Create a new FAC_BASE instance.

1.2) FAC_BASE reporting:

Derived FAC_BASE classes will reports detected units using the method Fac#FAC_BASE.ReportDetected(). This method implements polymorphic behaviour.

The time interval in seconds of the reporting can be changed using the methods Fac#FAC_BASE.SetReportInterval(). To control how long a reporting message is displayed, use Fac#FAC_BASE.SetReportDisplayTime(). Derived classes need to implement the method Fac#FAC_BASE.GetReportDisplayTime() to use the correct display time for displayed messages during a report.

Reporting can be started and stopped using the methods Fac#FAC_BASE.StartReporting() and Fac#FAC_BASE.StopReporting() respectively. If an ad-hoc report is requested, use the method Fac#FAC_BASE().

The default reporting interval is every 60 seconds. The reporting messages are displayed 15 seconds.


2) Fac#FAC_REPORTING class, extends Fac#FAC_BASE

The Fac#FAC_REPORTING class implements detected units reporting. Reporting can be controlled using the reporting methods available in the Fac#FAC_BASE class.

2.1) FAC_REPORTING constructor:

The Fac#FAC_REPORTING.New() method creates a new FAC_REPORTING instance.


Global(s)

FAC_BASE
FAC_REPORTING

Type FAC_BASE

FAC_BASE.ClassName
FAC_BASE.ClientSet

The clients to which the FAC will report to.

FAC_BASE.Detection

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

FAC_BASE.FacScheduler
FAC_BASE:GetReportDisplayTime()

Get the reporting message display time.

FAC_BASE:New(ClientSet, Detection)

FAC constructor.

FAC_BASE:ReportDetected(DetectedSets)

Reports the detected items to the Set#SET_CLIENT.

FAC_BASE:Schedule(DelayTime, ReportInterval)

Schedule the FAC reporting.

FAC_BASE:SetReportDisplayTime(ReportDisplayTime)

Set the reporting message display time.

FAC_BASE:SetReportInterval(ReportInterval)

Set the reporting time interval.

FAC_BASE:_FacScheduler(SchedulerName)

Report the detected Unit#UNITs detected within the DetectION#DETECTION_BASE object to the Set#SET_CLIENTs.

FAC_BASE._ReportDisplayTime
FAC_BASE._ReportInterval
FAC_BASE._ScheduleDelayTime

Type FAC_REPORTING

FAC_REPORTING.ClassName
FAC_REPORTING.ClientSet

The clients to which the FAC will report to.

FAC_REPORTING.Detection

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

FAC_REPORTING:New(ClientSet, Detection)

FAC_REPORTING constructor.

FAC_REPORTING:ReportDetected(Client, DetectedSets)

Reports the detected items to the Set#SET_CLIENT.

Global(s)

#FAC_BASE FAC_BASE
#FAC_REPORTING FAC_REPORTING

Type Fac

Type FAC_BASE

FAC_BASE class.

Field(s)

#string FAC_BASE.ClassName
Set#SET_CLIENT FAC_BASE.ClientSet

The clients to which the FAC will report to.

Detection#DETECTION_BASE FAC_BASE.Detection

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

FAC_BASE.FacScheduler
FAC_BASE:GetReportDisplayTime()

Get the reporting message display time.

Return value

#number: ReportDisplayTime The display time in seconds when a report needs to be done.

FAC_BASE:New(ClientSet, Detection)

FAC constructor.

Parameters

Return value

#FAC_BASE: self

FAC_BASE:ReportDetected(DetectedSets)

Reports the detected items to the Set#SET_CLIENT.

Parameter

Return value

#FAC_BASE: self

FAC_BASE: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

#FAC_BASE: self

FAC_BASE: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

#FAC_BASE: self

FAC_BASE:SetReportInterval(ReportInterval)

Set the reporting time interval.

Parameter

  • #number ReportInterval : The interval in seconds when a report needs to be done.

Return value

#FAC_BASE: self

FAC_BASE:_FacScheduler(SchedulerName)

Report the detected Unit#UNITs detected within the DetectION#DETECTION_BASE object to the Set#SET_CLIENTs.

Parameter

  • SchedulerName :

FAC_BASE._ReportDisplayTime
FAC_BASE._ReportInterval
FAC_BASE._ScheduleDelayTime

Type FAC_REPORTING

FAC_REPORTING class.

Field(s)

#string FAC_REPORTING.ClassName
Set#SET_CLIENT FAC_REPORTING.ClientSet

The clients to which the FAC will report to.

Detection#DETECTION_BASE FAC_REPORTING.Detection

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

FAC_REPORTING:New(ClientSet, Detection)

FAC_REPORTING constructor.

Parameters

Return value

#FAC_REPORTING: self

FAC_REPORTING:ReportDetected(Client, DetectedSets)

Reports the detected items to the Set#SET_CLIENT.

Parameters

Return value

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