Updated tracing with loading static and improved SCHEDULER

- Tracing is by default switched off when using Moose in static mode.
- SCHEDULER is now correctly rescheduling when repeating the loop.
- Modified the loaders, adding the default trace on in case of dynamic
and off in case of static loading.
This commit is contained in:
FlightControl
2016-06-15 05:54:21 +02:00
parent 37510ab647
commit 5bd0595b35
28 changed files with 470 additions and 331 deletions

View File

@@ -37,12 +37,6 @@
-- @module Client
-- @author FlightControl
--- The CLIENT class
-- @type CLIENT
-- @extends Unit#UNIT
@@ -131,7 +125,7 @@ function CLIENT:Register( ClientName )
self.ClientAlive2 = false
--self.AliveCheckScheduler = routines.scheduleFunction( self._AliveCheckScheduler, { self }, timer.getTime() + 1, 5 )
self.AliveCheckScheduler = SCHEDULER:New( self, self._AliveCheckScheduler, {}, 1, 5 )
self.AliveCheckScheduler = SCHEDULER:New( self, self._AliveCheckScheduler, { "Client Alive " .. ClientName }, 1, 5 )
self:E( self )
return self
@@ -241,10 +235,11 @@ function CLIENT:Alive( CallBackFunction, ... )
end
--- @param #CLIENT self
function CLIENT:_AliveCheckScheduler()
self:F( { self.ClientName, self.ClientAlive2, self.ClientBriefingShown, self.ClientCallBack } )
function CLIENT:_AliveCheckScheduler( SchedulerName )
self:E( SchedulerName )
self:F( { SchedulerName, self.ClientName, self.ClientAlive2, self.ClientBriefingShown, self.ClientCallBack } )
if self:IsAlive() then -- Polymorphic call of UNIT
if self:IsAlive() then
if self.ClientAlive2 == false then
self:ShowBriefing()
if self.ClientCallBack then