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  <20122013  2014  2015  2016  2017  2018  2019  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019 
<== Date ==> <== Thread ==>

Subject: Re: What is void* puser in ca_create_channel
From: Benjamin Franksen <benjamin.franksen@helmholtz-berlin.de>
To: <tech-talk@aps.anl.gov>
Date: Fri, 30 Mar 2012 15:57:35 +0200
On Thursday, March 29, 2012, Hill, Jeffrey O wrote:
> > How does this parameter have to look like?
> > Can I use a C-Struct with any member I want to have (even members which
> > are not for the CA, but for another part of my program)? Are there any
> > members which are mandatory? (like value or chid)
> 
> A pointer to any data structure can be used. The CA library does not in
> any way access, or place any restrictions on the content of, this user
> application private data structure. The user application is of course
> responsible for allocation, initialization, maintenance, and
> de-allocation (proper cleanup) of this data structure.
> 
> Use of void pointers passed to callbacks is an old technique which is
> roughly equivalent to a virtual function in modern software interfaces,
> BTW.

To give it some perspective, it is a low-level implementation technique for 
what in high-level languages is automatically available when creating what 
is commonly referred to as a 'closure'.

Cheers
Ben

Attachment: signature.asc
Description: This is a digitally signed message part.


References:
What is void* puser in ca_create_channel Florian Feldbauer
RE: What is void* puser in ca_create_channel Hill, Jeffrey O

Navigate by Date:
Prev: Re: another build problem with db dependencies Benjamin Franksen
Next: RE: What is void* puser in ca_create_channel Hill, Jeffrey O
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019 
Navigate by Thread:
Prev: RE: What is void* puser in ca_create_channel Hill, Jeffrey O
Next: ../testServer.cpp:672: warning: converting to 'int' from 'double' Dirk Zimoch
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019 
ANJ, 18 Nov 2013 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·