SLD [ Intro | Pubs | RunInfo | Workbook | Software | SLACVX | Search ]

The SLD Event Display Additions Manual

Adding Valuators

To add valuators in the SLD event display system, you need to add some valuator code to the appropriate draw routine and you need to add some constants data.

Modifying the Draw Routine

For valuators to work on a given object type, the object type's draw routine must store some valuator information for each DSPOBJ bank that it creates.

Take the overall structure from some draw routine that already contains valuator code. PHVKAL PREPMORT is a good example. Near the bottom of PHVKAL is the comment "Add a valuator bank." The few lines that appear after that comment are all you will need.

You may make cuts on up to eight quantities. How you compute these quantities is of course up to you and depends on the physics you wish to study. Store the quantities in VALUES(1 through 8). Set unused members of the VALUES array to zero.

Then call DSPUVAL as in PHVKAL. The second argument tells which set of valuator definitions should apply. It should match the VALTYPE in the DSPUVLU bank that you will write (see below). The third argument is generally set to false. Set it true only if you have normalized your VALUES to run from 0 to 1.

Include the line P_DSPOBJ%(DSPOVAL) = P_DSPOVAL exactly as in the example. This links the valuator data to the display object.

Then just make sure your new version of the draw routine gets loaded.

Adding Valuator Constants

Setting up constants to define the new valuator is a little bit complicated because there are so many things to define. You need to define what kind of cuts to make, which knobs to use and what the initial knob positions should be. But most of the work just involves borrowing definitions from valuators that already exist.

The basic valuator cuts are defined by DSPVLU8 banks in DSPVALS CONSTANT. You define additional valuator cuts by writing a new constant file that contains DSPUVLU banks (and perhaps DSPUVPR, DSPUVUN and DSPUVSC banks). You then merge your banks into the display system by issuing the IDA command DSP USERDATA followed by the filename of your constant file.

In writing your new dspuvlu banks, study the existing dspuvlu banks in KALUDSP and CRDUDSP CONSTANT (and the basic dspvlu8 banks in DSPVALS CONSTANT).

The DSPUVLU banks

The DSPUVPR banks

Recall that in the DSPUVLU bank, you had to supply a parmtype. If this was a new parmtype, you need to define an appropriate DSPUVPR bank.

The DSPUVUN banks

Recall that in the DSPUVPR bank, you had to supply a unittype. If this was a new unittype, you need to define an appropriate DSPUVUN bank.

The DSPUVSC banks

If you have created a new minvalue/maxvalue pair, values will be written at six points along the scale. You may specify some other way to label the scale by defining an appropriate DSPUVSC bank.


Joseph Perl
25 September 1997