Amy > AmyAverage
AmyAverage
Introduction
The AmyAverage class provides the computation of an arithmetic
mean. The arithmetic mean is computed on runs of a configurable length. A
moving average option is also supported which causes the arithmetic mean to be
computed on overlapping runs of a configurable length.
Configuration
An AmyAverage instance may be created on an asyn port with the
following EPICS iocsh function:
int amyAverageConfig(const char *portName, int numAddrs, int
maxNumValues, int integerStorageAndArithmetic);
- portName
- Name of asyn port to be used by this driver
- numAddrs
- Number of addresses (i.e. virtual devices) (>= 1)
- maxNumValues
- Maximum number of values that may be averaged (>= 1)
- integerStorageAndArithmetic
- Whether to store values to be averaged as integers and perform integer
arithmetic or to use floating-point storage and arithmetic (0=floating-point,
1=integer)
Asyn Interface
- VALUE_INT
- asynInt32; read-write. The integer value to be added to the list of values
being averaged.
- VALUE_FLT
- asynFloat64; read-write. The floating-point value to be added to the list
of values being averaged.
- ARITH_MEAN_INT
- asynInt32; read-only. The arithmetic mean as an integer value.
- ARITH_MEAN_FLT
- asynFloat64; read-only. The arithmetic mean as a floating-point
value.
- MOVING
- asynInt32; read-write. Whether the average should be computed as a moving
average (0=no, 1=yes).
- RESET
- asynInt32; read-write. Resets the arithmetic mean computation. The
asynInt32 value is ignored.
- WINDOW_SIZE
- asynInt32; read-write. The size of the window (run length) used for the
arithmetic mean computation.
- MAX_NUM_VALUES
- asynInt32; read-only. The maximum number of values that may be
averaged.