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  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  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  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: What is void* puser in ca_create_channel
From: Ralph Lange <[email protected]>
To: EPICS tech talk <[email protected]>
Date: Thu, 29 Mar 2012 12:11:05 +0200
It's an opaque void pointer, used for the callback mechanisms.
Whenever your (user supplied) callback routines are being called,
Channel Access will provide them with the puser argument that you set
when you created the subscription.

Except for its size, there is no restriction on puser.
Usually, it is a pointer to an internal structure in the client, that
the callback routines can use to do their work.
Sometimes, it is an enum, or an array offset.

~Ralph


On 29.03.2012 12:01, Florian Feldbauer wrote:
> Dear all,
>
> I currently write a CA Client that should monitor all measured
> temperatures in my experiment
> to regulate the chillers.
> This is my first try to program a CA Client, and I have a question
> concerning this:
>
> The ca_create_channel and the ca_create_subscription methods both have
> a parameter void* puser. 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)
>
> In the camonitor.c example generated with makeBaseApp.pl this puser is
> just a pointer to a C-Struct containing
> a c-string value, the chid and evid of the channel.
>
> Best regards,
> Florian
>


References:
What is void* puser in ca_create_channel Florian Feldbauer

Navigate by Date:
Prev: What is void* puser in ca_create_channel Florian Feldbauer
Next: Re: EPICS Collaboration Meeting Spring 2012 Williams Jr., Ernest L.
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  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: What is void* puser in ca_create_channel Florian Feldbauer
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  2020  2021  2022  2023  2024 
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 ·