Hi John,
On Monday 17 May 2010 14:09:54 John Dobbins wrote:
> question 1) does Channel Access transfer only NELM number of values or is
> it transferring MALM number of values?
CA transfers the number of values requested, and will zero-fill any values
beyond the number of elements that the record type reports; caget lets you
limit the request size, but it defaults to the whole array as reported by the
record type's cvt_dbaddr() routine at connection time.
> question 2) would this break down if I attach a monitor to my_subArray?
> i.e. will changing NELM cause problems for a monitor?
No, but IIRC CA currently fixes the amount of data that will be sent at
subscription time; if the client specifies zero for the number of elements it
will be taken as the array size reported by the record type's cvt_dbaddr()
routine at connection time.
> question 3) does aSub field NEA (number of input A elements) get set by db
> processing when input A is read in? i.e. can my subroutine use the value of
> NEA to tell how many values were read in?
NEA does get updated when the input link is read *provided* that it's a DB
link. CA links don't know how much data was actually transferred, so NEA will
always be set to NOA in that case, but for DB links the size should be
correctly set afterwards.
> question 4) is my aSub subroutine allowed to change NEVA (number of input A
> elements) (Record Reference manual field summary says "no modify" - or does
> that refer only to via dbPut?)
That summary is only for external access to the field, your subroutine is
allowed to change NEVA.
> question 5a) if answer to 4 is yes, will "caget my_aSub.VALA" return NEVA
> number of elements?
No, it will return NOVA elements, but only the first NEVA will come from VALA,
the remaining elements will be zero. CA doesn't tell you what value NEVA had
at the time though, and unfortunately monitors do not get posted on the NEVA
field so you'd have to do an explicit ca_get() to find it.
You might be able to utilize the first array element to hold the size if this
is important to you and you have control over the client code that will be
accessing the array. This is a limitation of the current CA implementation
and API.
HTH,
- Andrew
--
The best FOSS code is written to be read by other humans -- Harald Welte
- References:
- subArray and aSub questions John Dobbins
- Navigate by Date:
- Prev:
Re: compiling SDDS, libpng.a Patrick Thomas
- Next:
epics debian repository update Davidsaver, Michael
- 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
2020
2021
2022
2023
- Navigate by Thread:
- Prev:
subArray and aSub questions John Dobbins
- Next:
busy record Patrick Thomas
- 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
2020
2021
2022
2023
|