mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
Statemachine
This commit is contained in:
37
Moose Development/Moose/Task2.lua
Normal file
37
Moose Development/Moose/Task2.lua
Normal file
@@ -0,0 +1,37 @@
|
||||
--- @module TASK2
|
||||
|
||||
--- The TASK2 class
|
||||
-- @type TASK2
|
||||
-- @field Scheduler#SCHEDULER TaskScheduler
|
||||
-- @extends Base#BASE
|
||||
TASK2 = {
|
||||
ClassName = "TASK",
|
||||
TaskScheduler = nil,
|
||||
NextEvent = nil,
|
||||
}
|
||||
|
||||
--- Instantiates a new TASK Base. Should never be used. Interface Class.
|
||||
-- @return #TASK2 self
|
||||
function TASK2:New( Client )
|
||||
local self = BASE:Inherit( self, BASE:New() )
|
||||
self:F()
|
||||
|
||||
self.Client = Client
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- @param #TASK2 self
|
||||
function TASK2:Schedule()
|
||||
|
||||
self.TaskScheduler = SCHEDULER:New( self.StateMachine, self.StateMachine.Assign, { self, self.Client }, 1)
|
||||
end
|
||||
|
||||
--- @param #TASK2 self
|
||||
function TASK2:NextEvent( NextEvent, ... )
|
||||
self:E( NextEvent )
|
||||
|
||||
self.TaskScheduler = SCHEDULER:New( self.StateMachine, NextEvent, { self, self.Client }, 1 )
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user