Experimental Physics and Industrial Control System
Have you ever needed to collect values such as a status bit from over a
dozen similar devices, summarizing e.g. by calculating the maximum or
minimum, or logical conjunction or disjunction? Did it ever occur to you
that doing this via cascading calc record is somewhat less than elegant? If
any of this sounds familiar to you, then check out http://www-
csr.bessy.de/control/SoftDist/nofun/ where you'll find support for a number
of new record types that were inspired by features commonly found in
functional programming languages, such as map, fold, etc. This is from the
docs on the website (which are scant, sorry; this will improve):
collectRecord
Collect data via input links and store values in an array field.
foldRecord
Reduce an array to a scalar by folding an operation over the array, given
a seed value for the accumulator. The operation gets the current array
index, the current array element, and the current accumulator as input,
and produces a new accumulator value as the result.
mapRecord
Map an operation over an array, producing a new array. The operation gets
the current array index and the current array element as input, and
produces a new array element value as the result.
sfanoutRecord
Distribute a single scalar value to multiple PVS, like a dfanout record,
but with more output links and able to handle string values.
The operation in a fold or map record may be performed either as a CALC
expression, as a subroutine, or via input and output links by another
record. Elements are iterated starting from index 0 up to the maximum index.
An important feature is that the number of array elements resp. input links
can be specified at compile time. This is done by setting the make variable
NUM_LINKS (with a maximum of 1000 due to EPICS field name length
limitation).
Have fun!
Cheers
Ben
- Navigate by Date:
- Prev:
Re: DB CA link to PROC field Benjamin Franksen
- Next:
Agilent E2050 Szalata, Zenon M.
- 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:
sub routine record doesn't get value via INPD Dr. Peter Zumbruch
- Next:
Agilent E2050 Szalata, Zenon M.
- 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