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 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
<== Date ==> <== Thread ==>

Subject: Re: Autosave for waveform with 1 element
From: Andrew Johnson <anj@aps.anl.gov>
To: "Mooney, Tim M." <mooney@aps.anl.gov>, "Tech-talk@aps.anl.gov" <Tech-talk@aps.anl.gov>
Date: Wed, 12 Jul 2017 14:02:43 -0500
Hi Tim,

On 07/12/2017 01:39 PM, Mooney, Tim M. wrote:
>> However I don't know whether you really need to reimplement the
>> functionality in dbAccess.c:dbPut() inside autosave, why aren't you just
>> using that to write the field values in pass 1? I can understand that it
>> won't work in pass 0 (especially for fields that are marked special),
>> but after the records have been initialized the dbPut() routine should
>> work properly. If it doesn't I would like to know why and try fixing it
>> in Base.
> 
> Awesome!  I did this, and it works.  I don't really like the possibility
> that special() might be called, but I can't think of an actual problem
> it would cause.

Great. The point of that special() call is to let the record update
other fields as a result of the put to keep some invariant say. If you
look at the mbbo for example the the **VL and **ST fields are all marked
SPC_MOD and the special() routine there calls init_common() to ensure
that the SDEF field is set whenever at least one valid state has been
configured for the record. See elsewhere in the code for why it needs to
know that.

You /could/ disable the special() call by setting paddr->special to 0
before you call dbPut(), but I think that's actually a bad idea; only
the record type knows what its invariants are and you shouldn't be
trying to subvert that.

> This change removes the only call to dbFastPutConvertRoutine() in
> autosave, so I guess that could come off Michael Davidsaver's list.

OK, good. I've been considering removing those fast conversion routines
and giving the IOC just one set to handle both scalar and array data
conversions, but I haven't got around to comparing the performance yet
to see how big (if any) a hit this might cause to the scalar case.

- Andrew

-- 
Arguing for surveillance because you have nothing to hide is no
different than making the claim, "I don't care about freedom of
speech because I have nothing to say." -- Edward Snowdon

References:
Autosave for waveform with 1 element Paduan Donadio, Marcio
Re: Autosave for waveform with 1 element Mooney, Tim M.
Re: Autosave for waveform with 1 element Andrew Johnson
Re: Autosave for waveform with 1 element Mooney, Tim M.
Re: Autosave for waveform with 1 element Andrew Johnson
Re: Autosave for waveform with 1 element Mooney, Tim M.

Navigate by Date:
Prev: Re: Autosave for waveform with 1 element Mooney, Tim M.
Next: Re: ioc crashing while using asyn & modbus Gary Croke
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
Navigate by Thread:
Prev: Re: Autosave for waveform with 1 element Mooney, Tim M.
Next: CA gateway with systemd Benjamin Franksen
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
ANJ, 12 Jul 2017 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·