On Thursday 31 July 2014 10:34:31 Michael Davidsaver wrote:
> I'm working on some changes to link parsing (to facilitate some
> further changes to DB locking). In doing on this I've come across
> some behaviors of the present implementation which I'd like to change
> (see the numbers below). I don't think these would have break
> existing code outside Base, but would appreciate being corrected on
> this point.
>
> At present handling of INP/OUT links during initialization is
> complicated it is done as the .db file is parsed, so the DTYP field
> may not be known yet.
>
> I'd like to defer initial parsing of links from its present location
> under dbLoadRecords() to an early stage of iocInit() before
> record/driver/dset initialization and autosave pass0.
>
> 1) This would mean that the value union in DBLINK would remain
> uninitialized until iocInit().
>
> This will greatly simplify things by eliminating the seemingly
> circular relationship between dbPutString() and setLinkType().
>
> 2) A pleasant side effect of these changes is that syntax errors (eg.
> forgetting '#') in HW link fields will be detected and failed before
> the link field is modified. Currently this fails, but after the
> current device support is detached.
>
> 3) I find that at present omitting a '@' from an INST_IO link will
> succeed, but an empty string is stored. I'd like to change this to
> fail.
>
> Presently, a syntactically incorrect INP/OUT link in a .db file will
> result in a partially initialized link being seen by device support.
> For example, setting "#C41" for a VME_IO link will result in only the
> signal member for struct vmeio being set to a non-zero value.
>
> 4) I think the device support should see only an "empty" link (correct
> type with all zeros and empty parm string) if INP/OUT is omitted or
> syntactically incorrect.
>
> 6) Further, I'd like to add a field to the DBLINK structure to
> indicate whether it has been correctly initialized to a non-default
> value. Device support can then test this.
This all sounds very sensible to me. I can see no problems arising from
such a change.
So, a thick +1.
Cheers
Ben
--
"Make it so they have to reboot after every typo." â Scott Adams
________________________________
Helmholtz-Zentrum Berlin für Materialien und Energie GmbH
Mitglied der Hermann von Helmholtz-Gemeinschaft Deutscher Forschungszentren e.V.
Aufsichtsrat: Vorsitzender Prof. Dr. Dr. h.c. mult. Joachim Treusch, stv. Vorsitzende Dr. Beatrix Vierkorn-Rudolph
Geschäftsführung: Prof. Dr. Anke Rita Kaysser-Pyzalla, Thomas Frederking
Sitz Berlin, AG Charlottenburg, 89 HRB 5583
Postadresse:
Hahn-Meitner-Platz 1
D-14109 Berlin
http://www.helmholtz-berlin.de
- References:
- changes to HW link behavior Michael Davidsaver
- Navigate by Date:
- Prev:
changes to HW link behavior Michael Davidsaver
- Next:
Failed assertion in base 3.15 Benjamin Franksen
- Index:
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
<2014>
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
changes to HW link behavior Michael Davidsaver
- Next:
Failed assertion in base 3.15 Benjamin Franksen
- Index:
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
<2014>
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|