Documentation

This commit is contained in:
FlightControl
2017-04-02 09:39:00 +02:00
parent f8f68ea695
commit 7e9b97dda0
55 changed files with 2422 additions and 398 deletions

View File

@@ -63,6 +63,7 @@
<li>Task</li>
<li><a href="Task_A2G.html">Task_A2G</a></li>
<li><a href="Task_A2G_Dispatcher.html">Task_A2G_Dispatcher</a></li>
<li><a href="Task_CARGO.html">Task_CARGO</a></li>
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
<li><a href="Unit.html">Unit</a></li>
<li><a href="Utils.html">Utils</a></li>
@@ -73,54 +74,12 @@
<div id="content">
<h1>Module <code>Task</code></h1>
<p>This module contains the TASK class.</p>
<p><strong>Tasking</strong> -- This module contains the TASK class.</p>
<h1>1) <a href="##(TASK)">#TASK</a> class, extends <a href="Base.html##(BASE)">Base#BASE</a></h1>
<h2>1.1) The <a href="##(TASK)">#TASK</a> class implements the methods for task orchestration within MOOSE. </h2>
<p>The class provides a couple of methods to:</p>
<hr/>
<ul>
<li><a href="##(TASK).AssignToGroup">TASK.AssignToGroup</a>():Assign a task to a group (of players).</li>
<li><a href="##(TASK).AddProcess">TASK.AddProcess</a>():Add a <a href="Process.html">Process</a> to a task.</li>
<li><a href="##(TASK).RemoveProcesses">TASK.RemoveProcesses</a>():Remove a running <a href="Process.html">Process</a> from a running task.</li>
<li><a href="##(TASK).SetStateMachine">TASK.SetStateMachine</a>():Set a <a href="Fsm.html">Fsm</a> to a task.</li>
<li><a href="##(TASK).RemoveStateMachine">TASK.RemoveStateMachine</a>():Remove <a href="Fsm.html">Fsm</a> from a task.</li>
<li><a href="##(TASK).HasStateMachine">TASK.HasStateMachine</a>():Enquire if the task has a <a href="Fsm.html">Fsm</a></li>
<li><a href="##(TASK).AssignToUnit">TASK.AssignToUnit</a>(): Assign a task to a unit. (Needs to be implemented in the derived classes from <a href="##(TASK)">#TASK</a>.</li>
<li><a href="##(TASK).UnAssignFromUnit">TASK.UnAssignFromUnit</a>(): Unassign the task from a unit.</li>
<li><a href="##(TASK).SetTimeOut">TASK.SetTimeOut</a>(): Set timer in seconds before task gets cancelled if not assigned.</li>
</ul>
<h2>1.2) Set and enquire task status (beyond the task state machine processing).</h2>
<p>A task needs to implement as a minimum the following task states:</p>
<ul>
<li><strong>Success</strong>: Expresses the successful execution and finalization of the task.</li>
<li><strong>Failed</strong>: Expresses the failure of a task.</li>
<li><strong>Planned</strong>: Expresses that the task is created, but not yet in execution and is not assigned yet.</li>
<li><strong>Assigned</strong>: Expresses that the task is assigned to a Group of players, and that the task is in execution mode.</li>
</ul>
<p>A task may also implement the following task states:</p>
<ul>
<li><strong>Rejected</strong>: Expresses that the task is rejected by a player, who was requested to accept the task.</li>
<li><strong>Cancelled</strong>: Expresses that the task is cancelled by HQ or through a logical situation where a cancellation of the task is required.</li>
</ul>
<p>A task can implement more statusses than the ones outlined above. Please consult the documentation of the specific tasks to understand the different status modelled.</p>
<p>The status of tasks can be set by the methods <strong>State</strong> followed by the task status. An example is <code>StateAssigned()</code>.
The status of tasks can be enquired by the methods <strong>IsState</strong> followed by the task status name. An example is <code>if IsStateAssigned() then</code>.</p>
<h2>1.3) Add scoring when reaching a certain task status:</h2>
<p>Upon reaching a certain task status in a task, additional scoring can be given. If the Mission has a scoring system attached, the scores will be added to the mission scoring.
Use the method <a href="##(TASK).AddScore">TASK.AddScore</a>() to add scores when a status is reached.</p>
<h2>1.4) Task briefing:</h2>
<p>A task briefing can be given that is shown to the player when he is assigned to the task.</p>
<hr/>
@@ -132,7 +91,9 @@ Use the method <a href="##(TASK).AddScore">TASK.AddScore</a>() to add scores whe
<tr>
<td class="name" nowrap="nowrap"><a href="#TASK">TASK</a></td>
<td class="summary">
<h1>TASK class, extends <a href="Base.html##(BASE)">Base#BASE</a></h1>
<h2>The TASK class implements the methods for task orchestration within MOOSE.</h2>
</td>
</tr>
</table>
@@ -166,12 +127,6 @@ Use the method <a href="##(TASK).AddScore">TASK.AddScore</a>() to add scores whe
<td class="name" nowrap="nowrap"><a href="##(TASK).Cancel">TASK:Cancel()</a></td>
<td class="summary">
<p>FSM Cancel synchronous event function for TASK.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(TASK).ClassName">TASK.ClassName</a></td>
<td class="summary">
</td>
</tr>
<tr>
@@ -358,12 +313,6 @@ Use the method <a href="##(TASK).AddScore">TASK.AddScore</a>() to add scores whe
<td class="name" nowrap="nowrap"><a href="##(TASK).JoinUnit">TASK:JoinUnit(PlayerUnit, PlayerGroup)</a></td>
<td class="summary">
<p>Add a PlayerUnit to join the Task.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(TASK).Menu">TASK.Menu</a></td>
<td class="summary">
</td>
</tr>
<tr>
@@ -418,24 +367,6 @@ Use the method <a href="##(TASK).AddScore">TASK.AddScore</a>() to add scores whe
<td class="name" nowrap="nowrap"><a href="##(TASK).OnAfterPlayerDead">TASK:OnAfterPlayerDead(PlayerUnit, PlayerName)</a></td>
<td class="summary">
<p>FSM PlayerDead event handler prototype for TASK.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(TASK).Players">TASK.Players</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(TASK).ProcessClasses">TASK.ProcessClasses</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(TASK).Processes">TASK.Processes</a></td>
<td class="summary">
</td>
</tr>
<tr>
@@ -478,12 +409,6 @@ Use the method <a href="##(TASK).AddScore">TASK.AddScore</a>() to add scores whe
<td class="name" nowrap="nowrap"><a href="##(TASK).ReportSummary">TASK:ReportSummary()</a></td>
<td class="summary">
<p>Create a summary report of the Task.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(TASK).Scores">TASK.Scores</a></td>
<td class="summary">
</td>
</tr>
<tr>
@@ -769,6 +694,57 @@ Use the method <a href="##(TASK).AddScore">TASK.AddScore</a>() to add scores whe
</dt>
<dd>
<h1>TASK class, extends <a href="Base.html##(BASE)">Base#BASE</a></h1>
<h2>The TASK class implements the methods for task orchestration within MOOSE.</h2>
<p>The class provides a couple of methods to:</p>
<ul>
<li><a href="##(TASK).AssignToGroup">TASK.AssignToGroup</a>():Assign a task to a group (of players).</li>
<li><a href="##(TASK).AddProcess">TASK.AddProcess</a>():Add a <a href="Process.html">Process</a> to a task.</li>
<li><a href="##(TASK).RemoveProcesses">TASK.RemoveProcesses</a>():Remove a running <a href="Process.html">Process</a> from a running task.</li>
<li><a href="##(TASK).SetStateMachine">TASK.SetStateMachine</a>():Set a <a href="Fsm.html">Fsm</a> to a task.</li>
<li><a href="##(TASK).RemoveStateMachine">TASK.RemoveStateMachine</a>():Remove <a href="Fsm.html">Fsm</a> from a task.</li>
<li><a href="##(TASK).HasStateMachine">TASK.HasStateMachine</a>():Enquire if the task has a <a href="Fsm.html">Fsm</a></li>
<li><a href="##(TASK).AssignToUnit">TASK.AssignToUnit</a>(): Assign a task to a unit. (Needs to be implemented in the derived classes from <a href="##(TASK)">#TASK</a>.</li>
<li><a href="##(TASK).UnAssignFromUnit">TASK.UnAssignFromUnit</a>(): Unassign the task from a unit.</li>
<li><a href="##(TASK).SetTimeOut">TASK.SetTimeOut</a>(): Set timer in seconds before task gets cancelled if not assigned.</li>
</ul>
<h2>1.2) Set and enquire task status (beyond the task state machine processing).</h2>
<p>A task needs to implement as a minimum the following task states:</p>
<ul>
<li><strong>Success</strong>: Expresses the successful execution and finalization of the task.</li>
<li><strong>Failed</strong>: Expresses the failure of a task.</li>
<li><strong>Planned</strong>: Expresses that the task is created, but not yet in execution and is not assigned yet.</li>
<li><strong>Assigned</strong>: Expresses that the task is assigned to a Group of players, and that the task is in execution mode.</li>
</ul>
<p>A task may also implement the following task states:</p>
<ul>
<li><strong>Rejected</strong>: Expresses that the task is rejected by a player, who was requested to accept the task.</li>
<li><strong>Cancelled</strong>: Expresses that the task is cancelled by HQ or through a logical situation where a cancellation of the task is required.</li>
</ul>
<p>A task can implement more statusses than the ones outlined above. Please consult the documentation of the specific tasks to understand the different status modelled.</p>
<p>The status of tasks can be set by the methods <strong>State</strong> followed by the task status. An example is <code>StateAssigned()</code>.
The status of tasks can be enquired by the methods <strong>IsState</strong> followed by the task status name. An example is <code>if IsStateAssigned() then</code>.</p>
<h2>1.3) Add scoring when reaching a certain task status:</h2>
<p>Upon reaching a certain task status in a task, additional scoring can be given. If the Mission has a scoring system attached, the scores will be added to the mission scoring.
Use the method <a href="##(TASK).AddScore">TASK.AddScore</a>() to add scores when a status is reached.</p>
<h2>1.4) Task briefing:</h2>
<p>A task briefing can be given that is shown to the player when he is assigned to the task.</p>
</dd>
@@ -776,10 +752,7 @@ Use the method <a href="##(TASK).AddScore">TASK.AddScore</a>() to add scores whe
<h2><a id="#(Task)" >Type <code>Task</code></a></h2>
<h2><a id="#(TASK)" >Type <code>TASK</code></a></h2>
<p>The TASK class</p>
<h3>Field(s)</h3>
<h3>Field(s)</h3>
<dl class="function">
<dt>
@@ -893,20 +866,6 @@ self</p>
<p>Use this event to Cancel the Task.</p>
</dd>
</dl>
<dl class="function">
<dt>
<em>#string</em>
<a id="#(TASK).ClassName" >
<strong>TASK.ClassName</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
@@ -1498,20 +1457,6 @@ The GROUP of the player joining the Mission.</p>
<p><em>#boolean:</em>
true if Unit is part of the Task.</p>
</dd>
</dl>
<dl class="function">
<dt>
<em></em>
<a id="#(TASK).Menu" >
<strong>TASK.Menu</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
@@ -1742,47 +1687,6 @@ The name of the Player.</p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(TASK).Players" >
<strong>TASK.Players</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em></em>
<a id="#(TASK).ProcessClasses" >
<strong>TASK.ProcessClasses</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em></em>
<a id="#(TASK).Processes" >
<strong>TASK.Processes</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
@@ -1955,20 +1859,6 @@ self</p>
<p><em>#string:</em></p>
</dd>
</dl>
<dl class="function">
<dt>
<em></em>
<a id="#(TASK).Scores" >
<strong>TASK.Scores</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">