Package simulation :: Module System :: Class System
[hide private]
[frames] | no frames]

Class System

source code


Manages the whole system.

process is the current controlled process. controller is the current controller.

The whole system is executed in a separate thread. The timer is also realized as separate thread.

Instance Methods [hide private]
 
__init__(self, stepsize=0.01, process=None, controller=None, logger=None)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
main_loop(self)
Realize main control loop as separate thread, so it can be running independently of the GUI timers
source code
 
timer_loop(self)
Realize a timer, using sleep is usually more precise than using the GUI timer
source code
 
start(self)
Start the main loop.
source code
 
stop(self)
Stop the main loop.
source code
 
step(self)
Make a single step of the main loop.
source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Instance Variables [hide private]
  process
process to control
  controller
controller for calculating control values
  logger
logging instance
  stepsize
step size of loop for simulations in seconds
  run
main loop in in continuous run mode
  run_event
controls the main loop's turn (if set make another turn)
  main_thread
the main loop thread
  timer_event
periodic trigger for main loop
  timer_thread
calculation time independent periodic trigger generator
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, stepsize=0.01, process=None, controller=None, logger=None)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

step(self)

source code 

Make a single step of the main loop. ( = stop after one step)