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  2020  2021  <20222023  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  2020  2021  <20222023  2024 
<== Date ==> <== Thread ==>

Subject: Re: NTNDArray with attributes using QSRV group Pas
From: Michael Davidsaver via Tech-talk <tech-talk at aps.anl.gov>
To: Joao Paulo Martins <JoaoPaulo.Martins at ess.eu>
Cc: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Wed, 2 Nov 2022 09:48:13 -0700
On 11/2/22 07:04, Joao Paulo Martins via Tech-talk wrote:
Hello,

I’m trying to instantiate a NTNDArray with some NTAttributes in my IOC using QSRV group PV definitions, as the example in pva2pva (https://github.com/epics-base/pva2pva/blob/master/iocBoot/iocimagedemo/image.db <https://github.com/epics-base/pva2pva/blob/master/iocBoot/iocimagedemo/image.db> ).

There is a definite question of "can" vs. "should" with this example.

I include image.db to both demonstrate and test what is possible in
a pathological case.  (NTNDArray has every kind of PVA weirdness)


...
record(mbbi, "$(P)FOO") {
     info(Q:group, {
         "$(N):Array":{
             "attribute[0].value":{+type:"any", +channel:"VAL"},
             "attribute[0].timeStamp":{+type:"meta", +channel:"TIME"}

The "meta" mapping attaches a sub-structure at the referenced position.
So as specified, this creates "attribute[0].timeStamp.timeStamp" and friends.

What you intend should be possible with:

             "attribute[0]":{+type:"meta", +channel:"TIME"}

However, at the moment this results in an error:

TST:image1:Array: Error Group not created: leaf field may not have sub-script : attribute[0]

I see this as a bug in QSRV.

https://github.com/epics-base/pva2pva/issues/51


That said.  I tend to see "attribute[]" as a bit of a hack to work
around CA limitations.  With PVA it is straightforward to place
additional PVs at the top of a QSRV group, alongside the NDNTArray.

eg.

record(waveform, "$(N):ArrayData") {
    ...
    info(Q:group, {
        "$(N):Array":{
            +id:"epics:nt/NTNDArray:1.0",
            "mycamera.value":{+type:"any",
                     +channel:"VAL",
                     +trigger:"*"},
...
record(mbbi, "$(N)FOO") {
    info(Q:group, {
        "$(N):Array":{
             "othersignal":{+channel:"VAL",
...


This better takes advantage of PVA protocol features to only send
fields marked as changed.  With "attributes[]" the entire array must
be sent every time any field of any element changes.

Also, this avoids limitations implicit in the definition of NTAttribute.
eg. how to represent an enumeration like your "mbbi".  (where is the
"choices" list?)


Replies:
Re: NTNDArray with attributes using QSRV group Pas Michael Davidsaver via Tech-talk
References:
NTNDArray with attributes using QSRV group Pas Joao Paulo Martins via Tech-talk

Navigate by Date:
Prev: Re: NTNDArray with attributes using QSRV group Pas Veseli, Sinisa via Tech-talk
Next: Re: NTNDArray with attributes using QSRV group Pas Michael Davidsaver 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  2020  2021  <20222023  2024 
Navigate by Thread:
Prev: Re: NTNDArray with attributes using QSRV group Pas Michael Davidsaver via Tech-talk
Next: Re: NTNDArray with attributes using QSRV group Pas Michael Davidsaver 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  2020  2021  <20222023  2024 
ANJ, 02 Nov 2022 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·