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.