Experimental Physics and Industrial Control System
Graham.
The waveform record support 'exports' references to
the memory pointed to by BPTR as well as it's size
(NELM) via the record's 'cvt_dbaddr()' member.
This means that other parts of EPICS potentially hold
a copy of this information which would become
inconsistent if you change either.
Hence, device-support *must not* change BPTR or NELM.
However, it is legal to set NORD to the number of elements
that are currently stored in the waveform and NORD may
be any number smaller than NELM.
NORD is also what is returned by the record's get_array_info()
member and it is correctly handled by dbGetField() but unfortunately
the CA server (and client) ignores this feature of the database
and always returns the number of elements the client asks for.
Normally, clients use ca_element_count() to find out how many
elements are in an array but that boils down to 'NELM'.
You could let your client read NORD first and then read the
corresponding number of array elements but unfortunately,
there is no way to do this in an atomic operation :-(
It would IMHO be a desirable feature to be able to tell
the CA client/server that you want to read the current
number of elements and the data in a single operation.
BTW: Another feature that is implemented in the database
(reading from an offset into an array) is IIRC not available
through CA.
-- Till
On 06/07/2010 04:06 AM, [email protected] wrote:
Hi All,
I am integrating a turn-by-turn BPM system into EPICS and would like to
store the raw BPM pickup data in a waveform record. Due to the nature
of the system, each run can result in a different number of samples for
each BPM pickup, so the array size is unknown in advance and could
potentially be different every run.
Is it possible to resize the number of waveform record elements in my
device support, or do I have to size the waveform record in advance for
the maximum number of samples that could be expected. Most of the
examples of waveform device support I see read the nelm field and return
this fixed amount of data via the records bptr.
Thanks,
Graham
- References:
- Waveform Record Device Support graham.cox
- Navigate by Date:
- Prev:
Re: Waveform Record Device Support emmanuel_mayssat
- Next:
CA Lab - New interface between LabVIEW? and EPICS Carsten Winkler
- 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: Waveform Record Device Support Dirk Zimoch
- Next:
Re: RE: Waveform Record Device Support nda
- 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