Module Ops.Intel
Ops - Office of Military Intelligence.
Main Features:
- Detect and track contacts consistently
- Detect and track clusters of contacts consistently
- Use FSM events to link functionality into your scripts
- Easy setup
Author: funkyfranky
Global(s)
Global INTEL |
Top Secret! The INTEL Concept
Basic UsageSet up a detection SET_GROUP
New Intel type detection for the red side, logname "KGB"
Hook into new contacts found
## And/or new clusters found
|
Top Secret!
The INTEL Concept
- Lightweight replacement for Functional.Detection#DETECTION
- Detect and track contacts consistently
- Detect and track clusters of contacts consistently
- Once detected and still alive, planes will be tracked 10 minutes, helicopters 20 minutes, ships and trains 1 hour, ground units 2 hours
- Use FSM events to link functionality into your scripts
Basic Usage
Set up a detection SET_GROUP
Red_DetectionSetGroup = SET_GROUP:New()
Red_DetectionSetGroup:FilterPrefixes( { "Red EWR" } )
Red_DetectionSetGroup:FilterOnce()
New Intel type detection for the red side, logname "KGB"
RedIntel = INTEL:New(Red_DetectionSetGroup, "red", "KGB")
RedIntel:SetClusterAnalysis(true, true)
RedIntel:SetVerbosity(2)
RedIntel:__Start(2)
Hook into new contacts found
function RedIntel:OnAfterNewContact(From, Event, To, Contact)
local text = string.format("NEW contact %s detected by %s", Contact.groupname, Contact.recce or "unknown")
MESSAGE:New(text, 15, "KGB"):ToAll()
end
## And/or new clusters found
function RedIntel:OnAfterNewCluster(From, Event, To, Cluster)
local text = string.format("NEW cluster #%d of size %d", Cluster.index, Cluster.size)
MESSAGE:New(text,15,"KGB"):ToAll()
end
Global INTEL_DLINK |
INTEL_DLINK data aggregator |
Type(s)
Fields and Methods inherited from INTEL | Description |
---|---|
Add an accept zone. |
|
Add a group to the detection set. |
|
Add a contact to our list. |
|
Add a contact to the cluster. |
|
Add a Mission (Auftrag) to a cluster for tracking. |
|
Add a Mission (Auftrag) to a contact for tracking. |
|
Add a reject zone. |
|
Calculate cluster heading. |
|
Calculate cluster future position after given seconds. |
|
Calculate cluster speed. |
|
Calculate cluster threat level average. |
|
Calculate max cluster threat level. |
|
Calculate cluster threat level sum. |
|
Calculate cluster velocity vector. |
|
Check if contact is in any known cluster. |
|
Name of the class. |
|
Count number of alive units in cluster. |
|
Clusters of detected groups. |
|
Count number of alive units in contact. |
|
Table of detected items. |
|
Table of lost detected items. |
|
Table of new detected items. |
|
INTEL:CreateDetectedItems(DetectedGroups, DetectedStatics, RecceDetecting) |
Create detected items. |
Filter group categories. |
|
Get the altitude of a cluster. |
|
Get the coordinate of a cluster. |
|
Get the cluster this contact belongs to (if any). |
|
Get table of #INTEL.Cluster objects |
|
Get a contact by name. |
|
Get category name of a contact. |
|
Get coordinate of a contact. |
|
Get group of a contact. |
|
Get name of a contact. |
|
Get table of #INTEL.Contact objects |
|
Get threatlevel of a contact. |
|
Get type name of a contact. |
|
(Internal) Return the detected target groups of the controllable as a SET_GROUP. |
|
Get the contact with the highest threat level from the cluster. |
|
Check if contact is close to any other contact this cluster. |
|
Check if contact is close to any contact of known clusters. |
|
Make the INTEL aware of a object that was not detected (yet). |
|
Triggers the FSM event "LostCluster" after a delay. |
|
Triggers the FSM event "LostContact" after a delay. |
|
Create a new INTEL object and start the FSM. |
|
Triggers the FSM event "NewCluster" after a delay. |
|
Triggers the FSM event "NewContact" after a delay. |
|
On After "LostCluster" event. |
|
On After "LostContact" event. |
|
On After "NewCluster" event. |
|
On After "NewContact" event. |
|
[Internal] Paint picture of the battle field. |
|
Remove an accept zone from the accept zone set. |
|
Remove a contact from our list. |
|
Remove a contact from a cluster. |
|
Remove a reject zone from the reject zone set. |
|
Set accept zones. |
|
Enable or disable cluster analysis of detected targets. |
|
Change radius of the Clusters. |
|
Set whether STATIC objects are detected. |
|
Set detection types for this #INTEL - all default to true. |
|
Filter unit categories. |
|
OBSOLETE, will be removed in next version! Set forget contacts time interval. |
|
Set reject zones. |
|
Set verbosity level for debugging. |
|
Triggers the FSM event "Start". |
|
Triggers the FSM event "Status". |
|
Update cluster F10 marker. |
|
Update detected items. |
|
Add cluster to table. |
|
INTEL:_CheckClusterCoordinateChanged(Cluster, Threshold, Coordinate) |
Check if the coorindate of the cluster changed. |
Check if a contact was lost. |
|
Create a new cluster. |
|
Create a new cluster from a first contact. |
|
Create an #INTEL.Contact item from a given GROUP or STATIC object. |
|
Get closest cluster of contact. |
|
Get distance to cluster. |
|
Check if a Contact is already known. |
|
Update coordinates of the known clusters. |
|
Update an #INTEL.Contact item. |
|
Triggers the FSM event "Start" after a delay. |
|
Triggers the FSM event "Status" after a delay. |
|
Triggers the FSM event "Stop" after a delay. |
|
Set of accept zones. If defined, only contacts in these zones are considered. |
|
Name of the agency. |
|
If true, create clusters of detected targets. |
|
Running number of clusters. |
|
If true, create cluster markers on F10 map. |
|
Radius in meters in which groups/units are considered to belong to a cluster. |
|
Coalition side number, e.g. |
|
Time interval in seconds before a known contact which is not detected any more is forgotten. |
|
If |
|
Set of detection groups, aka agents. |
|
Filter for unit categories. |
|
Filter for group categories. |
|
Class id string for output to DCS log file. |
|
On after "LostCluster" event. |
|
On after "LostContact" event. |
|
On after "NewCluster" event. |
|
On after "NewContact" event. |
|
On after Start event. |
|
On after "Status" event. |
|
Seconds default to be used with CalcClusterFuturePosition. |
|
Set of reject zones. Contacts in these zones are not considered, even if they are in accept zones. |
|
Time interval in seconds after which the status is refreshed. Default 60 sec. Should be negative. |
|
Verbosity level. |
|
INTEL class version. |
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. |
|
Adds a score for the FSM_PROCESS to be achieved. |
|
Add a new transition rule to the FSM. |
|
Call scheduler. |
|
Name of the class. |
|
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. |
|
Scores. |
|
Sets the start state of the FSM. |
|
Add to map. |
|
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. |
|
Current state name. |
|
Check if FSM is in state. |
|
Options. |
|
Subs. |
Fields and Methods inherited from BASE | Description |
---|---|
The ID number of the class. |
|
The name of the class. |
|
The name of the class concatenated with the ID number of the class. |
|
Clear the state of an object. |
|
INTEL:CreateEventBirth(EventTime, Initiator, IniUnitName, place, subplace) |
Creation of a Birth Event. |
INTEL:CreateEventCrash(EventTime, Initiator, IniObjectCategory) |
Creation of a Crash Event. |
INTEL:CreateEventDead(EventTime, Initiator, IniObjectCategory) |
Creation of a Dead Event. |
Creation of a |
|
Creation of a Remove Unit Event. |
|
Creation of a Takeoff Event. |
|
Creation of a Crash Event. |
|
Log an exception which will be traced always. |
|
Returns the event dispatcher |
|
Remove all subscribed events |
|
Trace a function call. |
|
Trace a function call level 2. |
|
Trace a function call level 3. |
|
Get the ClassID of the class instance. |
|
Get the ClassName of the class instance. |
|
Get the ClassName + ClassID of the class instance. |
|
Get the Class Core.Event processing Priority. |
|
This is the worker method to retrieve the Parent class. |
|
Get a Value given a Key from the Object. |
|
Subscribe to a DCS Event. |
|
Log an information which will be traced always. |
|
This is the worker method to inherit from a parent class. |
|
This is the worker method to check if an object is an (sub)instance of a class. |
|
Enquires if tracing is on (for the class). |
|
BASE constructor. |
|
Occurs when an Event for an object is triggered. |
|
BDA. |
|
Occurs when a ground unit captures either an airbase or a farp. |
|
Occurs when any object is spawned into the mission. |
|
Occurs when any aircraft crashes into the ground and is completely destroyed. |
|
Occurs when an object is dead. |
|
Unknown precisely what creates this event, likely tied into newer damage model. |
|
Discard chair after ejection. |
|
Occurs when a pilot ejects from an aircraft Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs when any aircraft shuts down its engines. |
|
Occurs when any aircraft starts its engines. |
|
Occurs whenever an object is hit by a weapon. |
|
Occurs when any system fails on a human controlled aircraft. |
|
Occurs on the death of a unit. |
|
Occurs when an aircraft lands at an airbase, farp or ship Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs shortly after the landing animation of an ejected pilot touching the ground and standing up. |
|
Landing quality mark. |
|
Occurs when a new mark was added. |
|
Occurs when a mark text was changed. |
|
Occurs when a mark was removed. |
|
Occurs when a mission ends Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs when a mission starts Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Weapon add. |
|
Occurs when the pilot of an aircraft is killed. |
|
Occurs when a player enters a slot and takes control of an aircraft. |
|
Occurs when any player assumes direct control of a unit. |
|
Occurs when any player relieves control of a unit to the AI. |
|
Occurs when an aircraft connects with a tanker and begins taking on fuel. |
|
Occurs when an aircraft is finished taking fuel. |
|
Occurs when any modification to the "Score" as seen on the debrief menu would occur. |
|
Occurs when any unit stops firing its weapon. |
|
Occurs when any unit begins firing a weapon that has a high rate of fire. |
|
Occurs whenever any unit in a mission fires a weapon. |
|
Occurs when an aircraft takes off from an airbase, farp, or ship. |
|
Trigger zone. |
|
Occurs when the game thinks an object is destroyed. |
|
Schedule a new time event. |
|
INTEL:ScheduleRepeat(Start, Repeat, RandomizeFactor, Stop, SchedulerFunction, ...) |
Schedule a new time event. |
Stops the Schedule. |
|
Set the Class Core.Event processing Priority. |
|
Set a state or property of the Object given a Key and a Value. |
|
Trace a function logic level 1. |
|
Trace a function logic level 2. |
|
Trace a function logic level 3. |
|
Trace all methods in MOOSE |
|
Set tracing for a class |
|
Set tracing for a specific method of class |
|
Set trace level |
|
Set trace off. |
|
Set trace on. |
|
Set trace on or off Note that when trace is off, no BASE.Debug statement is performed, increasing performance! When Moose is loaded statically, (as one file), tracing is switched off by default. |
|
UnSubscribe to a DCS event. |
|
INTEL:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) |
Trace a function call. |
INTEL:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) |
Trace a function logic. |
The main event handling function... |
Fields and Methods inherited from INTEL.Cluster | Description |
---|---|
Table of contacts in the cluster. |
|
[AIR] Average flight altitude of the cluster in meters. |
|
Coordinate of the cluster. |
|
Cluster type of #INTEL.Ctype. |
|
Cluster index. |
|
F10 marker. |
|
Marker ID. |
|
The current Auftrag attached to this cluster. |
|
Number of groups in the cluster. |
|
Average of threat levels. |
|
Max threat level of cluster. |
|
Sum of threat levels. |
Fields and Methods inherited from INTEL.Contact | Description |
---|---|
Time stamp in abs. mission time seconds when this item was last detected. |
|
[AIR] Flight altitude of the contact in meters. |
|
Generalized attribute. |
|
Category number. |
|
Category name. |
|
Contact type of #INTEL.Ctype. |
|
The contact group. |
|
Name of the group. |
|
[AIR] Heading of the contact, if available. |
|
If |
|
If |
|
If |
|
If |
|
[AIR] Contact has changed direction by >10 deg. |
|
The current Auftrag attached to this contact. |
|
[AIR] Contact platform name, e.g. Foxbat, Flanker_E, defaults to Bogey if unknown |
|
Last known position of the item. |
|
The name of the recce unit that detected this contact. |
|
Last known speed in m/s. |
|
The Target attached to this contact. |
|
Threat level of this item. |
|
Type name of detected item. |
|
3D velocity vector. Components x,y and z in m/s. |
Fields and Methods inherited from INTEL.Ctype | Description |
---|---|
Airpane or helicopter. |
|
Ground. |
|
Ship. |
|
Static structure. |
Fields and Methods inherited from INTEL_DLINK | Description |
---|---|
Function to add an #INTEL object to the aggregator |
|
Name of the class. |
|
Triggers the FSM event "Collect". |
|
Function to query the detected clusters |
|
Function to query the detected contacts |
|
Function to query the detected contact coordinates |
|
Function to instantiate a new object |
|
INTEL_DLINK:OnAfterCollected(From, Event, To, Contacts, Clusters) |
On After "Collected" event. |
Pseudo Functions- Triggers the FSM event "Start". |
|
Triggers the FSM event "Start" after a delay. |
|
Triggers the FSM event "Collect" after a delay. |
|
Triggers the FSM event "Stop" after a delay. |
|
Alias name for logging. |
|
Number of seconds to keep an object. |
|
Table of Ops.Intelligence#INTEL.Cluster clusters. |
|
Table of contacts' Core.Point#COORDINATE objects. |
|
Table of Ops.Intelligence#INTEL.Contact contacts. |
|
Number of seconds between collection runs. |
|
Class id string for output to DCS log file. |
|
Function to start the work. |
|
Function to stop |
|
Function to collect data from the various #INTEL |
|
INTEL_DLINK:onbeforeCollected(From, Event, To, Contacts, Clusters) |
Function called after collection is done |
Make the logging verbose. |
|
Version string |
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. |
|
INTEL_DLINK:AddScoreProcess(From, Event, State, ScoreText, Score) |
Adds a score for the FSM_PROCESS to be achieved. |
Add a new transition rule to the FSM. |
|
Call scheduler. |
|
Name of the class. |
|
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. |
|
Scores. |
|
Sets the start state of the FSM. |
|
Add to map. |
|
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. |
|
Current state name. |
|
Check if FSM is in state. |
|
Options. |
|
Subs. |
Fields and Methods inherited from BASE | Description |
---|---|
The ID number of the class. |
|
The name of the class. |
|
The name of the class concatenated with the ID number of the class. |
|
Clear the state of an object. |
|
INTEL_DLINK:CreateEventBirth(EventTime, Initiator, IniUnitName, place, subplace) |
Creation of a Birth Event. |
INTEL_DLINK:CreateEventCrash(EventTime, Initiator, IniObjectCategory) |
Creation of a Crash Event. |
INTEL_DLINK:CreateEventDead(EventTime, Initiator, IniObjectCategory) |
Creation of a Dead Event. |
Creation of a |
|
Creation of a Remove Unit Event. |
|
Creation of a Takeoff Event. |
|
Creation of a Crash Event. |
|
Log an exception which will be traced always. |
|
Returns the event dispatcher |
|
Remove all subscribed events |
|
Trace a function call. |
|
Trace a function call level 2. |
|
Trace a function call level 3. |
|
Get the ClassID of the class instance. |
|
Get the ClassName of the class instance. |
|
Get the ClassName + ClassID of the class instance. |
|
Get the Class Core.Event processing Priority. |
|
This is the worker method to retrieve the Parent class. |
|
Get a Value given a Key from the Object. |
|
Subscribe to a DCS Event. |
|
Log an information which will be traced always. |
|
This is the worker method to inherit from a parent class. |
|
This is the worker method to check if an object is an (sub)instance of a class. |
|
Enquires if tracing is on (for the class). |
|
BASE constructor. |
|
Occurs when an Event for an object is triggered. |
|
BDA. |
|
Occurs when a ground unit captures either an airbase or a farp. |
|
Occurs when any object is spawned into the mission. |
|
Occurs when any aircraft crashes into the ground and is completely destroyed. |
|
Occurs when an object is dead. |
|
Unknown precisely what creates this event, likely tied into newer damage model. |
|
Discard chair after ejection. |
|
Occurs when a pilot ejects from an aircraft Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs when any aircraft shuts down its engines. |
|
Occurs when any aircraft starts its engines. |
|
Occurs whenever an object is hit by a weapon. |
|
Occurs when any system fails on a human controlled aircraft. |
|
Occurs on the death of a unit. |
|
Occurs when an aircraft lands at an airbase, farp or ship Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs shortly after the landing animation of an ejected pilot touching the ground and standing up. |
|
Landing quality mark. |
|
Occurs when a new mark was added. |
|
Occurs when a mark text was changed. |
|
Occurs when a mark was removed. |
|
Occurs when a mission ends Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Occurs when a mission starts Have a look at the class Core.Event#EVENT as these are just the prototypes. |
|
Weapon add. |
|
Occurs when the pilot of an aircraft is killed. |
|
Occurs when a player enters a slot and takes control of an aircraft. |
|
Occurs when any player assumes direct control of a unit. |
|
Occurs when any player relieves control of a unit to the AI. |
|
Occurs when an aircraft connects with a tanker and begins taking on fuel. |
|
Occurs when an aircraft is finished taking fuel. |
|
Occurs when any modification to the "Score" as seen on the debrief menu would occur. |
|
Occurs when any unit stops firing its weapon. |
|
Occurs when any unit begins firing a weapon that has a high rate of fire. |
|
Occurs whenever any unit in a mission fires a weapon. |
|
Occurs when an aircraft takes off from an airbase, farp, or ship. |
|
Trigger zone. |
|
Occurs when the game thinks an object is destroyed. |
|
Schedule a new time event. |
|
INTEL_DLINK:ScheduleRepeat(Start, Repeat, RandomizeFactor, Stop, SchedulerFunction, ...) |
Schedule a new time event. |
Stops the Schedule. |
|
Set the Class Core.Event processing Priority. |
|
Set a state or property of the Object given a Key and a Value. |
|
Trace a function logic level 1. |
|
Trace a function logic level 2. |
|
Trace a function logic level 3. |
|
Trace all methods in MOOSE |
|
Set tracing for a class |
|
Set tracing for a specific method of class |
|
Set trace level |
|
Set trace off. |
|
Set trace on. |
|
Set trace on or off Note that when trace is off, no BASE.Debug statement is performed, increasing performance! When Moose is loaded statically, (as one file), tracing is switched off by default. |
|
UnSubscribe to a DCS event. |
|
INTEL_DLINK:_F(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) |
Trace a function call. |
INTEL_DLINK:_T(Arguments, DebugInfoCurrentParam, DebugInfoFromParam) |
Trace a function logic. |
The main event handling function... |
INTEL class.
Field(s)
Name of the class.
Clusters of detected groups.
Table of detected items.
Table of lost detected items.
Table of new detected items.
Set of accept zones. If defined, only contacts in these zones are considered.
Name of the agency.
If true, create clusters of detected targets.
Running number of clusters.
If true, create cluster markers on F10 map.
Radius in meters in which groups/units are considered to belong to a cluster.
Coalition side number, e.g. coalition.side.RED
.
Time interval in seconds before a known contact which is not detected any more is forgotten.
If true
, detect STATIC objects. Default false
.
Filter for unit categories.
Filter for group categories.
Class id string for output to DCS log file.
Seconds default to be used with CalcClusterFuturePosition.
Set of reject zones. Contacts in these zones are not considered, even if they are in accept zones.
Time interval in seconds after which the status is refreshed. Default 60 sec. Should be negative.
Verbosity level.
INTEL class version.
Function(s)
Add an accept zone.
Only contacts detected in this zone are considered.
Defined in:
INTEL
Parameter:
Core.Zone#ZONE AcceptZone
Add a zone to the accept zone set.
Return value:
self
Add a group to the detection set.
Defined in:
INTEL
Parameter:
Wrapper.Group#GROUP AgentGroup
Group of agents. Can also be an Ops.OpsGroup#OPSGROUP object.
Return value:
self
Add a contact to our list.
Add a contact to the cluster.
Defined in:
INTEL
Parameters:
#INTEL.Contact contact
The contact.
#INTEL.Cluster cluster
The cluster.
Add a Mission (Auftrag) to a cluster for tracking.
Defined in:
INTEL
Parameters:
#INTEL.Cluster Cluster
The cluster
Ops.Auftrag#AUFTRAG Mission
The mission connected with this cluster
Return value:
self
Add a Mission (Auftrag) to a contact for tracking.
Defined in:
INTEL
Parameters:
#INTEL.Contact Contact
The contact
Ops.Auftrag#AUFTRAG Mission
The mission connected with this contact
Return value:
self
Add a reject zone.
Contacts detected in this zone are rejected and not reported by the detection. Note that reject zones overrule accept zones, i.e. if a unit is inside and accept zone and inside a reject zone, it is rejected.
Defined in:
INTEL
Parameter:
Core.Zone#ZONE RejectZone
Add a zone to the reject zone set.
Return value:
self
Calculate cluster heading.
Defined in:
INTEL
Parameter:
#INTEL.Cluster cluster
The cluster of contacts.
Return value:
#number:
Heading average of all groups in the cluster.
Calculate cluster future position after given seconds.
Defined in:
INTEL
Parameters:
#INTEL.Cluster cluster
The cluster of contacts.
#number seconds
Time interval in seconds. Default is self.prediction
.
Return value:
Calculated future position of the cluster.
Calculate cluster speed.
Defined in:
INTEL
Parameter:
#INTEL.Cluster cluster
The cluster of contacts.
Return value:
#number:
Speed average of all groups in the cluster in MPS.
Calculate cluster threat level average.
Defined in:
INTEL
Parameter:
#INTEL.Cluster cluster
The cluster of contacts.
Return value:
#number:
Average of all threat levels of all groups in the cluster.
Calculate max cluster threat level.
Defined in:
INTEL
Parameter:
#INTEL.Cluster cluster
The cluster of contacts.
Return value:
#number:
Max threat levels of all groups in the cluster.
Calculate cluster threat level sum.
Defined in:
INTEL
Parameter:
#INTEL.Cluster cluster
The cluster of contacts.
Return value:
#number:
Sum of all threat levels of all groups in the cluster.
Calculate cluster velocity vector.
Defined in:
INTEL
Parameter:
#INTEL.Cluster cluster
The cluster of contacts.
Return value:
Velocity vector in m/s.
Check if contact is in any known cluster.
Defined in:
INTEL
Parameter:
#INTEL.Contact contact
The contact.
Return value:
#boolean:
If true, contact is in clusters
Count number of alive units in cluster.
Count number of alive units in contact.
Create detected items.
Defined in:
INTEL
Parameters:
#table DetectedGroups
Table of detected Groups.
#table DetectedStatics
Table of detected Statics.
#table RecceDetecting
Table of detecting recce names.
Filter group categories.
Valid categories are:
- Group.Category.AIRPLANE
- Group.Category.HELICOPTER
- Group.Category.GROUND
- Group.Category.SHIP
- Group.Category.TRAIN
Defined in:
INTEL
Parameter:
#table GroupCategories
Filter categories, e.g. {Group.Category.AIRPLANE, Group.Category.HELICOPTER}
.
Return value:
self
Get the altitude of a cluster.
Defined in:
INTEL
Parameters:
#INTEL.Cluster Cluster
The cluster.
#boolean Update
If true
, update the altitude. Default is to just return the last stored altitude.
Return value:
#number:
The average altitude (ASL) of this cluster in meters.
Get the coordinate of a cluster.
Defined in:
INTEL
Parameters:
#INTEL.Cluster Cluster
The cluster.
#boolean Update
If true
, update the coordinate. Default is to just return the last stored position.
Return value:
The coordinate of this cluster.
Get the cluster this contact belongs to (if any).
Defined in:
INTEL
Parameter:
#INTEL.Contact contact
The contact.
Return value:
The cluster this contact belongs to or nil.
Get table of #INTEL.Cluster objects
Defined in:
INTEL
Return value:
#table:
Clusters or nil if not running
Get a contact by name.
Defined in:
INTEL
Parameter:
#string groupname
Name of the contact group.
Return value:
The contact.
Get category name of a contact.
Defined in:
INTEL
Parameter:
#INTEL.Contact Contact
The contact.
Return value:
#string:
Category name.
Get coordinate of a contact.
Get group of a contact.
Get name of a contact.
Defined in:
INTEL
Parameter:
#INTEL.Contact Contact
The contact.
Return value:
#string:
Name of the contact.
Get table of #INTEL.Contact objects
Defined in:
INTEL
Return value:
#table:
Contacts or nil if not running
Get threatlevel of a contact.
Defined in:
INTEL
Parameter:
#INTEL.Contact Contact
The contact.
Return value:
#number:
Threat level.
Get type name of a contact.
(Internal) Return the detected target groups of the controllable as a SET_GROUP.
The optional parametes specify the detection methods that can be applied. If no detection method is given, the detection will use all the available methods by default.
Defined in:
INTEL
Parameters:
Wrapper.Unit#UNIT Unit
The unit detecting.
#table DetectedUnits
Table of detected units to be filled.
#table RecceDetecting
Table of recce per unit to be filled.
#boolean DetectVisual
(Optional) If false, do not include visually detected targets.
#boolean DetectOptical
(Optional) If false, do not include optically detected targets.
#boolean DetectRadar
(Optional) If false, do not include targets detected by radar.
#boolean DetectIRST
(Optional) If false, do not include targets detected by IRST.
#boolean DetectRWR
(Optional) If false, do not include targets detected by RWR.
#boolean DetectDLINK
(Optional) If false, do not include targets detected by data link.
Get the contact with the highest threat level from the cluster.
Defined in:
INTEL
Parameter:
#INTEL.Cluster Cluster
The cluster.
Return value:
the contact or nil if none
Check if contact is close to any other contact this cluster.
Defined in:
INTEL
Parameters:
#INTEL.Contact contact
The contact.
#INTEL.Cluster cluster
The cluster the check.
Return values:
#boolean:
If true
, contact is connected to this cluster.
#number:
Distance to cluster in meters.
Check if contact is close to any contact of known clusters.
Defined in:
INTEL
Parameter:
#INTEL.Contact contact
The contact.
Return value:
The cluster this contact is part of or nil otherwise.
Make the INTEL aware of a object that was not detected (yet).
This will add the object to the contacts table and trigger a NewContact
event.
Defined in:
INTEL
Parameters:
Wrapper.Positionable#POSITIONABLE Positionable
Group or static object.
#string RecceName
Name of the recce group that detected this object.
#number Tdetected
Abs. mission time in seconds, when the object is detected. Default now.
Return value:
self
Triggers the FSM event "LostCluster" after a delay.
Defined in:
INTEL
Parameters:
#number delay
Delay in seconds.
#INTEL.Cluster Cluster
Lost cluster.
Ops.Auftrag#AUFTRAG Mission
The Auftrag connected with this cluster or nil
.
Triggers the FSM event "LostContact" after a delay.
Create a new INTEL object and start the FSM.
Defined in:
INTEL
Parameters:
Core.Set#SET_GROUP DetectionSet
Set of detection groups.
#number Coalition
Coalition side. Can also be passed as a string "red", "blue" or "neutral".
#string Alias
An optional alias how this object is called in the logs etc.
Return value:
self
Triggers the FSM event "NewCluster" after a delay.
Defined in:
INTEL
Parameters:
#number delay
Delay in seconds.
#INTEL.Cluster Cluster
Detected cluster.
Triggers the FSM event "NewContact" after a delay.
Defined in:
INTEL
Parameters:
#number delay
Delay in seconds.
#INTEL.Contact Contact
Detected contact.
On After "LostCluster" event.
Defined in:
INTEL
Parameters:
#string From
From state.
#string Event
Event.
#string To
To state.
#INTEL.Cluster Cluster
Lost cluster.
Ops.Auftrag#AUFTRAG Mission
The Auftrag connected with this cluster or nil
.
On After "LostContact" event.
Defined in:
INTEL
Parameters:
#string From
From state.
#string Event
Event.
#string To
To state.
#INTEL.Contact Contact
Lost contact.
On After "NewCluster" event.
Defined in:
INTEL
Parameters:
#string From
From state.
#string Event
Event.
#string To
To state.
#INTEL.Cluster Cluster
Detected cluster.
On After "NewContact" event.
Defined in:
INTEL
Parameters:
#string From
From state.
#string Event
Event.
#string To
To state.
#INTEL.Contact Contact
Detected contact.
[Internal] Paint picture of the battle field.
Does Cluster analysis and updates clusters. Sets markers if markers are enabled.
Defined in:
INTEL
Remove an accept zone from the accept zone set.
Defined in:
INTEL
Parameter:
Core.Zone#ZONE AcceptZone
Remove a zone from the accept zone set.
Return value:
self
Remove a contact from our list.
Remove a contact from a cluster.
Defined in:
INTEL
Parameters:
#INTEL.Contact contact
The contact.
#INTEL.Cluster cluster
The cluster.
Remove a reject zone from the reject zone set.
Defined in:
INTEL
Parameter:
Core.Zone#ZONE RejectZone
Remove a zone from the reject zone set.
Return value:
self
Set accept zones.
Only contacts detected in this/these zone(s) are considered.
Defined in:
INTEL
Parameter:
Core.Set#SET_ZONE AcceptZoneSet
Set of accept zones.
Return value:
self
Enable or disable cluster analysis of detected targets.
Targets will be grouped in coupled clusters.
Defined in:
INTEL
Parameters:
#boolean Switch
If true, enable cluster analysis.
#boolean Markers
If true, place markers on F10 map.
#boolean Arrows
If true, draws arrows on F10 map.
Return value:
self
Change radius of the Clusters.
Defined in:
INTEL
Parameter:
#number radius
The radius of the clusters in kilometers. Default 15 km.
Return value:
self
Set whether STATIC objects are detected.
Defined in:
INTEL
Parameter:
#boolean Switch
If true
, statics are detected.
Return value:
self
Set detection types for this #INTEL - all default to true.
Defined in:
INTEL
Parameters:
#boolean DetectVisual
Visual detection
#boolean DetectOptical
Optical detection
#boolean DetectRadar
Radar detection
#boolean DetectIRST
IRST detection
#boolean DetectRWR
RWR detection
#boolean DetectDLINK
Data link detection
Return value:
self
Filter unit categories.
Valid categories are:
- Unit.Category.AIRPLANE
- Unit.Category.HELICOPTER
- Unit.Category.GROUND_UNIT
- Unit.Category.SHIP
- Unit.Category.STRUCTURE
Defined in:
INTEL
Parameter:
#table Categories
Filter categories, e.g. {Unit.Category.AIRPLANE, Unit.Category.HELICOPTER}.
Return value:
self
OBSOLETE, will be removed in next version! Set forget contacts time interval.
Previously known contacts that are not detected any more, are "lost" after this time. This avoids fast oscillations between a contact being detected and undetected.
Defined in:
INTEL
Parameter:
#number TimeInterval
Time interval in seconds. Default is 120 sec.
Return value:
self
Set reject zones.
Contacts detected in this/these zone(s) are rejected and not reported by the detection. Note that reject zones overrule accept zones, i.e. if a unit is inside and accept zone and inside a reject zone, it is rejected.
Defined in:
INTEL
Parameter:
Core.Set#SET_ZONE RejectZoneSet
Set of reject zone(s).
Return value:
self
Set verbosity level for debugging.
Defined in:
INTEL
Parameter:
#number Verbosity
The higher, the noisier, e.g. 0=off, 2=debug
Return value:
self
Triggers the FSM event "Start".
Starts the INTEL. Initializes parameters and starts event handlers.
Defined in:
INTEL
Update cluster F10 marker.
Add cluster to table.
Check if the coorindate of the cluster changed.
Defined in:
INTEL
Parameters:
#INTEL.Cluster Cluster
The cluster.
#number Threshold
in meters. Default 100 m.
Core.Point#COORDINATE Coordinate
Reference coordinate. Default is the last known coordinate of the cluster.
Return value:
#boolean:
If true
, the coordinate changed by more than the given threshold.
Check if a contact was lost.
Defined in:
INTEL
Parameter:
#INTEL.Contact Contact
The contact to be removed.
Return value:
#boolean:
If true, contact was not detected for at least dTforget seconds.
Create a new cluster.
Create a new cluster from a first contact.
The contact is automatically added to the cluster.
Defined in:
INTEL
Parameter:
#INTEL.Contact Contact
The first contact.
Return value:
cluster The cluster.
Create an #INTEL.Contact item from a given GROUP or STATIC object.
Defined in:
INTEL
Parameters:
Wrapper.Positionable#POSITIONABLE Positionable
The GROUP or STATIC object.
#string RecceName
The name of the recce group that has detected this contact.
Return value:
The contact.
Get closest cluster of contact.
Defined in:
INTEL
Parameter:
#INTEL.Contact Contact
The contact.
Return values:
The cluster this contact is part of or #nil
otherwise.
#number:
Distance to cluster in meters.
Get distance to cluster.
Defined in:
INTEL
Parameters:
#INTEL.Contact Contact
The contact.
#INTEL.Cluster Cluster
The cluster to which the distance is calculated.
Return value:
#number:
Distance in meters.
Check if a Contact is already known.
It is checked, whether the contact is in the contacts table.
Defined in:
INTEL
Parameter:
#INTEL.Contact Contact
The contact to be added.
Return value:
#boolean:
If true
, contact is already known.
Update an #INTEL.Contact item.
Triggers the FSM event "Start" after a delay.
Starts the INTEL. Initializes parameters and starts event handlers.
Defined in:
INTEL
Parameter:
#number delay
Delay in seconds.
Triggers the FSM event "Status" after a delay.
Defined in:
INTEL
Parameter:
#number delay
Delay in seconds.
Triggers the FSM event "Stop" after a delay.
Stops the INTEL and all its event handlers.
Defined in:
INTEL
Parameter:
#number delay
Delay in seconds.
On after "LostCluster" event.
Defined in:
INTEL
Parameters:
#string From
From state.
#string Event
Event.
#string To
To state.
#INTEL.Cluster Cluster
Lost cluster.
Ops.Auftrag#AUFTRAG Mission
The Auftrag connected with this cluster or nil
.
On after "LostContact" event.
Defined in:
INTEL
Parameters:
#string From
From state.
#string Event
Event.
#string To
To state.
#INTEL.Contact Contact
Lost contact.
On after "NewCluster" event.
Defined in:
INTEL
Parameters:
#string From
From state.
#string Event
Event.
#string To
To state.
#INTEL.Cluster Cluster
Detected cluster.
On after "NewContact" event.
Defined in:
INTEL
Parameters:
#string From
From state.
#string Event
Event.
#string To
To state.
#INTEL.Contact Contact
Detected contact.
On after Start event.
Starts the FLIGHTGROUP FSM and event handlers.
Defined in:
INTEL
Parameters:
#string From
From state.
#string Event
Event.
#string To
To state.
On after "Status" event.
Defined in:
INTEL
Parameters:
#string From
From state.
#string Event
Event.
#string To
To state.
Field(s)
Name of the class.
Clusters of detected groups.
Table of detected items.
Table of lost detected items.
Table of new detected items.
Set of accept zones. If defined, only contacts in these zones are considered.
Name of the agency.
If true, create clusters of detected targets.
Running number of clusters.
If true, create cluster markers on F10 map.
Radius in meters in which groups/units are considered to belong to a cluster.
Coalition side number, e.g. coalition.side.RED
.
Time interval in seconds before a known contact which is not detected any more is forgotten.
If true
, detect STATIC objects. Default false
.
Filter for unit categories.
Filter for group categories.
Class id string for output to DCS log file.
Seconds default to be used with CalcClusterFuturePosition.
Set of reject zones. Contacts in these zones are not considered, even if they are in accept zones.
Time interval in seconds after which the status is refreshed. Default 60 sec. Should be negative.
Verbosity level.
INTEL class version.
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.
Field(s)
Name of the class.
Clusters of detected groups.
Table of detected items.
Table of lost detected items.
Table of new detected items.
Set of accept zones. If defined, only contacts in these zones are considered.
Name of the agency.
If true, create clusters of detected targets.
Running number of clusters.
If true, create cluster markers on F10 map.
Radius in meters in which groups/units are considered to belong to a cluster.
Coalition side number, e.g. coalition.side.RED
.
Time interval in seconds before a known contact which is not detected any more is forgotten.
If true
, detect STATIC objects. Default false
.
Filter for unit categories.
Filter for group categories.
Class id string for output to DCS log file.
Seconds default to be used with CalcClusterFuturePosition.
Set of reject zones. Contacts in these zones are not considered, even if they are in accept zones.
Time interval in seconds after which the status is refreshed. Default 60 sec. Should be negative.
Verbosity level.
INTEL class version.
Function(s)
Clear the state of an object.
Defined in:
Parameters:
Object
The object that holds the Value set by the Key.
StateName
The key that is should be cleared.
Creation of a Birth Event.
Defined in:
Parameters:
DCS#Time EventTime
The time stamp of the event.
DCS#Object Initiator
The initiating object of the event.
#string IniUnitName
The initiating unit name.
place
subplace
Creation of a Crash Event.
Defined in:
Parameters:
DCS#Time EventTime
The time stamp of the event.
DCS#Object Initiator
The initiating object of the event.
IniObjectCategory
Creation of a Dead Event.
Defined in:
Parameters:
DCS#Time EventTime
The time stamp of the event.
DCS#Object Initiator
The initiating object of the event.
IniObjectCategory
Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT
event.
Creation of a Remove Unit Event.
Defined in:
Parameters:
DCS#Time EventTime
The time stamp of the event.
DCS#Object Initiator
The initiating object of the event.
Creation of a Takeoff Event.
Defined in:
Parameters:
DCS#Time EventTime
The time stamp of the event.
DCS#Object Initiator
The initiating object of the event.
Creation of a Crash Event.
Defined in:
Parameters:
DCS#Time EventTime
The time stamp of the event.
DCS#Object Initiator
The initiating object of the event.
Log an exception which will be traced always.
Can be anywhere within the function logic.
Returns the event dispatcher
Trace a function call.
Must be at the beginning of the function logic.
Trace a function call level 2.
Must be at the beginning of the function logic.
Trace a function call level 3.
Must be at the beginning of the function logic.
Get the ClassID of the class instance.
Get the ClassName of the class instance.
Get the ClassName + ClassID of the class instance.
The ClassName + ClassID is formatted as '%s#%09d'.
Get the Class Core.Event processing Priority.
The Event processing Priority is a number from 1 to 10, reflecting the order of the classes subscribed to the Event to be processed.
This is the worker method to retrieve the Parent class.
Note that the Parent class must be passed to call the parent class method.
self:GetParent(self):ParentMethod()
Get a Value given a Key from the Object.
Note that if the Object is destroyed, set to nil, or garbage collected, then the Values and Keys will also be gone.
Defined in:
Parameters:
Object
The object that holds the Value set by the Key.
Key
The key that is used to retrieve the value. Note that the key can be a #string, but it can also be any other type!
Return value:
The Value retrieved or nil if the Key was not found and thus the Value could not be retrieved.
Subscribe to a DCS Event.
Defined in:
Parameters:
Core.Event#EVENTS EventID
Event ID.
#function EventFunction
(optional) The function to be called when the event occurs for the unit.
Return value:
Log an information which will be traced always.
Can be anywhere within the function logic.
This is the worker method to inherit from a parent class.
Defined in:
Parameters:
Child
is the Child class that inherits.
#BASE Parent
is the Parent class that the Child inherits from.
Return value:
Child
This is the worker method to check if an object is an (sub)instance of a class.
Examples:
ZONE:New( 'some zone' ):IsInstanceOf( ZONE ) will return true
ZONE:New( 'some zone' ):IsInstanceOf( 'ZONE' ) will return true
ZONE:New( 'some zone' ):IsInstanceOf( 'zone' ) will return true
ZONE:New( 'some zone' ):IsInstanceOf( 'BASE' ) will return true
ZONE:New( 'some zone' ):IsInstanceOf( 'GROUP' ) will return false
Defined in:
Parameter:
ClassName
is the name of the class or the class itself to run the check against
Return value:
#boolean:
Enquires if tracing is on (for the class).
BASE constructor.
This is an example how to use the BASE:New() constructor in a new class definition when inheriting from BASE.
function EVENT:New()
local self = BASE:Inherit( self, BASE:New() ) -- #EVENT
return self
end
Occurs when an Event for an object is triggered.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that triggered the event.
Occurs when a ground unit captures either an airbase or a farp.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that captured the base place: The airbase that was captured, can be a FARP or Airbase. When calling place:getCoalition() the faction will already be the new owning faction.
Occurs when any object is spawned into the mission.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was spawned
Occurs when any aircraft crashes into the ground and is completely destroyed.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that has crashed
Occurs when an object is dead.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is dead.
Unknown precisely what creates this event, likely tied into newer damage model.
Will update this page when new information become available.
- initiator: The unit that had the failure.
Discard chair after ejection.
Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when a pilot ejects from an aircraft Have a look at the class Core.Event#EVENT as these are just the prototypes.
initiator : The unit that has ejected
Occurs when any aircraft shuts down its engines.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is stopping its engines.
Occurs when any aircraft starts its engines.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is starting its engines.
Occurs whenever an object is hit by a weapon.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit object the fired the weapon weapon: Weapon object that hit the target target: The Object that was hit.
Occurs when any system fails on a human controlled aircraft.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that had the failure
Occurs on the death of a unit.
Contains more and different information. Similar to unit_lost it will occur for aircraft before the aircraft crash event occurs. Have a look at the class Core.Event#EVENT as these are just the prototypes.
- initiator: The unit that killed the target
- target: Target Object
- weapon: Weapon Object
Occurs when an aircraft lands at an airbase, farp or ship Have a look at the class Core.Event#EVENT as these are just the prototypes.
initiator : The unit that has landed place: Object that the unit landed on. Can be an Airbase Object, FARP, or Ships
Occurs shortly after the landing animation of an ejected pilot touching the ground and standing up.
Event does not occur if the pilot lands in the water and sub combs to Davey Jones Locker. Have a look at the class Core.Event#EVENT as these are just the prototypes.
- initiator: Static object representing the ejected pilot. Place : Aircraft that the pilot ejected from.
- place: may not return as a valid object if the aircraft has crashed into the ground and no longer exists.
- subplace: is always 0 for unknown reasons.
Occurs when a new mark was added.
Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.
Occurs when a mark text was changed.
Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.
Occurs when a mark was removed.
Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.
Occurs when a mission ends Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when a mission starts Have a look at the class Core.Event#EVENT as these are just the prototypes.
Weapon add.
Fires when entering a mission per pylon with the name of the weapon (double pylons not counted, infinite wep reload not counted. Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when the pilot of an aircraft is killed.
Can occur either if the player is alive and crashes or if a weapon kills the pilot without completely destroying the plane. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that the pilot has died in.
Occurs when a player enters a slot and takes control of an aircraft.
Have a look at the class Core.Event#EVENT as these are just the prototypes. NOTE: This is a workaround of a long standing DCS bug with the PLAYER_ENTER_UNIT event. initiator : The unit that is being taken control of.
Occurs when any player assumes direct control of a unit.
Note - not Mulitplayer safe. Use PlayerEnterAircraft. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is being taken control of.
Occurs when any player relieves control of a unit to the AI.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that the player left.
Occurs when an aircraft connects with a tanker and begins taking on fuel.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is receiving fuel.
Occurs when an aircraft is finished taking fuel.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was receiving fuel.
Occurs when any modification to the "Score" as seen on the debrief menu would occur.
There is no information on what values the score was changed to. Event is likely similar to player_comment in this regard. Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when any unit stops firing its weapon.
Event will always correspond with a shooting start event. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was doing the shooting.
Occurs when any unit begins firing a weapon that has a high rate of fire.
Most common with aircraft cannons (GAU-8), autocannons, and machine guns. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is doing the shooting. target: The unit that is being targeted.
Occurs whenever any unit in a mission fires a weapon.
But not any machine gun or autocannon based weapon, those are handled by EVENT.ShootingStart. Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when an aircraft takes off from an airbase, farp, or ship.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that tookoff place: Object from where the AI took-off from. Can be an Airbase Object, FARP, or Ships
Occurs when the game thinks an object is destroyed.
Have a look at the class Core.Event#EVENT as these are just the prototypes.
- initiator: The unit that is was destroyed.
Schedule a new time event.
Note that the schedule will only take place if the scheduler is started. Even for a single schedule event, the scheduler needs to be started also.
Defined in:
Parameters:
#number Start
Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.
#function SchedulerFunction
The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.
#table ...
Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.
Return value:
#string:
The Schedule ID of the planned schedule.
Schedule a new time event.
Note that the schedule will only take place if the scheduler is started. Even for a single schedule event, the scheduler needs to be started also.
Defined in:
Parameters:
#number Start
Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.
#number Repeat
Specifies the interval in seconds when the scheduler will call the event function.
#number RandomizeFactor
Specifies a randomization factor between 0 and 1 to randomize the Repeat.
#number Stop
Specifies the amount of seconds when the scheduler will be stopped.
#function SchedulerFunction
The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.
#table ...
Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.
Return value:
#string:
The Schedule ID of the planned schedule.
Stops the Schedule.
Defined in:
Parameter:
#string SchedulerID
(Optional) Scheduler ID to be stopped. If nil, all pending schedules are stopped.
Set the Class Core.Event processing Priority.
The Event processing Priority is a number from 1 to 10, reflecting the order of the classes subscribed to the Event to be processed.
Set a state or property of the Object given a Key and a Value.
Note that if the Object is destroyed, set to nil, or garbage collected, then the Values and Keys will also be gone.
Defined in:
Parameters:
Object
The object that will hold the Value set by the Key.
Key
The key that is used as a reference of the value. Note that the key can be a #string, but it can also be any other type!
Value
The value to is stored in the object.
Return value:
The Value set.
Trace a function logic level 1.
Can be anywhere within the function logic.
Trace a function logic level 2.
Can be anywhere within the function logic.
Trace a function logic level 3.
Can be anywhere within the function logic.
Trace all methods in MOOSE
Set tracing for a class
Set tracing for a specific method of class
Set trace off.
Set trace on.
Set trace on or off Note that when trace is off, no BASE.Debug statement is performed, increasing performance! When Moose is loaded statically, (as one file), tracing is switched off by default.
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.
Defined in:
Parameter:
#boolean TraceOnOff
Switch the tracing on or off.
Usage:
-- Switch the tracing On
BASE:TraceOnOff( true )
-- Switch the tracing Off
BASE:TraceOnOff( false )
UnSubscribe to a DCS event.
Trace a function call.
This function is private.
Defined in:
Parameters:
Arguments
A #table or any field.
DebugInfoCurrentParam
DebugInfoFromParam
Trace a function logic.
Defined in:
Parameters:
Arguments
A #table or any field.
DebugInfoCurrentParam
DebugInfoFromParam
The main event handling function...
This function captures all events generated for the class.
Cluster info.
Field(s)
Table of contacts in the cluster.
[AIR] Average flight altitude of the cluster in meters.
Cluster type of #INTEL.Ctype.
Cluster index.
Marker ID.
Number of groups in the cluster.
Average of threat levels.
Max threat level of cluster.
Sum of threat levels.
Function(s)
Detected item info.
Field(s)
Time stamp in abs. mission time seconds when this item was last detected.
[AIR] Flight altitude of the contact in meters.
Generalized attribute.
Category number.
Category name.
Contact type of #INTEL.Ctype.
Name of the group.
[AIR] Heading of the contact, if available.
If true
, contact is a STATIC object.
If true
, contact is a ground group.
If true
, contact is a helo group.
If true
, contact is a naval group.
[AIR] Contact has changed direction by >10 deg.
[AIR] Contact platform name, e.g. Foxbat, Flanker_E, defaults to Bogey if unknown
The name of the recce unit that detected this contact.
Last known speed in m/s.
Threat level of this item.
Type name of detected item.
Function(s)
Contact or cluster type.
Field(s)
Airpane or helicopter.
Ground.
Ship.
Static structure.
Function(s)
INTEL_DLINK class.
Field(s)
Name of the class.
Alias name for logging.
Number of seconds to keep an object.
Table of Ops.Intelligence#INTEL.Cluster clusters.
Table of contacts' Core.Point#COORDINATE objects.
Table of Ops.Intelligence#INTEL.Contact contacts.
Number of seconds between collection runs.
Class id string for output to DCS log file.
Make the logging verbose.
Version string
Function(s)
Function to add an #INTEL object to the aggregator
Defined in:
INTEL_DLINK
Parameter:
Ops.Intelligence#INTEL Intel
the #INTEL object to add
Return value:
self
Triggers the FSM event "Collect".
Used internally to collect all data.
Defined in:
INTEL_DLINK
Function to query the detected clusters
Defined in:
INTEL_DLINK
Return value:
#table:
Table of #INTEL.Cluster clusters
Function to query the detected contacts
Defined in:
INTEL_DLINK
Return value:
#table:
Table of #INTEL.Contact contacts
Function to query the detected contact coordinates
Defined in:
INTEL_DLINK
Return value:
#table:
Table of the contacts' Core.Point#COORDINATE objects.
Function to instantiate a new object
Defined in:
INTEL_DLINK
Parameters:
#table Intels
Table of Ops.Intelligence#INTEL objects.
#string Alias
(optional) Name of this instance. Default "SPECTRE"
#number Interval
(optional) When to query #INTEL objects for detected items (default 20 seconds).
#number Cachetime
(optional) How long to cache detected items (default 300 seconds).
Usage:
Use #INTEL_DLINK if you want to merge data from a number of #INTEL objects into one. This might be useful to simulate a
Data Link, e.g. for Russian-tech based EWR, realising a Star Topology @{https://en.wikipedia.org/wiki/Network_topology#Star}
in a basic setup. It will collect the contacts and clusters from the #INTEL objects.
Contact duplicates are removed. Clusters might contain duplicates (Might fix that later, WIP).
Basic setup:
local datalink = INTEL_DLINK:New({myintel1,myintel2}), "FSB", 20, 300)
datalink:__Start(2)
Add an Intel while running:
datalink:AddIntel(myintel3)
Gather the data:
datalink:GetContactTable() -- #table of #INTEL.Contact contacts.
datalink:GetClusterTable() -- #table of #INTEL.Cluster clusters.
datalink:GetDetectedItemCoordinates() -- #table of contact coordinates, to be compatible with @{Functional.Detection#DETECTION}.
Gather data with the event function:
function datalink:OnAfterCollected(From, Event, To, Contacts, Clusters)
... <your code here> ...
end
On After "Collected" event.
Data tables have been refreshed.
Defined in:
INTEL_DLINK
Parameters:
#string From
From state.
#string Event
Event.
#string To
To state.
#table Contacts
Table of #INTEL.Contact Contacts.
#table Clusters
Table of #INTEL.Cluster Clusters.
Pseudo Functions
- Triggers the FSM event "Start".
Starts the INTEL_DLINK.
Defined in:
INTEL_DLINK
Triggers the FSM event "Start" after a delay.
Starts the INTEL_DLINK.
Defined in:
INTEL_DLINK
Parameter:
#number delay
Delay in seconds.
Triggers the FSM event "Collect" after a delay.
Defined in:
INTEL_DLINK
Parameter:
#number delay
Delay in seconds.
Triggers the FSM event "Stop" after a delay.
Stops the INTEL_DLINK.
Defined in:
INTEL_DLINK
Parameter:
#number delay
Delay in seconds.
Function to start the work.
Defined in:
INTEL_DLINK
Parameters:
#string From
The From state
#string Event
The Event triggering this call
#string To
The To state
Return value:
self
Function to stop
Defined in:
INTEL_DLINK
Parameters:
#string From
The From state
#string Event
The Event triggering this call
#string To
The To state
Return value:
self
Function to collect data from the various #INTEL
Defined in:
INTEL_DLINK
Parameters:
#string From
The From state
#string Event
The Event triggering this call
#string To
The To state
Return value:
self
Function called after collection is done
Defined in:
INTEL_DLINK
Parameters:
#string From
The From state
#string Event
The Event triggering this call
#string To
The To state
#table Contacts
The table of collected #INTEL.Contact contacts
#table Clusters
The table of collected #INTEL.Cluster clusters
Return value:
self
Field(s)
Name of the class.
Alias name for logging.
Number of seconds to keep an object.
Table of Ops.Intelligence#INTEL.Cluster clusters.
Table of contacts' Core.Point#COORDINATE objects.
Table of Ops.Intelligence#INTEL.Contact contacts.
Number of seconds between collection runs.
Class id string for output to DCS log file.
Make the logging verbose.
Version string
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.
Field(s)
Name of the class.
Alias name for logging.
Number of seconds to keep an object.
Table of Ops.Intelligence#INTEL.Cluster clusters.
Table of contacts' Core.Point#COORDINATE objects.
Table of Ops.Intelligence#INTEL.Contact contacts.
Number of seconds between collection runs.
Class id string for output to DCS log file.
Make the logging verbose.
Version string
Function(s)
Clear the state of an object.
Defined in:
Parameters:
Object
The object that holds the Value set by the Key.
StateName
The key that is should be cleared.
Creation of a Birth Event.
Defined in:
Parameters:
DCS#Time EventTime
The time stamp of the event.
DCS#Object Initiator
The initiating object of the event.
#string IniUnitName
The initiating unit name.
place
subplace
Creation of a Crash Event.
Defined in:
Parameters:
DCS#Time EventTime
The time stamp of the event.
DCS#Object Initiator
The initiating object of the event.
IniObjectCategory
Creation of a Dead Event.
Defined in:
Parameters:
DCS#Time EventTime
The time stamp of the event.
DCS#Object Initiator
The initiating object of the event.
IniObjectCategory
Creation of a S_EVENT_PLAYER_ENTER_AIRCRAFT
event.
Creation of a Remove Unit Event.
Defined in:
Parameters:
DCS#Time EventTime
The time stamp of the event.
DCS#Object Initiator
The initiating object of the event.
Creation of a Takeoff Event.
Defined in:
Parameters:
DCS#Time EventTime
The time stamp of the event.
DCS#Object Initiator
The initiating object of the event.
Creation of a Crash Event.
Defined in:
Parameters:
DCS#Time EventTime
The time stamp of the event.
DCS#Object Initiator
The initiating object of the event.
Log an exception which will be traced always.
Can be anywhere within the function logic.
Returns the event dispatcher
Remove all subscribed events
Trace a function call.
Must be at the beginning of the function logic.
Trace a function call level 2.
Must be at the beginning of the function logic.
Trace a function call level 3.
Must be at the beginning of the function logic.
Get the ClassID of the class instance.
Get the ClassName of the class instance.
Get the ClassName + ClassID of the class instance.
The ClassName + ClassID is formatted as '%s#%09d'.
Get the Class Core.Event processing Priority.
The Event processing Priority is a number from 1 to 10, reflecting the order of the classes subscribed to the Event to be processed.
This is the worker method to retrieve the Parent class.
Note that the Parent class must be passed to call the parent class method.
self:GetParent(self):ParentMethod()
Get a Value given a Key from the Object.
Note that if the Object is destroyed, set to nil, or garbage collected, then the Values and Keys will also be gone.
Defined in:
Parameters:
Object
The object that holds the Value set by the Key.
Key
The key that is used to retrieve the value. Note that the key can be a #string, but it can also be any other type!
Return value:
The Value retrieved or nil if the Key was not found and thus the Value could not be retrieved.
Subscribe to a DCS Event.
Defined in:
Parameters:
Core.Event#EVENTS EventID
Event ID.
#function EventFunction
(optional) The function to be called when the event occurs for the unit.
Return value:
Log an information which will be traced always.
Can be anywhere within the function logic.
This is the worker method to inherit from a parent class.
Defined in:
Parameters:
Child
is the Child class that inherits.
#BASE Parent
is the Parent class that the Child inherits from.
Return value:
Child
This is the worker method to check if an object is an (sub)instance of a class.
Examples:
ZONE:New( 'some zone' ):IsInstanceOf( ZONE ) will return true
ZONE:New( 'some zone' ):IsInstanceOf( 'ZONE' ) will return true
ZONE:New( 'some zone' ):IsInstanceOf( 'zone' ) will return true
ZONE:New( 'some zone' ):IsInstanceOf( 'BASE' ) will return true
ZONE:New( 'some zone' ):IsInstanceOf( 'GROUP' ) will return false
Defined in:
Parameter:
ClassName
is the name of the class or the class itself to run the check against
Return value:
#boolean:
Enquires if tracing is on (for the class).
BASE constructor.
This is an example how to use the BASE:New() constructor in a new class definition when inheriting from BASE.
function EVENT:New()
local self = BASE:Inherit( self, BASE:New() ) -- #EVENT
return self
end
Occurs when an Event for an object is triggered.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that triggered the event.
Occurs when a ground unit captures either an airbase or a farp.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that captured the base place: The airbase that was captured, can be a FARP or Airbase. When calling place:getCoalition() the faction will already be the new owning faction.
Occurs when any object is spawned into the mission.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was spawned
Occurs when any aircraft crashes into the ground and is completely destroyed.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that has crashed
Occurs when an object is dead.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is dead.
Unknown precisely what creates this event, likely tied into newer damage model.
Will update this page when new information become available.
- initiator: The unit that had the failure.
Discard chair after ejection.
Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when a pilot ejects from an aircraft Have a look at the class Core.Event#EVENT as these are just the prototypes.
initiator : The unit that has ejected
Occurs when any aircraft shuts down its engines.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is stopping its engines.
Occurs when any aircraft starts its engines.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is starting its engines.
Occurs whenever an object is hit by a weapon.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit object the fired the weapon weapon: Weapon object that hit the target target: The Object that was hit.
Occurs when any system fails on a human controlled aircraft.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that had the failure
Occurs on the death of a unit.
Contains more and different information. Similar to unit_lost it will occur for aircraft before the aircraft crash event occurs. Have a look at the class Core.Event#EVENT as these are just the prototypes.
- initiator: The unit that killed the target
- target: Target Object
- weapon: Weapon Object
Occurs when an aircraft lands at an airbase, farp or ship Have a look at the class Core.Event#EVENT as these are just the prototypes.
initiator : The unit that has landed place: Object that the unit landed on. Can be an Airbase Object, FARP, or Ships
Occurs shortly after the landing animation of an ejected pilot touching the ground and standing up.
Event does not occur if the pilot lands in the water and sub combs to Davey Jones Locker. Have a look at the class Core.Event#EVENT as these are just the prototypes.
- initiator: Static object representing the ejected pilot. Place : Aircraft that the pilot ejected from.
- place: may not return as a valid object if the aircraft has crashed into the ground and no longer exists.
- subplace: is always 0 for unknown reasons.
Occurs when a new mark was added.
Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.
Occurs when a mark text was changed.
Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.
Occurs when a mark was removed.
Have a look at the class Core.Event#EVENT as these are just the prototypes. MarkID: ID of the mark.
Occurs when a mission ends Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when a mission starts Have a look at the class Core.Event#EVENT as these are just the prototypes.
Weapon add.
Fires when entering a mission per pylon with the name of the weapon (double pylons not counted, infinite wep reload not counted. Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when the pilot of an aircraft is killed.
Can occur either if the player is alive and crashes or if a weapon kills the pilot without completely destroying the plane. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that the pilot has died in.
Occurs when a player enters a slot and takes control of an aircraft.
Have a look at the class Core.Event#EVENT as these are just the prototypes. NOTE: This is a workaround of a long standing DCS bug with the PLAYER_ENTER_UNIT event. initiator : The unit that is being taken control of.
Occurs when any player assumes direct control of a unit.
Note - not Mulitplayer safe. Use PlayerEnterAircraft. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is being taken control of.
Occurs when any player relieves control of a unit to the AI.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that the player left.
Occurs when an aircraft connects with a tanker and begins taking on fuel.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is receiving fuel.
Occurs when an aircraft is finished taking fuel.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was receiving fuel.
Occurs when any modification to the "Score" as seen on the debrief menu would occur.
There is no information on what values the score was changed to. Event is likely similar to player_comment in this regard. Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when any unit stops firing its weapon.
Event will always correspond with a shooting start event. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that was doing the shooting.
Occurs when any unit begins firing a weapon that has a high rate of fire.
Most common with aircraft cannons (GAU-8), autocannons, and machine guns. Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that is doing the shooting. target: The unit that is being targeted.
Occurs whenever any unit in a mission fires a weapon.
But not any machine gun or autocannon based weapon, those are handled by EVENT.ShootingStart. Have a look at the class Core.Event#EVENT as these are just the prototypes.
Occurs when an aircraft takes off from an airbase, farp, or ship.
Have a look at the class Core.Event#EVENT as these are just the prototypes. initiator : The unit that tookoff place: Object from where the AI took-off from. Can be an Airbase Object, FARP, or Ships
Occurs when the game thinks an object is destroyed.
Have a look at the class Core.Event#EVENT as these are just the prototypes.
- initiator: The unit that is was destroyed.
Schedule a new time event.
Note that the schedule will only take place if the scheduler is started. Even for a single schedule event, the scheduler needs to be started also.
Defined in:
Parameters:
#number Start
Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.
#function SchedulerFunction
The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.
#table ...
Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.
Return value:
#string:
The Schedule ID of the planned schedule.
Schedule a new time event.
Note that the schedule will only take place if the scheduler is started. Even for a single schedule event, the scheduler needs to be started also.
Defined in:
Parameters:
#number Start
Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.
#number Repeat
Specifies the interval in seconds when the scheduler will call the event function.
#number RandomizeFactor
Specifies a randomization factor between 0 and 1 to randomize the Repeat.
#number Stop
Specifies the amount of seconds when the scheduler will be stopped.
#function SchedulerFunction
The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.
#table ...
Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.
Return value:
#string:
The Schedule ID of the planned schedule.
Stops the Schedule.
Defined in:
Parameter:
#string SchedulerID
(Optional) Scheduler ID to be stopped. If nil, all pending schedules are stopped.
Set the Class Core.Event processing Priority.
The Event processing Priority is a number from 1 to 10, reflecting the order of the classes subscribed to the Event to be processed.
Set a state or property of the Object given a Key and a Value.
Note that if the Object is destroyed, set to nil, or garbage collected, then the Values and Keys will also be gone.
Defined in:
Parameters:
Object
The object that will hold the Value set by the Key.
Key
The key that is used as a reference of the value. Note that the key can be a #string, but it can also be any other type!
Value
The value to is stored in the object.
Return value:
The Value set.
Trace a function logic level 1.
Can be anywhere within the function logic.
Trace a function logic level 2.
Can be anywhere within the function logic.
Trace a function logic level 3.
Can be anywhere within the function logic.
Trace all methods in MOOSE
Set tracing for a class
Set tracing for a specific method of class
Set trace off.
Set trace on.
Set trace on or off Note that when trace is off, no BASE.Debug statement is performed, increasing performance! When Moose is loaded statically, (as one file), tracing is switched off by default.
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.
Defined in:
Parameter:
#boolean TraceOnOff
Switch the tracing on or off.
Usage:
-- Switch the tracing On
BASE:TraceOnOff( true )
-- Switch the tracing Off
BASE:TraceOnOff( false )
UnSubscribe to a DCS event.
Trace a function call.
This function is private.
Defined in:
Parameters:
Arguments
A #table or any field.
DebugInfoCurrentParam
DebugInfoFromParam
Trace a function logic.
Defined in:
Parameters:
Arguments
A #table or any field.
DebugInfoCurrentParam
DebugInfoFromParam
The main event handling function...
This function captures all events generated for the class.