EPICS Home

Experimental Physics and Industrial Control System


 
2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: double buffered waveformRecord
From: Michael Davidsaver <[email protected]>
To: [email protected]
Date: Tue, 22 Jan 2013 12:17:42 -0500
I've posted another iteration. The changes have actually gotten much shorter.

The first patch changes dbAccess.c and arr.c to save the original value of DBADDR::pfield before calling get_array_info, then restore it immediately after.

http://bazaar.launchpad.net/~epics-core/epics-base/array-opt/revision/12397

The second patch changes waveformRecord.c to allow the safe replacement of BPTR whenever the record is locked. No special allocation, or pointer tricks, are needed.

http://bazaar.launchpad.net/~epics-core/epics-base/array-opt/revision/12398

I've also included a (demonstration only) device support which cycles through a set of buffers. Each buffer is written in a dedicated thread which passes the buffer pointer to the device support read function where it is stored in BPTR (uses I/O Intr scan). At each iteration the value of each array element is incremented by one to allow a client to detect dropped or corrupted updates. This process runs at 1KHz max.

If you want to try it:

cat << EOF > spam.db
record(waveform, "$(P)spam") {
  field(DTYP, "Spam Async")
  field(SCAN, "I/O Intr")
  field(NELM, "$(N=1)")
  field(FTVL, "SHORT")
}
EOF

./bin/$(EPICS_HOST_ARCH)/softIoc -m 'P=x:,N=1000' -d spam.db

http://bazaar.launchpad.net/~epics-core/epics-base/array-opt/revision/12399
http://bazaar.launchpad.net/~epics-core/epics-base/array-opt/revision/12400


Replies:
Re: double buffered waveformRecord Andrew Johnson
References:
double buffered waveformRecord Michael Davidsaver
Re: double buffered waveformRecord Andrew Johnson
Re: double buffered waveformRecord Michael Davidsaver
Re: double buffered waveformRecord Andrew Johnson
Re: double buffered waveformRecord Ralph Lange
Re: double buffered waveformRecord Michael Davidsaver

Navigate by Date:
Prev: Re: double buffered waveformRecord Michael Davidsaver
Next: Re: double buffered waveformRecord Andrew Johnson
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: double buffered waveformRecord Michael Davidsaver
Next: Re: double buffered waveformRecord Andrew Johnson
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024