Module Tasking.Task_Manager
Tasking - This module contains the TASK_MANAGER class and derived classes.
1) Tasking.Task_Manager#TASK_MANAGER class, extends Core.Fsm#FSM
The Tasking.Task_Manager#TASK_MANAGER class defines the core functions to report tasks to groups. Reportings can be done in several manners, and it is up to the derived classes if TASK_MANAGER to model the reporting behaviour.
1.1) TASK_MANAGER constructor:
* Tasking.Task_Manager#TASK_MANAGER.New(): Create a new TASK_MANAGER instance.
1.2) TASK_MANAGER reporting:
Derived TASK_MANAGER classes will manage tasks using the method Tasking.Task_Manager#TASK_MANAGER.ManageTasks(). This method implements polymorphic behaviour.
The time interval in seconds of the task management can be changed using the methods Tasking.Task_Manager#TASK_MANAGER.SetRefreshTimeInterval(). To control how long a reporting message is displayed, use Tasking.Task_Manager#TASK_MANAGER.SetReportDisplayTime(). Derived classes need to implement the method Tasking.Task_Manager#TASK_MANAGER.GetReportDisplayTime() to use the correct display time for displayed messages during a report.
Task management can be started and stopped using the methods Tasking.Task_Manager#TASK_MANAGER.StartTasks() and Tasking.Task_Manager#TASK_MANAGER.StopTasks() respectively. If an ad-hoc report is requested, use the method Tasking.Task_Manager#TASK_MANAGER().
The default task management interval is every 60 seconds.
Developer Note
Note while this class still works, it is no longer supported as the original author stopped active development of MOOSE Therefore, this class is considered to be deprecated
Contributions: Mechanist, Prof_Hilactic, FlightControl - Concept & Testing
Author: FlightControl - Framework Design & Programming
Global(s)
Global TASK_MANAGER |
Type(s)
Fields and Methods inherited from TASK_MANAGER | Description |
---|---|
Manages the tasks for the Core.Set#SET_GROUP. |
|
TASK_MANAGER constructor. |
|
Aborted Handler OnAfter for TASK_MANAGER |
|
Cancelled Handler OnAfter for TASK_MANAGER |
|
Failed Handler OnAfter for TASK_MANAGER |
|
StartTasks Handler OnAfter for TASK_MANAGER |
|
StopTasks Handler OnAfter for TASK_MANAGER |
|
Success Handler OnAfter for TASK_MANAGER |
|
StartTasks Handler OnBefore for TASK_MANAGER |
|
StopTasks Handler OnBefore for TASK_MANAGER |
|
The set of group objects containing players for which tasks are managed. |
|
Set the refresh time interval in seconds when a new task management action needs to be done. |
|
StartTasks Trigger for TASK_MANAGER |
|
StopTasks Trigger for TASK_MANAGER |
|
StartTasks Asynchronous Trigger for TASK_MANAGER |
|
StopTasks Asynchronous Trigger for TASK_MANAGER |
|
Fields and Methods inherited from FSM | Description |
---|---|
Adds an End state. |
|
Set the default #FSM_PROCESS template with key ProcessName providing the ProcessClass and the process object when it is assigned to a Wrapper.Controllable by the task. |
|
Adds a score for the FSM to be achieved. |
|
TASK_MANAGER:AddScoreProcess(From, Event, State, ScoreText, Score) |
Adds a score for the FSM_PROCESS to be achieved. |
Add a new transition rule to the FSM. |
|
Get current state. |
|
Returns the End states. |
|
Returns a table of the SubFSM rules defined within the FSM. |
|
Returns a table with the scores defined. |
|
Returns the start state of the FSM. |
|
Get current state. |
|
Returns a table with the Subs defined. |
|
Returns a table of the transition rules defined within the FSM. |
|
Check if FSM is in state. |
|
Load call backs. |
|
Creates a new FSM object. |
|
Sets the start state of the FSM. |
|
Add to map. |
|
TASK_MANAGER:_call_handler(step, trigger, params, EventName) |
Call handler. |
Create transition. |
|
Delayed transition. |
|
Event map. |
|
Go sub. |
|
Handler. |
|
Is end state. |
|
Sub maps. |
|
Check if can do an event. |
|
Check if cannot do an event. |
|
Check if FSM is in state. |
|
TASK_MANAGER class.
Field(s)
The set of group objects containing players for which tasks are managed.
Function(s)
Manages the tasks for the Core.Set#SET_GROUP.
TASK_MANAGER constructor.
Defined in:
TASK_MANAGER
Parameter:
Core.Set#SET_GROUP SetGroup
The set of group objects containing players for which tasks are managed.
Return value:
self
Aborted Handler OnAfter for TASK_MANAGER
Cancelled Handler OnAfter for TASK_MANAGER
Failed Handler OnAfter for TASK_MANAGER
StartTasks Handler OnAfter for TASK_MANAGER
Defined in:
TASK_MANAGER
Parameters:
#string From
#string Event
#string To
StopTasks Handler OnAfter for TASK_MANAGER
Defined in:
TASK_MANAGER
Parameters:
#string From
#string Event
#string To
Success Handler OnAfter for TASK_MANAGER
StartTasks Handler OnBefore for TASK_MANAGER
Defined in:
TASK_MANAGER
Parameters:
#string From
#string Event
#string To
Return value:
#boolean:
StopTasks Handler OnBefore for TASK_MANAGER
Defined in:
TASK_MANAGER
Parameters:
#string From
#string Event
#string To
Return value:
#boolean:
Set the refresh time interval in seconds when a new task management action needs to be done.
Defined in:
TASK_MANAGER
Parameter:
#number RefreshTimeInterval
The refresh time interval in seconds when a new task management action needs to be done.
Return value:
self
StartTasks Asynchronous Trigger for TASK_MANAGER
Defined in:
TASK_MANAGER
Parameter:
#number Delay
StopTasks Asynchronous Trigger for TASK_MANAGER
Defined in:
TASK_MANAGER
Parameter:
#number Delay
Defined in:
TASK_MANAGER
Parameters:
From
Event
To
Defined in:
TASK_MANAGER
Parameters:
From
Event
To
Field(s)
The set of group objects containing players for which tasks are managed.
Function(s)
Adds an End state.
Set the default #FSM_PROCESS template with key ProcessName providing the ProcessClass and the process object when it is assigned to a Wrapper.Controllable by the task.
Defined in:
Parameters:
#table From
Can contain a string indicating the From state or a table of strings containing multiple From states.
#string Event
The Event name.
Core.Fsm#FSM_PROCESS Process
An sub-process FSM.
#table ReturnEvents
A table indicating for which returned events of the SubFSM which Event must be triggered in the FSM.
Return value:
The SubFSM.
Adds a score for the FSM to be achieved.
Defined in:
Parameters:
#string State
is the state of the process when the score needs to be given. (See the relevant state descriptions of the process).
#string ScoreText
is a text describing the score that is given according the status.
#number Score
is a number providing the score of the status.
Return value:
#FSM:
self
Adds a score for the FSM_PROCESS to be achieved.
Defined in:
Parameters:
#string From
is the From State of the main process.
#string Event
is the Event of the main process.
#string State
is the state of the process when the score needs to be given. (See the relevant state descriptions of the process).
#string ScoreText
is a text describing the score that is given according the status.
#number Score
is a number providing the score of the status.
Return value:
#FSM:
self
Add a new transition rule to the FSM.
A transition rule defines when and if the FSM can transition from a state towards another state upon a triggered event.
Defined in:
Parameters:
#table From
Can contain a string indicating the From state or a table of strings containing multiple From states.
#string Event
The Event name.
#string To
The To state.
Get current state.
Returns the End states.
Returns a table of the SubFSM rules defined within the FSM.
Returns a table with the scores defined.
Returns the start state of the FSM.
Get current state.
Returns a table with the Subs defined.
Returns a table of the transition rules defined within the FSM.
Check if FSM is in state.
Defined in:
Parameter:
#string State
State name.
Return value:
#boolean:
If true, FSM is in this state.
Load call backs.
Sets the start state of the FSM.
Add to map.
Call handler.
Defined in:
Parameters:
#string step
Step "onafter", "onbefore", "onenter", "onleave".
#string trigger
Trigger.
#table params
Parameters.
#string EventName
Event name.
Return value:
Value.
Create transition.
Defined in:
Parameter:
#string EventName
Event name.
Return value:
#function:
Function.
Delayed transition.
Defined in:
Parameter:
#string EventName
Event name.
Return value:
#function:
Function.
Event map.
Go sub.
Defined in:
Parameters:
#string ParentFrom
Parent from state.
#string ParentEvent
Parent event name.
Return value:
#table:
Subs.
Handler.
Is end state.
Defined in:
Parameter:
#string Current
Current state name.
Return values:
#table:
FSM parent.
#string:
Event name.
Sub maps.
Check if can do an event.
Defined in:
Parameter:
#string e
Event name.
Return values:
#boolean:
If true, FSM can do the event.
#string:
To state.
Check if cannot do an event.
Defined in:
Parameter:
#string e
Event name.
Return value:
#boolean:
If true, FSM cannot do the event.
Check if FSM is in state.
Defined in:
Parameters:
#string State
State name.
state
Return value:
#boolean:
If true, FSM is in this state.