> 2. Useing waveform record with a very slow hardware, I used double
> buffering and cahngeing the buffer pointer when the data is ready.
> On medm display I have seen only every second buffer. In an other
> situation (also with the modified bptr) the old medm display displays
> wrong data but if I restart or starting a new, the correct data is
> comeing. useing buffer copy instaed of bptr changeing helps, but
> it costs memory and cpu time...
> any idea ?
>
> Regards, Gabor
> DESY, Germany
>
Gabor,
There is an example of "double buffering" of arrays in scanRecord.c (in the
EPICS distribution). It's probably more complicated than normal, for in
cvt_dbaddr and get_array_info it has to figure out which of the 23 arrays
contained in the scan record is of interest to the CA client.
I believe the KEY points to double buffering are ...
1) in get_array_info, you must return the pointer to the "valid" buffer. (The
CA client calls this routine when an event is posted).
2) you must "db_post_events" on BOTH pointers each time. e.g.
db_post_events(pscan,precPvt->posBufPtr[0].pBufA, DBE_VAL_LOG);
db_post_events(pscan,precPvt->posBufPtr[0].pBufB, DBE_VAL_LOG);
That, I think, is the "how". You'll have to get an explanation of "why" from
Marty or Jeff :) .
Ned
- Navigate by Date:
- Prev:
waveform record & I/O interrupt scan (R13) Gabor Csuka
- Next:
Re: waveform record & I/O interrupt scan (R13) Ned Arnold
- 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:
waveform record & I/O interrupt scan (R13) Gabor Csuka
- Next:
Re: waveform record & I/O interrupt scan (R13) Ned Arnold
- 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
|