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 2024 2025 | 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 2024 2025 |
<== 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
|