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

Subject: Re: Setting an array to zero length
From: "Kasemir, Kay via Tech-talk" <tech-talk at aps.anl.gov>
To: "Rogers, Will (DLSLtd,RAL,LSCI)" <will.rogers at diamond.ac.uk>, "Johnson, Andrew N." <anj at anl.gov>
Cc: EPICS tech-talk <tech-talk at aps.anl.gov>
Date: Wed, 8 Apr 2020 19:20:29 +0000
> It is not currently (and may never be) possible to put a zero-length array through Channel Access;
> I don’t know if PVA and QSRV can handle them or not.

For PVAccess, the protocol has different type identifiers for scalars and arrays, so a 'double' is  clearly distinguished from a 'double []' with exactly one element.
When using an array type, the length can change at runtime and include zero length == empty array.

As for QSRV, when you create a 'compress' record with NSAM = 1, the PV is a an NTScalar. For NSAM > 1 the PV is of type NTScalarArray.
So it behaves just like the Channel Access example, an array of size 1 appears as a scalar.
Not sure if this is a quirk in QSRV that could be fixed, or if the limitation is in the database/IOC API that it needs to use.


-Kay

Replies:
Re: Setting an array to zero length Johnson, Andrew N. via Tech-talk
References:
Re: Setting an array to zero length Rogers, Will (DLSLtd, RAL, LSCI) via Tech-talk
Re: Setting an array to zero length Johnson, Andrew N. via Tech-talk

Navigate by Date:
Prev: Re: CS-STUDIO/BEAST Alarms to logstash? Shroff, Kunal via Tech-talk
Next: Re: Setting an array to zero length Johnson, Andrew N. via Tech-talk
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  <20202021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Setting an array to zero length Johnson, Andrew N. via Tech-talk
Next: Re: Setting an array to zero length Johnson, Andrew N. via Tech-talk
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  <20202021  2022  2023  2024 
ANJ, 08 Apr 2020 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·