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

Subject: Re: Channel access and ca_element_count
From: Benjamin Franksen <[email protected]>
To: [email protected]
Date: Fri, 2 Oct 2009 21:10:36 +0200
On Freitag, 2. Oktober 2009, [email protected] wrote:
> Firstly, is it possible for the element count of a channel to change
> while the channel is connected?  I'm thinking in particular of the case
> when using camonitor (well, ok, I mean ca_create_subscription()) to
> monitor a waveform PV.  Each event_handler callback is informed of the
> dbr count -- but as far as I can tell, it's always the maximum waveform
> size, even if NORD is smaller.

You just stumbled over what I think is one of the most irritating 
mis(sing)-features of EPICS as it stands: support for array fields is very 
weak. Particularly it is limited to arrays which are of fixed size at 
run-time.

> Is the fact that the update size doesn't change, ca_element_count()
> always reports the NELM, and subscribing with zero count gets the full
> wavelength, is this restriction fundamental to channel access, a
> limitation of the channel access server, or just something that hasn't
> been implemented in the waveform record?  This question becomes more
> interesting as we use waveform records for large images!

AFAIK, this is more or less built into the database machinery itself, e.g. 
the same problem appears with database links. At least that is my 
experience from trying to write my own array handling record types. I 
originally thought that, by writing appropriate (if perhaps not extremely 
efficient) code, I could circumvent this, but to no avail: even database 
links between two records (of types where you wrote the support yourself), 
once they are initialized by the EPICS core, cannot change the reported 
number of elements at run-time. The existing API is insufficient, as e.g. 
convert_db_addr, get_array_info, and so on are called only during link 
initialization, never during run-time. The only way to work around this is 
to use /two/ separate links to two separate fields, one for the array, and 
one for the (current) array size.

With CA, the situation is similar: once the channel is established, there is 
(to my knowledge) no way for the server to notify clients of a change in 
the PV's array size. The corresponding field of chid structure is filled 
once when the channel connects and never changes as long as it stays 
connected.

Cheers
Ben


Replies:
RE: Channel access and ca_element_count Jeff Hill
References:
Channel access and ca_element_count michael.abbott

Navigate by Date:
Prev: Re: state notation code flags Patrick Thomas
Next: Driver for Acromag IP341 Dropp, Christopher
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Channel access and ca_element_count michael.abbott
Next: RE: Channel access and ca_element_count Jeff Hill
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 31 Jan 2014 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·