Skip to content
Chris Petersen edited this page Oct 16, 2014 · 1 revision

scheduler-iterates performs a runtime iteration on all plugin instances.

Parameter Description
guiwaveproc Optional: Function to be called whenever the scheduler dispatches its input plugins

Example

Example 1: Part of the main loop function of a data acquisition application, which uses the guiwaveproc.

;; events
(lambda (t x y) 
  (scheduler-iterate (lambda ()
    (if (store-ref store "NewDisplayData" #f) (begin
      (set! new_data #t)
      (store-set! store "NewDisplayData" #f)
    ))
  ))

Example 2:From the main loop of a distributed monitoring application, which exchanges data using fifo's. Here the main application notifies the other monitoring applications to start or end cases by setting the "CaseStartPending" and "CaseEndPending" variables respectively.

(lambda (t x y)
  (if (store-ref store "CaseStartPending" #f) 
    (begin (scheduler-startcase store (store-ref store "CaseStartPending" #f))
    (store-set! store "CaseStartPending" #f)))
  (if (store-ref store "CaseEndPending" #f) 
    (begin (scheduler-endcase store) (store-set! store "CaseEndPending" #f)))
  (log-rollcase store)
  (scheduler-iterate)
  (thread-sleep! 0.05)
)
Clone this wiki locally