Hi Marty,
I think that for command line utilities having the filter be on the client side and sending everything over the network is fine. The time to dump a 2 Mpixel image in ASCII, which I am forced to do now, dwarfs the overhead of the network transmission, and probably actually consumes more network resources unless I happen to be sitting at the console of the client machine.
It seems that one place to implement this would be in the pvData Formatter class. It already has methods for highlight() and format(). One possibility would be to add a trim() method. This would not actually limit the number of array elements, but would rather trim the formatted string for an array to the specified length. That would probably not be an integral number of array elements, but it would meet my requirements.
Mark
-----Original Message-----
From: Marty Kraimer <mrkraimer at comcast.net>
Sent: Wednesday, April 1, 2020 12:48 PM
To: Mark Rivers <rivers at cars.uchicago.edu>; tech-talk at aps.anl.gov
Subject: Re: NTNDArray array filter does not work on value
On 4/1/20 9:44 AM, Mark Rivers wrote:
>> mrk> pvget -r 'value[array=0:2]' PVRdoubleArray
> Can your proposed syntax work to limit all arrays to N values or do I need to specify it for each array? If I use the proposed syntax can I get all elements of the NTNDArray while limiting all arrays to N values?
I was thinking of only providing support for individual fields.
The request syntax provides record options.
Maybe pvDatabaseCPP could support a record option?
-r 'record[array=low:high:inc]field(...)'
This would apply an array filter to all scalarArray fields in the structure the client is requesting.
The structure could have all field types, i.e.
scalar,scalarArray,structure,structureArray,union,unionArray.
But ONLY scalarArray fields will have the filter applied.
I don't think it should be applied to structureArray or unionArray fields.
For complicated structures this can be an expensive request.
BUT this should only be used for get.
I see all kinds of bad behavior for puts.
>
> To my naïve thinking this is something that belongs as a simple option in the pvget and pvmonitor client and not something that requires a complex filter expression. As a user I don't want to have to know the names of the NTNDArray structure elements in advance, I just want to know that the entire structure is called 13SIM1:Pva1:Image which I can determine from the OPI display for NDPluginPva.
The array filter can be used by any client, i.e. not just caget and caput.
I agree that it would be nice to have pvget provide a way to limit the amount of output for all scalarArrays in the received data.
Thus it could be used with all channel providers.
But note that is would be done on the client side so that entire arrays will still be passed from server to client.
Again I see all kinds of bad behavior if it is done for pvput.
Marty
- Replies:
- RE: NTNDArray array filter does not work on value Mark Rivers via Tech-talk
- Re: NTNDArray array filter does not work on value Marty Kraimer via Tech-talk
- References:
- EPICS7 roller-coaster Rolf Keitel via Tech-talk
- Re: EPICS7 roller-coaster Michael Davidsaver via Tech-talk
- Re: EPICS7 roller-coaster Mark Rivers via Tech-talk
- NTNDArray array filter does not work on value Marty Kraimer via Tech-talk
- RE: NTNDArray array filter does not work on value Mark Rivers via Tech-talk
- Re: NTNDArray array filter does not work on value Marty Kraimer via Tech-talk
- Navigate by Date:
- Prev:
RE: Consistently inconsistent behaviour when testing ADURL Mark Rivers via Tech-talk
- Next:
RE: NTNDArray array filter does not work on value Mark Rivers 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
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: NTNDArray array filter does not work on value Marty Kraimer via Tech-talk
- Next:
RE: NTNDArray array filter does not work on value Mark Rivers 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
2022
2023
2024
|