Link with a time delay

CONICAL object class#include Delay.h
Base Classes
Stepperprovides Step(dt) method
LinkVSource to VSink connection
Derived Classes
Member Functions & Variables
virtual real GetEG ( void );
virtual real GetE ( void );
virtual void Step ( const real dt );
Delay ( VSource * pFrom , VSink * pTo , real pG = 1 , int pQueSize = 1 );

A Delay is a special type of Link: one that passes current after a predetermined time delay. Voltages from the VSource are put into a queue. These affect the destination VSink only when they come out of the queue, a fixed number of steps later.

When you create a Delay object, you must supply the size of the queue. This determines the delay:

T = S * dt

where S is the queue size, dt is the step size used (e.g., 1 ms), and T is the delay time.

Note that Delay inherits from Stepper; its Step method must be called at every tick of the simulation. For consistency, a Delay should always be updated after the VSink and VSource it connects have been updated.

See the delay demo for an example using the Delay class.