Gumtree
  1. Gumtree
  2. GUMTREE-110

Support running multiple drivable devices in a synchronised way

    Details

    • Type: New Feature New Feature
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.4.0
    • Component/s: sics
    • Labels:
      None
    • Number of attachments :
      0

      Description

      In the new Quokka beamstop design, we can run all beamstop simultaneously.

      Currently running SICS devices in Python is impossible due to the threading issue in callback mechanism. So, this synchronous execution can only be done in Java. As the result, for running multi devices in GumTree, we need to do this in Java.

      Currently the SICS proxy does not have a logical place for placing this function. Hence, we introduce a new helper class, MultiDrivableRunner, to handle this feature.

        Activity

        Hide
        Tony Lam added a comment -

        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()

        Show
        Tony Lam added a comment - 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()
        Hide
        Tony Lam added a comment -
        Show
        Tony Lam added a comment - See: http://fisheye.codehaus.org/changelog/gumtree/?cs=7281 [ Show ] Tony Lam [24/Nov/09 02:38 PM] See: http://fisheye.codehaus.org/changelog/gumtree/?cs=7281

          People

          • Assignee:
            Tony Lam
            Reporter:
            Tony Lam
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: