Hi Kevin,
I have found the problem. It is an unexpected feature of dbNameToAddr
combined with the way I resolve the record reference.
In StreamDevice %(redirect) can be %(record), %(record.field) or
$(field), with the first meaning record.VAL and the last meaning
current_record.field. So I first check if there is a '.' in the
reference. In that case it's record.field.
If not, I first try if it's a field of the current record by calling
dbNameToAddr("current_record.redirect").
In your case this should not match, because your redirect is the name of
another record (starting with a number).
Now the unexpected dbNameToAddr() feature comes into play: If the field
name does not start with a letter or underscore, it is ignored and
dbNameToAddr succeeds and returns a reference to the VAL field.
Try this: dbgf existing_record.3whatever
This creates a false match, so that case 3 (record.VAL) is never tested.
I will fix the way how StreamDevice does the matching...
Dirk
On 14.11.2018 00:33, Peterson, Kevin M. via Tech-talk wrote:
FYI,
I discovered that streamDevice's redirection-to-records feature fails if
the name of the destination PV starts with a number:
https://github.com/paulscherrerinstitute/StreamDevice/issues/20
There have been multiple times in the past where streamDevice support
that used the redirection-to-records feature worked in my development
IOC but didn't work when I deployed it to a beamline. This problem
wasn't discovered then because eliminating redirection from the support
was easier than troubleshooting the redirection failure.
This problem is very likely to occur at the APS. The PV prefix for
development IOCs is often the developer's initials. The beamlines are
numbered and the PV prefix for beamline IOCs usually begins with the
beamline number.
I hope this saves someone else a little frustration.
Kevin