Richard Dickson reported:
TJNAF uses a locally developed record whose get_precision function
relies on the passed paddr->pfield to point to the field for which
precision is being requested.
In 3.13 there is a better way to determine the field.
A new routine
int dbGetFieldIndex(struct dbAddr *paddr);
is available. In addition the generated .h file
has a #define for each field. For example
the aiRecord.h has definitions:
#define aiRecordNAME 0
#define aiRecordDESC 1
#define aiRecordASG 2
#define aiRecordSCAN 3
#define aiRecordPINI 4
#define aiRecordPHAS 5
#define aiRecordEVNT 6
#define aiRecordTSE 7
#define aiRecordTSEL 8
#define aiRecordDTYP 9
#define aiRecordDISV 10
...
Thus you can use statements like
ind = dbGetFieldIndex(paddr)
if(ind==aiRecordVAL) ...
or use switch statements, etc.
Note that dbGetFieldIndex does NOT use pfield to determine
the index.
Does this solve your problem?
Marty Kraimer
- Navigate by Date:
- Prev:
Re: 3.12.2 GetRel command Rozelle Wright
- Next:
stripTool Documention Graham Waters
- 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
- Navigate by Thread:
- Prev:
Re: get_precision problem Marty Kraimer
- Next:
Capfast Bob Dalesio
- 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
|