mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
435 lines
11 KiB
HTML
435 lines
11 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html>
|
|
<head>
|
|
<link rel="stylesheet" href="stylesheet.css" type="text/css"/>
|
|
</head>
|
|
<body>
|
|
<div id="container">
|
|
<div id="product">
|
|
<div id="product_logo"></div>
|
|
<div id="product_name"><big><b></b></big></div>
|
|
<div id="product_description"></div>
|
|
</div>
|
|
<div id="main">
|
|
<div id="navigation">
|
|
<h2>Modules</h2>
|
|
<ul><li>
|
|
<a href="index.html">index</a>
|
|
</li></ul>
|
|
<ul>
|
|
<li><a href="AI_Balancer.html">AI_Balancer</a></li>
|
|
<li><a href="AI_Cap.html">AI_Cap</a></li>
|
|
<li><a href="AI_Cas.html">AI_Cas</a></li>
|
|
<li><a href="AI_Patrol.html">AI_Patrol</a></li>
|
|
<li><a href="Account.html">Account</a></li>
|
|
<li><a href="Airbase.html">Airbase</a></li>
|
|
<li><a href="AirbasePolice.html">AirbasePolice</a></li>
|
|
<li><a href="Assign.html">Assign</a></li>
|
|
<li><a href="Base.html">Base</a></li>
|
|
<li><a href="Cargo.html">Cargo</a></li>
|
|
<li><a href="CleanUp.html">CleanUp</a></li>
|
|
<li><a href="Client.html">Client</a></li>
|
|
<li><a href="CommandCenter.html">CommandCenter</a></li>
|
|
<li><a href="Controllable.html">Controllable</a></li>
|
|
<li><a href="Database.html">Database</a></li>
|
|
<li><a href="Detection.html">Detection</a></li>
|
|
<li><a href="Escort.html">Escort</a></li>
|
|
<li><a href="Event.html">Event</a></li>
|
|
<li><a href="Fsm.html">Fsm</a></li>
|
|
<li><a href="Group.html">Group</a></li>
|
|
<li><a href="Identifiable.html">Identifiable</a></li>
|
|
<li><a href="MOVEMENT.html">MOVEMENT</a></li>
|
|
<li><a href="Menu.html">Menu</a></li>
|
|
<li><a href="Message.html">Message</a></li>
|
|
<li><a href="MissileTrainer.html">MissileTrainer</a></li>
|
|
<li><a href="Mission.html">Mission</a></li>
|
|
<li><a href="Object.html">Object</a></li>
|
|
<li><a href="Point.html">Point</a></li>
|
|
<li><a href="Positionable.html">Positionable</a></li>
|
|
<li><a href="Process_JTAC.html">Process_JTAC</a></li>
|
|
<li><a href="Process_Pickup.html">Process_Pickup</a></li>
|
|
<li><a href="Route.html">Route</a></li>
|
|
<li>ScheduleDispatcher</li>
|
|
<li><a href="Scheduler.html">Scheduler</a></li>
|
|
<li><a href="Scoring.html">Scoring</a></li>
|
|
<li><a href="Sead.html">Sead</a></li>
|
|
<li><a href="Set.html">Set</a></li>
|
|
<li><a href="Smoke.html">Smoke</a></li>
|
|
<li><a href="Spawn.html">Spawn</a></li>
|
|
<li><a href="Static.html">Static</a></li>
|
|
<li><a href="Task.html">Task</a></li>
|
|
<li><a href="Task_A2G.html">Task_A2G</a></li>
|
|
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
|
<li><a href="Task_SEAD.html">Task_SEAD</a></li>
|
|
<li><a href="Unit.html">Unit</a></li>
|
|
<li><a href="Utils.html">Utils</a></li>
|
|
<li><a href="Zone.html">Zone</a></li>
|
|
<li><a href="routines.html">routines</a></li>
|
|
</ul>
|
|
</div>
|
|
<div id="content">
|
|
<h1>Module <code>ScheduleDispatcher</code></h1>
|
|
|
|
<p>This module defines the SCHEDULEDISPATCHER class, which is used by a central object called _SCHEDULEDISPATCHER.</p>
|
|
|
|
|
|
|
|
<hr/>
|
|
|
|
<p>Takes care of the creation and dispatching of scheduled functions for SCHEDULER objects.</p>
|
|
|
|
<p>This class is tricky and needs some thorought explanation.
|
|
SCHEDULE classes are used to schedule functions for objects, or as persistent objects.
|
|
The SCHEDULEDISPATCHER class ensures that:</p>
|
|
|
|
<ul>
|
|
<li>Scheduled functions are planned according the SCHEDULER object parameters.</li>
|
|
<li>Scheduled functions are repeated when requested, according the SCHEDULER object parameters.</li>
|
|
<li>Scheduled functions are automatically removed when the schedule is finished, according the SCHEDULER object parameters.</li>
|
|
</ul>
|
|
|
|
<p>The SCHEDULEDISPATCHER class will manage SCHEDULER object in memory during garbage collection:
|
|
- When a SCHEDULER object is not attached to another object (that is, it's first :Schedule() parameter is nil), then the SCHEDULER </p>
|
|
<pre><code>object is _persistent_ within memory.
|
|
</code></pre>
|
|
<p> - When a SCHEDULER object <em>is</em> attached to another object, then the SCHEDULER object is <em>not persistent</em> within memory after a garbage collection!
|
|
The none persistency of SCHEDULERS attached to objects is required to allow SCHEDULER objects to be garbage collectged, when the parent object is also desroyed or nillified and garbage collected.
|
|
Even when there are pending timer scheduled functions to be executed for the SCHEDULER object, <br/>
|
|
these will not be executed anymore when the SCHEDULER object has been destroyed.</p>
|
|
|
|
<p>The SCHEDULEDISPATCHER allows multiple scheduled functions to be planned and executed for one SCHEDULER object.
|
|
The SCHEDULER object therefore keeps a table of "CallID's", which are returned after each planning of a new scheduled function by the SCHEDULEDISPATCHER.
|
|
The SCHEDULER object plans new scheduled functions through the <a href="Core.Scheduler.html##(SCHEDULER).Schedule">Core.Scheduler#SCHEDULER.Schedule</a>() method.
|
|
The Schedule() method returns the CallID that is the reference ID for each planned schedule.</p>
|
|
|
|
<hr/>
|
|
|
|
<hr/>
|
|
|
|
<h3>Contributions: -</h3>
|
|
<h3>Authors: FlightControl : Design & Programming</h3>
|
|
|
|
|
|
<h2>Global(s)</h2>
|
|
<table class="function_list">
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="#SCHEDULEDISPATCHER">SCHEDULEDISPATCHER</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<h2><a id="#(SCHEDULEDISPATCHER)">Type <code>SCHEDULEDISPATCHER</code></a></h2>
|
|
<table class="function_list">
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SCHEDULEDISPATCHER).AddSchedule">SCHEDULEDISPATCHER:AddSchedule(Scheduler, ScheduleFunction, ScheduleArguments, Start, Repeat, Randomize, Stop)</a></td>
|
|
<td class="summary">
|
|
<p>Add a Schedule to the ScheduleDispatcher.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SCHEDULEDISPATCHER).CallID">SCHEDULEDISPATCHER.CallID</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SCHEDULEDISPATCHER).ClassName">SCHEDULEDISPATCHER.ClassName</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SCHEDULEDISPATCHER).New">SCHEDULEDISPATCHER:New()</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SCHEDULEDISPATCHER).ObjectSchedulers">SCHEDULEDISPATCHER.ObjectSchedulers</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SCHEDULEDISPATCHER).PersistentSchedulers">SCHEDULEDISPATCHER.PersistentSchedulers</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SCHEDULEDISPATCHER).RemoveSchedule">SCHEDULEDISPATCHER:RemoveSchedule(Scheduler, CallID)</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SCHEDULEDISPATCHER).Schedule">SCHEDULEDISPATCHER.Schedule</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SCHEDULEDISPATCHER).Start">SCHEDULEDISPATCHER:Start(Scheduler, CallID)</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SCHEDULEDISPATCHER).Stop">SCHEDULEDISPATCHER:Stop(Scheduler, CallID)</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<h2>Global(s)</h2>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em><a href="##(SCHEDULEDISPATCHER)">#SCHEDULEDISPATCHER</a></em>
|
|
<a id="SCHEDULEDISPATCHER" >
|
|
<strong>SCHEDULEDISPATCHER</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<h2><a id="#(ScheduleDispatcher)" >Type <code>ScheduleDispatcher</code></a></h2>
|
|
|
|
<h2><a id="#(SCHEDULEDISPATCHER)" >Type <code>SCHEDULEDISPATCHER</code></a></h2>
|
|
|
|
<p>The SCHEDULEDISPATCHER structure</p>
|
|
|
|
<h3>Field(s)</h3>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(SCHEDULEDISPATCHER).AddSchedule" >
|
|
<strong>SCHEDULEDISPATCHER:AddSchedule(Scheduler, ScheduleFunction, ScheduleArguments, Start, Repeat, Randomize, Stop)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Add a Schedule to the ScheduleDispatcher.</p>
|
|
|
|
|
|
<p>The development of this method was really tidy.
|
|
It is constructed as such that a garbage collection is executed on the weak tables, when the Scheduler is nillified.
|
|
Nothing of this code should be modified without testing it thoroughly.</p>
|
|
|
|
<h3>Parameters</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em><a href="Core.Scheduler.html##(SCHEDULER)">Core.Scheduler#SCHEDULER</a> Scheduler </em></code>: </p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em> ScheduleFunction </em></code>: </p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em> ScheduleArguments </em></code>: </p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em> Start </em></code>: </p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em> Repeat </em></code>: </p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em> Randomize </em></code>: </p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em> Stop </em></code>: </p>
|
|
|
|
</li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(SCHEDULEDISPATCHER).CallID" >
|
|
<strong>SCHEDULEDISPATCHER.CallID</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em>#string</em>
|
|
<a id="#(SCHEDULEDISPATCHER).ClassName" >
|
|
<strong>SCHEDULEDISPATCHER.ClassName</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(SCHEDULEDISPATCHER).New" >
|
|
<strong>SCHEDULEDISPATCHER:New()</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(SCHEDULEDISPATCHER).ObjectSchedulers" >
|
|
<strong>SCHEDULEDISPATCHER.ObjectSchedulers</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
|
|
<p> Initialize the ObjectSchedulers array, which is a weakly coupled table.
|
|
If the object used as the key is nil, then the garbage collector will remove the item from the Functions array.</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(SCHEDULEDISPATCHER).PersistentSchedulers" >
|
|
<strong>SCHEDULEDISPATCHER.PersistentSchedulers</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
|
|
<p> Initialize the ObjectSchedulers array, which is a weakly coupled table.
|
|
If the object used as the key is nil, then the garbage collector will remove the item from the Functions array.</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(SCHEDULEDISPATCHER).RemoveSchedule" >
|
|
<strong>SCHEDULEDISPATCHER:RemoveSchedule(Scheduler, CallID)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
<h3>Parameters</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em> Scheduler </em></code>: </p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em> CallID </em></code>: </p>
|
|
|
|
</li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(SCHEDULEDISPATCHER).Schedule" >
|
|
<strong>SCHEDULEDISPATCHER.Schedule</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(SCHEDULEDISPATCHER).Start" >
|
|
<strong>SCHEDULEDISPATCHER:Start(Scheduler, CallID)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
<h3>Parameters</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em> Scheduler </em></code>: </p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em> CallID </em></code>: </p>
|
|
|
|
</li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(SCHEDULEDISPATCHER).Stop" >
|
|
<strong>SCHEDULEDISPATCHER:Stop(Scheduler, CallID)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
<h3>Parameters</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em> Scheduler </em></code>: </p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em> CallID </em></code>: </p>
|
|
|
|
</li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
</body>
|
|
</html>
|