EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

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  <20202021  2022  2023  2024  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  <20202021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: looking for aai/waveform example
From: Ralph Lange via Tech-talk <tech-talk at aps.anl.gov>
To: EPICS Tech Talk <tech-talk at aps.anl.gov>
Date: Fri, 31 Jul 2020 11:33:41 +0200
For the record:

Using a recent version of EPICS Base, you can also avoid copying and swap pointers instead.
See How To Avoid Copying Arrays with waveformRecord in the EPICS How To pages.

In this specific case (shared memory involved) copying might be preferred, though.

Cheers,
~Ralph


On Thu, 30 Jul 2020 at 23:51, Hu, Yong via Tech-talk <tech-talk at aps.anl.gov> wrote:

Hi Dave,

 

For waveform record, I usually simply use “memcpy” in the device support routine, something like this:

 

    memcpy(precord->bptr, pointer-to-data-source, size-of-bytes-to-be-copied);

    precord->nelm = number-of-data-point;

precord->nord = number-of-data-point;

 

precord is a pointer to waveformRecord.

 

Good luck!

Yong


References:
looking for aai/waveform example David A. Slimmer via Tech-talk
Re: looking for aai/waveform example Hu, Yong via Tech-talk

Navigate by Date:
Prev: Re: looking for aai/waveform example Hu, Yong via Tech-talk
Next: Re: Attocube IDS3010 Bradnick, Ben (DLSLtd, RAL, LSCI) via Tech-talk
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  <20202021  2022  2023  2024 
Navigate by Thread:
Prev: Re: looking for aai/waveform example Hu, Yong via Tech-talk
Next: EPICS Base Compilation Failed Under Cygwin gcc 9+ Paul Chu via Tech-talk
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  <20202021  2022  2023  2024 
ANJ, 31 Jul 2020 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·