EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: streamDevice redirection-to-records & PVs that start with a number
From: Dirk Zimoch <[email protected]>
To: "Peterson, Kevin M." <[email protected]>, EPICS tech-talk <[email protected]>
Date: Wed, 14 Nov 2018 14:20:22 +0100
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


Replies:
Re: streamDevice redirection-to-records & PVs that start with a number Dirk Zimoch
References:
streamDevice redirection-to-records & PVs that start with a number Peterson, Kevin M. via Tech-talk

Navigate by Date:
Prev: Re: Questions about EPICS_PVA_ADDR_LIST Michael Davidsaver
Next: Re: streamDevice redirection-to-records & PVs that start with a number Dirk Zimoch
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: streamDevice redirection-to-records & PVs that start with a number Peterson, Kevin M. via Tech-talk
Next: Re: streamDevice redirection-to-records & PVs that start with a number Dirk Zimoch
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021  2022  2023  2024 
ANJ, 14 Nov 2018 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·