In order to make the labAlive toolbox extendable, all systems which can be used in a wiring are derived from abstract base classes which perform the basic functionalities (see example in figure 1). Table 1 gives a brief extract of the class hierarchy and the distribution of tasks.
Class | Performed Functionalities |
WiringComponent | Layout, i.e. position and size of the graphic display of the wiring component (canvas) within the layout grid |
System | Connection of systems and wires, Initialisation and signalling routines, Provide a set of different standard canvas for displaying, Handle user interaction (open property window when clicked on its canvas, show properties and accept user changes of values) |
AnalogSystem | Allocate memory (a field of Analogsignal) for the system states |
FIR | Simulation routine (step) |
SineSource | Initial simulation routine (startstep) |
The basic programming of a new system requires only an implementation of the simulation routine, i.e. calculation of the output signal. The essential functions concerning simulation, display and user interaction are provided by the base classes, but can be overridden by customized routines, which e.g. provide a specific canvas for displaying (see section 4.2).