Updated documentation + small bugfix SCHEDULER.

This commit is contained in:
FlightControl
2016-06-15 06:42:22 +02:00
parent 45140d6563
commit f2407e357a
75 changed files with 41228 additions and 282 deletions

View File

@@ -19,6 +19,7 @@
<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>Base</li>
<li><a href="CARGO.html">CARGO</a></li>
<li><a href="CleanUp.html">CleanUp</a></li>
@@ -72,37 +73,40 @@
<div id="content">
<h1>Module <code>Base</code></h1>
<p>BASE classes.</p>
<p>This module contains the BASE class.</p>
<h1><a href="##(BASE)">#BASE</a> class</h1>
<p>The <a href="##(BASE)">#BASE</a> class is the super class for most of the classes defined within MOOSE.</p>
<h1>1) <a href="##(BASE)">#BASE</a> class</h1>
<p>The <a href="##(BASE)">#BASE</a> class is the super class for all the classes defined within MOOSE.</p>
<p>It handles:</p>
<ul>
<li>The construction and inheritance of child classes.</li>
<li>The tracing of objects during mission execution within the DCS.log file (under saved games folder).</li>
<li>The tracing of objects during mission execution within the <strong>DCS.log</strong> file, under the <strong>"Saved Games\DCS\Logs"</strong> folder.</li>
</ul>
<p>Note: Normally you would not use the BASE class unless you are extending the MOOSE framework with new classes.</p>
<h1>BASE Trace functionality</h1>
<h2>1.1) BASE constructor</h2>
<p>Any class derived from BASE, must use the <a href="Base.html##(BASE).New">Base#BASE.New</a> method how this is done.</p>
<h2>1.2) BASE Trace functionality</h2>
<p>The BASE class contains trace methods to trace progress within a mission execution of a certain object.
Note that these trace methods are inherited by each MOOSE class interiting BASE.
As such, each object created from derived class from BASE can use the tracing functions to trace its execution.</p>
<h2>Trace a function call</h2>
<h2>1.2.1) Tracing functions</h2>
<p>There are basically 3 types of tracing methods available within BASE:</p>
<ul>
<li><a href="##(BASE).F">BASE.F</a>: Trace the beginning of a function and its given parameters.</li>
<li><a href="##(BASE).T">BASE.T</a>: Trace further logic within a function giving optional variables or parameters.</li>
<li><a href="##(BASE).E">BASE.E</a>: Trace an execption within a function giving optional variables or parameters. An exception will always be traced.</li>
<li><a href="##(BASE).F">BASE.F</a>: Trace the beginning of a function and its given parameters. An F is indicated at column 44 in the DCS.log file.</li>
<li><a href="##(BASE).T">BASE.T</a>: Trace further logic within a function giving optional variables or parameters. A T is indicated at column 44 in the DCS.log file.</li>
<li><a href="##(BASE).E">BASE.E</a>: Trace an exception within a function giving optional variables or parameters. An E is indicated at column 44 in the DCS.log file. An exception will always be traced.</li>
</ul>
<h2>Tracing levels</h2>
<h2>1.2.2) Tracing levels</h2>
<p>There are 3 tracing levels within MOOSE. <br/>
These tracing levels were defined to avoid bulks of tracing to be generated by lots of objects.</p>
@@ -115,7 +119,7 @@ These tracing levels were defined to avoid bulks of tracing to be generated by l
<li><a href="##(BASE).T3">BASE.T3</a>: Trace further logic within a function giving optional variables or parameters with tracing level 3.</li>
</ul>
<h1>BASE Inheritance support</h1>
<h1>1.3) BASE Inheritance support</h1>
<p>The following methods are available to support inheritance:</p>
<ul>
@@ -162,6 +166,12 @@ These tracing levels were defined to avoid bulks of tracing to be generated by l
<td class="name" nowrap="nowrap"><a href="##(BASE).ClassName">BASE.ClassName</a></td>
<td class="summary">
<p>The name of the class.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(BASE).ClassNameAndID">BASE.ClassNameAndID</a></td>
<td class="summary">
<p>The name of the class concatenated with the ID number of the class.</p>
</td>
</tr>
<tr>
@@ -213,7 +223,7 @@ These tracing levels were defined to avoid bulks of tracing to be generated by l
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(BASE).F">BASE:F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam)</a></td>
<td class="name" nowrap="nowrap"><a href="##(BASE).F">BASE:F(Arguments)</a></td>
<td class="summary">
<p>Trace a function call.</p>
</td>
@@ -324,6 +334,20 @@ These tracing levels were defined to avoid bulks of tracing to be generated by l
<td class="name" nowrap="nowrap"><a href="##(BASE).TraceLevel">BASE:TraceLevel(Level)</a></td>
<td class="summary">
<p>Set trace level</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(BASE).TraceOnOff">BASE.TraceOnOff(BASE, TraceOnOff, self)</a></td>
<td class="summary">
<p>Set trace on or off
Note that when trace is off, no debug statement is performed, increasing performance!
When Moose is loaded statically, (as one file), tracing is switched off by default.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(BASE)._F">BASE:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam)</a></td>
<td class="summary">
<p>Trace a function call.</p>
</td>
</tr>
<tr>
@@ -446,6 +470,19 @@ These tracing levels were defined to avoid bulks of tracing to be generated by l
<dl class="function">
<dt>
<a id="#(BASE).ClassNameAndID" >
<strong>BASE.ClassNameAndID</strong>
</a>
</dt>
<dd>
<p>The name of the class concatenated with the ID number of the class.</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(BASE).ClearState" >
<strong>BASE:ClearState(Object, StateName)</strong>
</a>
@@ -638,7 +675,7 @@ A #table or any field.</p>
<dt>
<a id="#(BASE).F" >
<strong>BASE:F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam)</strong>
<strong>BASE:F(Arguments)</strong>
</a>
</dt>
<dd>
@@ -648,23 +685,13 @@ A #table or any field.</p>
<p>Must be at the beginning of the function logic.</p>
<h3>Parameters</h3>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em> Arguments </em></code>:
A #table or any field.</p>
</li>
<li>
<p><code><em> DebugInfoCurrentParam </em></code>: </p>
</li>
<li>
<p><code><em> DebugInfoFromParam </em></code>: </p>
</li>
</ul>
</dd>
@@ -883,14 +910,16 @@ Any new class needs to be derived from this class for proper inheritance.</p>
The new instance of the BASE class.</p>
<h3>Usage:</h3>
<pre class="example"><code>function TASK:New()
<pre class="example"><code>-- This declares the constructor of the class TASK, inheriting from BASE.
--- TASK constructor
-- @param #TASK self
-- @param Parameter The parameter of the New constructor.
-- @return #TASK self
function TASK:New( Parameter )
local self = BASE:Inherit( self, BASE:New() )
-- assign Task default values during construction
self.TaskBriefing = "Task: No Task."
self.Time = timer.getTime()
self.ExecuteStage = _TransportExecuteStage.NONE
self.Variable = Parameter
return self
end</code></pre>
@@ -1110,6 +1139,87 @@ true = trace all methods in MOOSE.</p>
<dl class="function">
<dt>
<a id="#(BASE).TraceOnOff" >
<strong>BASE.TraceOnOff(BASE, TraceOnOff, self)</strong>
</a>
</dt>
<dd>
<p>Set trace on or off
Note that when trace is off, no debug statement is performed, increasing performance!
When Moose is loaded statically, (as one file), tracing is switched off by default.</p>
<p>So tracing must be switched on manually in your mission if you are using Moose statically.
When moose is loading dynamically (for moose class development), tracing is switched on by default.</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em> BASE </em></code>:
self</p>
</li>
<li>
<p><code><em>#boolean TraceOnOff </em></code>:
Switch the tracing on or off.</p>
</li>
<li>
<p><code><em> self </em></code>: </p>
</li>
</ul>
<h3>Usage:</h3>
<pre class="example"><code>-- Switch the tracing On
BASE:TraceOn( true )
-- Switch the tracing Off
BASE:TraceOn( false )</code></pre>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(BASE)._F" >
<strong>BASE:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam)</strong>
</a>
</dt>
<dd>
<p>Trace a function call.</p>
<p>This function is private.</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em> Arguments </em></code>:
A #table or any field.</p>
</li>
<li>
<p><code><em> DebugInfoCurrentParam </em></code>: </p>
</li>
<li>
<p><code><em> DebugInfoFromParam </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(BASE)._T" >
<strong>BASE:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam)</strong>
</a>