To help pairing components, the encoder and the paired decoder are of the same colour.
When the user wants to build a new circuit, the first thing to do is dragging the Generator into the grid under the components. To drag a component the user must double click the component without releasing the mouse button. To release the component the user must release the mouse button.
For a correct cosntruction of the circuit there are some constrains to respect:
the pipeline is started by a generator, there cannot be other generators
a decoder must be followed by an encoder, channel, decoder or comparator
the pipeline is ended by a comparator, there cannot be other comparators
When a constraint is violated, a dialog box appears that shows the error
type; the component will be repositioned in the default position.(Fig.4.6)
Fig. 4.6 During the construction of the circuit, a decoder can’t be inserted if its paired encoder hasn’t been inserted before and an encoder can’t be inserted if its paired decoder hasn’t been inserted before. In case of this type of error a dialog box will appear (at the end of the circuit construction).(Fig.4.7)
When the user insert a new components he doesn’t need to put the component in the same line and in the same height of the previous one ; in fact the class “WxDragImage5” automatically place the components side by side.
Once the circuit is correctly built, a notification box appears (Fig. 4.8)and text frames
to insert parametres and values will appear succesfully.(Fig.4.9)
Fig. 4. 8
Fig. 4. 9 The result of insection is buffered in the standard output of the program”Boa Constructor”at the end of the execution of the program.(Fig.4.10)
Per scaricare Python e wxPython:
Per imparare a programmare in Python:
Guido Van Rossum, “Python tutorial, release 2.3.4”, Fred L. Drake Jr. Editor, May 20, 2004 .