Qudi
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
generic_task.PrePostTask Class Reference

Represents a task that creates the necessary conditions for a different task and reverses its own actions afterwards. More...

Inheritance diagram for generic_task.PrePostTask:
Inheritance graph
[legend]
Collaboration diagram for generic_task.PrePostTask:
Collaboration graph
[legend]

Public Member Functions

def __init__ (self, name, runner, references, config, kwargs)
 Create a PrePostTask. More...
 
def log (self)
 Returns a logger object.
 
def onchangestate (self, e)
 Fysom callback for all state transitions. More...
 
def preExecute (self)
 This method contains any action that should be done before some task. More...
 
def postExecute (self)
 This method needs to undo any actions in preExecute() after a task has been finished. More...
 

Public Attributes

 lock
 
 name
 
 runner
 
 ref
 
 config
 

Static Public Attributes

 sigPreExecStart = QtCore.Signal()
 
 sigPreExecFinish = QtCore.Signal()
 
 sigPostExecStart = QtCore.Signal()
 
 sigPostExecFinish = QtCore.Signal()
 
 sigStateChanged = QtCore.Signal(object)
 
list requiredModules = []
 

Detailed Description

Represents a task that creates the necessary conditions for a different task and reverses its own actions afterwards.

Constructor & Destructor Documentation

◆ __init__()

def generic_task.PrePostTask.__init__ (   self,
  name,
  runner,
  references,
  config,
  kwargs 
)

Create a PrePostTask.

Parameters
strname: unique name of the task
objectrunner: TaskRunner that manages this task
dictreferences: contains references to all required modules
dictconfig: configuration parameter dictionary

Member Function Documentation

◆ onchangestate()

def generic_task.PrePostTask.onchangestate (   self,
  e 
)

Fysom callback for all state transitions.

Parameters
objecte: Fysom state transition description

This just emits a signal so external components can react.

◆ postExecute()

def generic_task.PrePostTask.postExecute (   self)

This method needs to undo any actions in preExecute() after a task has been finished.

It needs to be overwritten in every subclass.

◆ preExecute()

def generic_task.PrePostTask.preExecute (   self)

This method contains any action that should be done before some task.

It needs to be overwritten in every subclass.


The documentation for this class was generated from the following file: