Recently I was adding some new records to our name/value server IOC and I
noticed an unexpected behavior. My new records, which are of type longin and
ai, are used to supply system-wide values, i.e. firmware version numbers for
comparison with hardware, computational constants, etc., for the rest of the
control system. The records are initialized by placing a constant value in
the INP field of the record definition text.
As one would expect, after initialization the UDF field for these records
is zero, indicating that the VAL field has had a value assigned at some
point in the record's existence. What I did not expect was that the SEVR
field is set to INVALID and the STAT field to UDF. I would have expected
that, if you are going to bother to set the UDF field to zero, consistency
would dictate that the SEVR and STAT fields would be given the value
NO_ALARM, just as it would be when the VAL field is set by a CA put
operation. Is this behavior intentional and, if so, why?
I also discovered that, for the stringin record, this technique of setting
an initial value by placing a constant -- in this case a string constant --
in the INP field does not work at all. Is there a corresponding method for
initializing the VAL field of a stringin record?