The design of this runner is to launch multiple threads for calling the synchronous "drive" method in the controller, and wait until all threads have completed their drive method. In the event of interrupt, all thread will exit and hence the runner will stop.
This runner class can be used in Python:
from gumpy.commons import sics
from org.gumtree.gumnix.sics.control import MultiDrivableRunner
runner = MultiDrivableRunner()
runner.addDrivable(sics.getSicsController().findDeviceController('my'), -10.0, False)
runner.addDrivable(sics.getSicsController().findDeviceController('mx'), -5.0, False)
runner.drive()
[ Show » ]
Tony Lam [24/Nov/09 02:20 PM] The design of this runner is to launch multiple threads for calling the synchronous "drive" method in the controller, and wait until all threads have completed their drive method. In the event of interrupt, all thread will exit and hence the runner will stop. This runner class can be used in Python: from gumpy.commons import sics from org.gumtree.gumnix.sics.control import MultiDrivableRunner runner = MultiDrivableRunner() runner.addDrivable(sics.getSicsController().findDeviceController('my'), -10.0, False) runner.addDrivable(sics.getSicsController().findDeviceController('mx'), -5.0, False) runner.drive()
The design of this runner is to launch multiple threads for calling the synchronous "drive" method in the controller, and wait until all threads have completed their drive method. In the event of interrupt, all thread will exit and hence the runner will stop.
This runner class can be used in Python:
from gumpy.commons import sics
from org.gumtree.gumnix.sics.control import MultiDrivableRunner
runner = MultiDrivableRunner()
runner.addDrivable(sics.getSicsController().findDeviceController('my'), -10.0, False)
runner.addDrivable(sics.getSicsController().findDeviceController('mx'), -5.0, False)
runner.drive()
[ Show » ]
Tony Lam [24/Nov/09 02:20 PM] The design of this runner is to launch multiple threads for calling the synchronous "drive" method in the controller, and wait until all threads have completed their drive method. In the event of interrupt, all thread will exit and hence the runner will stop. This runner class can be used in Python: from gumpy.commons import sics from org.gumtree.gumnix.sics.control import MultiDrivableRunner runner = MultiDrivableRunner() runner.addDrivable(sics.getSicsController().findDeviceController('my'), -10.0, False) runner.addDrivable(sics.getSicsController().findDeviceController('mx'), -5.0, False) runner.drive()