2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 <2018> 2019 2020 2021 2022 2023 2024 | Index | 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 <2018> 2019 2020 2021 2022 2023 2024 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: EPICS 7: Equivalent to Channel Access Filters |
From: | "Williams Jr., Ernest L." <[email protected]> |
To: | Marty Kraimer <[email protected]>, "[email protected]" <[email protected]> |
Date: | Sat, 17 Feb 2018 19:55:25 +0000 |
Hi Marty,
Thanks for the background on this one.
Cheers, Ernest From: [email protected] <[email protected]> on behalf of Marty Kraimer <[email protected]>
Sent: Saturday, February 17, 2018 8:38 AM To: [email protected] Subject: Re: EPICS 7: Equivalent to Channel Access Filters On 02/17/2018 09:52 AM, Williams Jr., Ernest L. wrote:
I had added filter plugin support to the pvCopy facility that comes with pvData. This was implemented in both pvDataCPP and pvDataJava as part of the pvCopy facility. That means that any channel provider that uses pvCopy would automatically have filter plugin support. But it was decided that this should not be part of epics7 so I backed out the support. Here is a condensed description of the support Field Plugin FilterspvCopy, which was described above, implements plugin filters that can optionally be attached to fields accessed via pvCopy. Thus, if a channel provider uses pvCopy, it automatically has plugin filter support. pvCopy itself provides the following plugins: array, deadband, timestamp, and ignore. Other plugins can also be implemented and registered. The following interfaces are used for implementing plugin filters: PVPlugin, PVFilter, and PVPluginRegistry. PVPluginMethod create is called when an instance of pvCopy is created by a channel provider. interface PVPlugin { PVFilter create(String requestValue,PVCopy pvCopy,PVField master); }where
Returns the PVFilter. A null is returned if master or requestValue is not appropriate for the plugin. PVFilterThe method filter is called whenever pvCopy is used to access a field of the client PVStructure. interface PVFilter { boolean filter(PVField copy,BitSet bitSet,boolean toCopy); String getName(); }where
Returns (true,false) if filter modified destination. PVPluginRegistryclass PVPluginRegistry { static void registerPlugin(String name,PVPlugin pvPlugin); static PVPlugin find(String name); }The arguments are:
The return value for find is the plugin implementation or null if no plugin with that name has been registered. Array PluginThis filter is used to retrieve parts of an array (subarrays and strided subarrays). It is modeled after the array Filter that is provided with epics base starting with the 3.15 releases. This filter works for both get and put. It works for any scalarArray field. It has not been tested for structureArray or unionArray fields. The syntax is one of the following: [array=start] [array=start:end] [array=start:increment:end] start and end both specify an index. increment must be a positive integer. start and end can be a positive or negative integer. If negative it is relative to the end of the array with -1 meaning the last element. Suppose that the master array is: 1,2,3,4,5,6,7,8,9,10 Then the get request [array=0:4]gets 1,2,3,4,5The request: [array=-3:-1]gets 8,9,10The request: [array=2:5]gets 3,4,5,6The request: [array=0:2:-1]gets 0,2,4,6,8,10 Deadband PluginThis filter is used to limit the changes to a numeric scalar field that are reported to a client. It is modeled after the deadband Filter that is provided with epics base starting with the 3.15 releases. This filter only works for numeric scalar fields and only for toCopy. The syntax is one of the following: [deadband=abs:value] [deadband=rel:value]where
TimeStamp PluginThis filter is used for accessing a timeStamp field. It is modeled after the timeStamp Filter that is provided with epics base starting with the 3.15 releases. This filter only works for a timeStamp field. The syntax is one of the following: [timestamp=current] [timestamp=copy]where
Ignore PluginThis is not an actual plugin but is handled by pvCopy itself. It is used to suppress sending data to a client unless other fields have changed. The syntax is: [ignore=true]One of the examples shown at the beginning of this section shows how it can be used. Marty
|