Experimental Physics and Industrial Control System
I was just looking at the init_record function for the mbboDirect
record (Release 3.13.10) and saw the following code:
status=(*pdset->init_record)(pmbboDirect);
/* init_record might set status */
if(status==0){
rval = pmbboDirect->rval;
if(pmbboDirect->shft>0) rval >>= pmbboDirect->shft;
pmbboDirect->val = (unsigned short)rval;
pmbboDirect->udf = FALSE;
} else if (status == 2) status = 0;
}
return(status);
*Shouldn't it be something like:*
status=(*pdset->init_record)(pmbboDirect);
/* init_record might set status */
if(status==0){
rval = pmbboDirect->rval;
if(pmbboDirect->shft>0) rval >>= pmbboDirect->shft;
/* >>>>>>>>>> */
if (pmbboDirect->mask>0) rval &= pmbboDirect->mask
/* <<<<<<<<<< */
pmbboDirect->val = (unsigned short)rval;
pmbboDirect->udf = FALSE;
} else if (status == 2) status = 0;
}
return(status);
--
+-------------------------------------------------+
| Rolf Keitel, TRIUMF Tel: (604) 222-7453 |
| Group Leader ISAC Controls Fax: (604) 222-7307 |
| and Electronics Development |
| Vancouver, B.C., Canada |
+-------------------------------------------------+
- Navigate by Date:
- Prev:
RE: CA loss package on 1 Hz rate Dalesio, Leo `Bob`
- Next:
RE: CA loss package on 1 Hz rate Jeff Hill
- 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:
Upcoming EPICS meeting Dalesio, Leo `Bob`
- Next:
TRIUMF modtcpSupport Rolf Keitel
- 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