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 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
<== Date ==> <== Thread ==>

Subject: Re: How access to an array value from a process variable using ca_array_get()?
From: "J. Lewis Muir" <jlmuir@imca-cat.org>
To: Raquel Pérez Lázaro <rperez@ixion.es>
Cc: tech-talk@aps.anl.gov
Date: Thu, 16 Feb 2017 10:48:26 -0600
On 02/15, Raquel Pérez Lázaro wrote:
> Hello,
> 
> I am trying to read and write to an array value from a process
> variable using ca_array_get() function, but it is no clear for me
> how I should use this function in order to access to each element of
> the array and print its value.
> 
> I would appreciate an example.
> 
> Thank you,
> 
> R. Perez

See the documentation for ca_array_get in the CA Reference Manual [1].
It suggests looking a "caExample.c in the example application created
by makeBaseApp.pl."  You can also look at the source code for the caget
program in EPICS Base 3.14 [2] (and 3.15 [3]) which has a caget function
which uses ca_array_get_callback or ca_array_get and also iterates over
the elements of the array and prints their values.

Regards,

Lewis

[1] http://www.aps.anl.gov/epics/base/R3-14/12-docs/CAref.html#ca_get
[2] http://bazaar.launchpad.net/~epics-core/epics-base/3.14/view/head:/src/catools/caget.c
[3] http://bazaar.launchpad.net/~epics-core/epics-base/3.15/view/head:/src/ca/client/tools/caget.c

Replies:
Re: How access to an array value from a process variable using ca_array_get()? Raquel Pérez Lázaro
References:
How access to an array value from a process variable using ca_array_get()? Raquel Pérez Lázaro

Navigate by Date:
Prev: Notes on building EDM for Linux Mint 17 bob.anderson
Next: Re: EDM compiling problems Mike Westfall
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
Navigate by Thread:
Prev: How access to an array value from a process variable using ca_array_get()? Raquel Pérez Lázaro
Next: Re: How access to an array value from a process variable using ca_array_get()? Raquel Pérez Lázaro
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
ANJ, 17 Feb 2017 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·