1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 <2017> 2018 2019 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> 2018 2019 2020 2021 2022 2023 2024 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: Autosave for waveform with 1 element |
From: | "Mooney, Tim M." <[email protected]> |
To: | "Johnson, Andrew N." <[email protected]>, "[email protected]" <[email protected]> |
Date: | Wed, 12 Jul 2017 01:29:07 +0000 |
Hi Andrew,
You're right that my status = (*dbFastPutConvertRoutine[DBR_STRING][field_type]) call doesn't specify DBF_NOACCESS for field_type. I missed the reassignment to field_type.
This code is called from two initHooks: initHookAfterInitDevSup (before record init) and initHookAfterInitDatabase (after record and device init). DBF_NOACCESS fields, including arrays, are skipped in the first call.
I don't have a way of distinguishing arrays of one element from scalars. At save time, I'm using ca_element_count() to determine the number of array elements, and treating PVs with one element as scalars.
At boot-time restore, I'm using the text that was written at save time to tell me how to restore the PV's value.
I also noticed that paddr->pfield was being set in different calls - get_array_info() or cvt_dbaddr() - and that this changed from 3.14.12.5 to 3.15.5. But when I pulled the 3.14.12.5 version of the waveform record into 3.15.5 and it didn't fix the problem, I assumed this was not the source of the problem. Maybe I should try again, more carefully this time.