Privacy and Security Notice

Use of SVAL Fields


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Use of SVAL Fields




In the past some of our applications have used a port called SVAL on
certain record symbols as a surrogate for the VAL field. This allowed
another record to push a value into the VAL field of the record. This
was accomplished by having a line in the makefile that replaced all
references to "SVAL" with "VAL".

This is naughty because some records (like ai's) really have a field
called SVAL (simulation value). To avoid future conflicts, simplify
makefiles, and prevent records with names like "PSVALUE" being renamed
to "PVALUE", I have changed the SVAL ports on record symbols that have
them into VAL ports.

This change only affects the NEW record symbols that must be used if you
are using e2sr instead of edif2sr. Capfast doesn't mind having 2 VAL
ports as long as they are both bidirectional ports. To make life easier
for llapps I have also changed all other ports that are really field
references (as opposed to links) to be bidirectional.

So on the new symbols an input port means an INLINK, an output port
means an OUTLINK, and a bidirectional port means a field reference. A
bidirectional field reference port may be wired to either an INLINK or
an OUTLINK and e2sr will do the right thing.

Note that user ports (FLD0, etc.) will be unchanged. Making these ports
bidirectional would make them more flexible as field references, but
they would then be unusable as links.

I have already notified the owners of affected applications. However, if
I missed yours here are the extra steps required to move from edif2sr to
e2sr if you are using SVAL ports to refer to VAL.

1) cd to the sch directory and run the script sval_filter which is in
$EPICS/appSRcebaf/tools/. The script will show you which (if any) files
need to be changed and ask you to confirm the changes.

2) remove any lines from Makefile.one of the form:

# .sr --> .sr2
$(srD)/$(fileB).sr2:   $(srD)/$(fileB).sr
        @echo "----- .sr --> .sr2 -----"
        rm -f $@
        sed -e 's/.SVAL/.VAL/' $(srD)/$(fileB).sr > $@


--Brian Bevins