next up previous contents index
Next: simulation.define-device name device procedure Up: Defining sensors and actuators Previous: Defining sensors and actuators

make-io-device initializer action-procedure procedure

  Creates a sensor or actuators I/O device. A device has two aspects: initialization and I/O.

The initializer procedure is called at the beginning of the simulation. It has the following signature:

(lambda (simulation device) ...)

The action-procedure is called each time a processor performs a read-sensor or apply-actuator operation. It has the signature

(lambda (simulation device index time) ...)

where index is the index of the processor performing the operation and time is the time of the operation.

Erik Rauch
Sat May 8 16:42:57 EDT 1999