mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
- Removed the old classes and moved into an "Old" folder in the Moose/Development folder. -- Cleaned Moose.lua + Documented class types -- Cleaned Create_Moose.bat + Documented class types - Extend the ZONE_BASE class with a probability randomization factor, that can be used for zone randomization purposes. - Documented the Zone module classes. - Changed and removed the POINT_VEC3 SmokeColor and FlareColor structure. Replaced with SMOKECOLOR and FLARECOLOR types. -- Replaced also code in test missions with SMOKECOLOR and FLARECOLOR references. - Renamed UnControlled() method to InitUnControlled method.
598 lines
14 KiB
HTML
598 lines
14 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="AIBalancer.html">AIBalancer</a></li>
|
|
<li><a href="Airbase.html">Airbase</a></li>
|
|
<li><a href="AirbasePolice.html">AirbasePolice</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="Controllable.html">Controllable</a></li>
|
|
<li><a href="DCSAirbase.html">DCSAirbase</a></li>
|
|
<li><a href="DCSCoalitionObject.html">DCSCoalitionObject</a></li>
|
|
<li><a href="DCSCommand.html">DCSCommand</a></li>
|
|
<li><a href="DCSController.html">DCSController</a></li>
|
|
<li><a href="DCSGroup.html">DCSGroup</a></li>
|
|
<li><a href="DCSObject.html">DCSObject</a></li>
|
|
<li><a href="DCSTask.html">DCSTask</a></li>
|
|
<li><a href="DCSTypes.html">DCSTypes</a></li>
|
|
<li><a href="DCSUnit.html">DCSUnit</a></li>
|
|
<li><a href="DCSWorld.html">DCSWorld</a></li>
|
|
<li><a href="DCScountry.html">DCScountry</a></li>
|
|
<li><a href="DCStimer.html">DCStimer</a></li>
|
|
<li><a href="DCStrigger.html">DCStrigger</a></li>
|
|
<li><a href="Database.html">Database</a></li>
|
|
<li><a href="Detection.html">Detection</a></li>
|
|
<li><a href="DetectionManager.html">DetectionManager</a></li>
|
|
<li><a href="Escort.html">Escort</a></li>
|
|
<li><a href="Event.html">Event</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="PatrolZone.html">PatrolZone</a></li>
|
|
<li><a href="Point.html">Point</a></li>
|
|
<li><a href="Positionable.html">Positionable</a></li>
|
|
<li><a href="Process.html">Process</a></li>
|
|
<li><a href="Process_Destroy.html">Process_Destroy</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="Process_Smoke.html">Process_Smoke</a></li>
|
|
<li><a href="STAGE.html">STAGE</a></li>
|
|
<li>Scheduler</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="Spawn.html">Spawn</a></li>
|
|
<li><a href="StateMachine.html">StateMachine</a></li>
|
|
<li><a href="Static.html">Static</a></li>
|
|
<li><a href="StaticObject.html">StaticObject</a></li>
|
|
<li><a href="Task.html">Task</a></li>
|
|
<li><a href="Task_A2G.html">Task_A2G</a></li>
|
|
<li><a href="Task_Assign.html">Task_Assign</a></li>
|
|
<li><a href="Task_Client_Menu.html">Task_Client_Menu</a></li>
|
|
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
|
<li><a href="Task_Route.html">Task_Route</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="env.html">env</a></li>
|
|
<li><a href="land.html">land</a></li>
|
|
<li><a href="routines.html">routines</a></li>
|
|
</ul>
|
|
</div>
|
|
<div id="content">
|
|
<h1>Module <code>Scheduler</code></h1>
|
|
|
|
<p>This module contains the SCHEDULER class.</p>
|
|
|
|
|
|
|
|
<h1>1) <a href="Scheduler.html##(SCHEDULER)">Scheduler#SCHEDULER</a> class, extends <a href="Base.html##(BASE)">Base#BASE</a></h1>
|
|
<p>The <a href="Scheduler.html##(SCHEDULER)">Scheduler#SCHEDULER</a> class models time events calling given event handling functions.</p>
|
|
|
|
<h2>1.1) SCHEDULER constructor</h2>
|
|
<p>The SCHEDULER class is quite easy to use:</p>
|
|
|
|
<ul>
|
|
<li><a href="Scheduler.html##(SCHEDULER).New">Scheduler#SCHEDULER.New</a>: Setup a new scheduler and start it with the specified parameters.</li>
|
|
</ul>
|
|
|
|
<h2>1.2) SCHEDULER timer stop and start</h2>
|
|
<p>The SCHEDULER can be stopped and restarted with the following methods:</p>
|
|
|
|
<ul>
|
|
<li><a href="Scheduler.html##(SCHEDULER).Start">Scheduler#SCHEDULER.Start</a>: (Re-)Start the scheduler.</li>
|
|
<li><a href="Scheduler.html##(SCHEDULER).Stop">Scheduler#SCHEDULER.Stop</a>: Stop the scheduler.</li>
|
|
</ul>
|
|
|
|
<h2>1.3) Reschedule new time event</h2>
|
|
<p>With <a href="Scheduler.html##(SCHEDULER).Schedule">Scheduler#SCHEDULER.Schedule</a> a new time event can be scheduled.</p>
|
|
|
|
<hr/>
|
|
|
|
<h3>Contributions:</h3>
|
|
|
|
<ul>
|
|
<li>Mechanist : Concept & Testing</li>
|
|
</ul>
|
|
|
|
<h3>Authors:</h3>
|
|
|
|
<ul>
|
|
<li>FlightControl : Design & Programming</li>
|
|
</ul>
|
|
|
|
<hr/>
|
|
|
|
|
|
<h2>Global(s)</h2>
|
|
<table class="function_list">
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="#SCHEDULER">SCHEDULER</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<h2><a id="#(SCHEDULER)">Type <code>SCHEDULER</code></a></h2>
|
|
<table class="function_list">
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SCHEDULER).ClassName">SCHEDULER.ClassName</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SCHEDULER).New">SCHEDULER:New(TimeEventObject, TimeEventFunction, TimeEventFunctionArguments, StartSeconds, RepeatSecondsInterval, RandomizationFactor, StopSeconds)</a></td>
|
|
<td class="summary">
|
|
<p>SCHEDULER constructor.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SCHEDULER).RandomizationFactor">SCHEDULER.RandomizationFactor</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SCHEDULER).Repeat">SCHEDULER.Repeat</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SCHEDULER).RepeatSecondsInterval">SCHEDULER.RepeatSecondsInterval</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SCHEDULER).Schedule">SCHEDULER:Schedule(TimeEventObject, TimeEventFunction, TimeEventFunctionArguments, StartSeconds, RepeatSecondsInterval, RandomizationFactor, StopSeconds)</a></td>
|
|
<td class="summary">
|
|
<p>Schedule a new time event.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SCHEDULER).ScheduleID">SCHEDULER.ScheduleID</a></td>
|
|
<td class="summary">
|
|
<p>the ID of the scheduler.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SCHEDULER).Start">SCHEDULER:Start()</a></td>
|
|
<td class="summary">
|
|
<p>(Re-)Starts the scheduler.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SCHEDULER).StartSeconds">SCHEDULER.StartSeconds</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SCHEDULER).StartTime">SCHEDULER.StartTime</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SCHEDULER).Stop">SCHEDULER:Stop()</a></td>
|
|
<td class="summary">
|
|
<p>Stops the scheduler.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SCHEDULER).StopSeconds">SCHEDULER.StopSeconds</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SCHEDULER).TimeEventFunction">SCHEDULER.TimeEventFunction</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SCHEDULER).TimeEventFunctionArguments">SCHEDULER.TimeEventFunctionArguments</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SCHEDULER).TimeEventObject">SCHEDULER.TimeEventObject</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(SCHEDULER)._Scheduler">SCHEDULER:_Scheduler()</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<h2>Global(s)</h2>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em><a href="##(SCHEDULER)">#SCHEDULER</a></em>
|
|
<a id="SCHEDULER" >
|
|
<strong>SCHEDULER</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<h2><a id="#(Scheduler)" >Type <code>Scheduler</code></a></h2>
|
|
|
|
<h2><a id="#(SCHEDULER)" >Type <code>SCHEDULER</code></a></h2>
|
|
|
|
<p>The SCHEDULER class</p>
|
|
|
|
<h3>Field(s)</h3>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em>#string</em>
|
|
<a id="#(SCHEDULER).ClassName" >
|
|
<strong>SCHEDULER.ClassName</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(SCHEDULER).New" >
|
|
<strong>SCHEDULER:New(TimeEventObject, TimeEventFunction, TimeEventFunctionArguments, StartSeconds, RepeatSecondsInterval, RandomizationFactor, StopSeconds)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>SCHEDULER constructor.</p>
|
|
|
|
<h3>Parameters</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em>#table TimeEventObject </em></code>:
|
|
Specified for which Moose object the timer is setup. If a value of nil is provided, a scheduler will be setup without an object reference.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#function TimeEventFunction </em></code>:
|
|
The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in TimeEventFunctionArguments.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#table TimeEventFunctionArguments </em></code>:
|
|
Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#number StartSeconds </em></code>:
|
|
Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#number RepeatSecondsInterval </em></code>:
|
|
Specifies the interval in seconds when the scheduler will call the event function.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#number RandomizationFactor </em></code>:
|
|
Specifies a randomization factor between 0 and 1 to randomize the RepeatSecondsInterval.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#number StopSeconds </em></code>:
|
|
Specifies the amount of seconds when the scheduler will be stopped.</p>
|
|
|
|
</li>
|
|
</ul>
|
|
<h3>Return value</h3>
|
|
|
|
<p><em><a href="##(SCHEDULER)">#SCHEDULER</a>:</em>
|
|
self</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(SCHEDULER).RandomizationFactor" >
|
|
<strong>SCHEDULER.RandomizationFactor</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em>#boolean</em>
|
|
<a id="#(SCHEDULER).Repeat" >
|
|
<strong>SCHEDULER.Repeat</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(SCHEDULER).RepeatSecondsInterval" >
|
|
<strong>SCHEDULER.RepeatSecondsInterval</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(SCHEDULER).Schedule" >
|
|
<strong>SCHEDULER:Schedule(TimeEventObject, TimeEventFunction, TimeEventFunctionArguments, StartSeconds, RepeatSecondsInterval, RandomizationFactor, StopSeconds)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Schedule a new time event.</p>
|
|
|
|
|
|
<p>Note that the schedule will only take place if the scheduler is <em>started</em>. Even for a single schedule event, the scheduler needs to be started also.</p>
|
|
|
|
<h3>Parameters</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em>#table TimeEventObject </em></code>:
|
|
Specified for which Moose object the timer is setup. If a value of nil is provided, a scheduler will be setup without an object reference.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#function TimeEventFunction </em></code>:
|
|
The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in TimeEventFunctionArguments.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#table TimeEventFunctionArguments </em></code>:
|
|
Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#number StartSeconds </em></code>:
|
|
Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#number RepeatSecondsInterval </em></code>:
|
|
Specifies the interval in seconds when the scheduler will call the event function.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#number RandomizationFactor </em></code>:
|
|
Specifies a randomization factor between 0 and 1 to randomize the RepeatSecondsInterval.</p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em>#number StopSeconds </em></code>:
|
|
Specifies the amount of seconds when the scheduler will be stopped.</p>
|
|
|
|
</li>
|
|
</ul>
|
|
<h3>Return value</h3>
|
|
|
|
<p><em><a href="##(SCHEDULER)">#SCHEDULER</a>:</em>
|
|
self</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em>#number</em>
|
|
<a id="#(SCHEDULER).ScheduleID" >
|
|
<strong>SCHEDULER.ScheduleID</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>the ID of the scheduler.</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(SCHEDULER).Start" >
|
|
<strong>SCHEDULER:Start()</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>(Re-)Starts the scheduler.</p>
|
|
|
|
<h3>Return value</h3>
|
|
|
|
<p><em><a href="##(SCHEDULER)">#SCHEDULER</a>:</em>
|
|
self</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em></em>
|
|
<a id="#(SCHEDULER).StartSeconds" >
|
|
<strong>SCHEDULER.StartSeconds</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em></em>
|
|
<a id="#(SCHEDULER).StartTime" >
|
|
<strong>SCHEDULER.StartTime</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(SCHEDULER).Stop" >
|
|
<strong>SCHEDULER:Stop()</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Stops the scheduler.</p>
|
|
|
|
<h3>Return value</h3>
|
|
|
|
<p><em><a href="##(SCHEDULER)">#SCHEDULER</a>:</em>
|
|
self</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em></em>
|
|
<a id="#(SCHEDULER).StopSeconds" >
|
|
<strong>SCHEDULER.StopSeconds</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em></em>
|
|
<a id="#(SCHEDULER).TimeEventFunction" >
|
|
<strong>SCHEDULER.TimeEventFunction</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em></em>
|
|
<a id="#(SCHEDULER).TimeEventFunctionArguments" >
|
|
<strong>SCHEDULER.TimeEventFunctionArguments</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em></em>
|
|
<a id="#(SCHEDULER).TimeEventObject" >
|
|
<strong>SCHEDULER.TimeEventObject</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(SCHEDULER)._Scheduler" >
|
|
<strong>SCHEDULER:_Scheduler()</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
</body>
|
|
</html>
|