org.epics.pvmanager.data
Class ExpressionLanguage

java.lang.Object
  extended by org.epics.pvmanager.data.ExpressionLanguage

public class ExpressionLanguage
extends Object

PVManager expression language support for EPICS types.

Author:
carcassi

Method Summary
static DesiredRateExpression<VDouble> averageOf(SourceRateExpression<VDouble> doublePv)
          Aggregates the sample at the scan rate and takes the average.
static VTableColumn column(String name, DesiredRateExpressionList<?> values)
          A column for an aggregated vTable.
static DesiredRateExpression<VStatistics> statisticsOf(SourceRateExpression<VDouble> doublePv)
          Aggregates the sample at the scan rate and calculates statistical information.
static DesiredRateExpressionList<VStatistics> statisticsOf(SourceRateExpressionList<VDouble> doubleExpressions)
          Applies #statisticsOf(org.epics.pvmanager.SourceRateExpression) to all arguments.
static DesiredRateExpression<VMultiDouble> synchronizedArrayOf(TimeDuration tolerance, SourceRateExpressionList<VDouble> expressions)
          A synchronized array from the given expression.
static DesiredRateExpression<VMultiDouble> synchronizedArrayOf(TimeDuration tolerance, TimeDuration cacheDepth, SourceRateExpressionList<VDouble> expressions)
          A synchronized array from the given expression.
static ChannelExpression<VByteArray,byte[]> vByteArray(String name)
          A channel with the given name of type VByteArray.
static ChannelExpression<VDouble,Double> vDouble(String name)
          A channel with the given name of type VDouble.
static ChannelExpression<VDoubleArray,float[]> vDoubleArray(String name)
          A channel with the given name of type VDoubleArray.
static SourceRateExpression<VDoubleArray> vDoubleArrayOf(SourceRateExpression<?> expression)
          Expects a numeric array (VDoubleArray, VFloatArray, VIntArray, VShortArray or VByteArray) and converts it to a VDoubleArray.
static DesiredRateExpressionList<VDouble> vDoubleConstants(List<Double> values)
          A list of constant expressions of type VDouble.
static SourceRateExpression<VDouble> vDoubleOf(SourceRateExpression<?> expression)
          Expects a numeric scalar (VDouble or VInt) and converts it to a VDouble.
static ChannelExpressionList<VDouble,Double> vDoubles(List<String> names)
          A list of channels with the given names, all of type VDouble.
static ChannelExpression<VEnum,Integer> vEnum(String name)
          A channel with the given name of type VEnum.
static ChannelExpression<VFloatArray,float[]> vFloatArray(String name)
          A channel with the given name of type VFloatArray.
static ChannelExpression<VInt,Integer> vInt(String name)
          A channel with the given name of type VInt.
static ChannelExpression<VIntArray,int[]> vIntArray(String name)
          A channel with the given name of type VIntArray.
static DesiredRateExpressionList<VInt> vIntConstants(List<Integer> values)
          A list of constant expressions of type VDouble.
static ChannelExpression<VShortArray,short[]> vShortArray(String name)
          A channel with the given name of type VShortArray.
static ChannelExpression<VString,String> vString(String name)
          A channel with the given name of type VString.
static ChannelExpression<VStringArray,String[]> vStringArray(String name)
          A channel with the given name of type VStringArray.
static DesiredRateExpressionList<VString> vStringConstants(List<String> values)
          A list of constant expressions of type VString.
static DesiredRateExpression<VTable> vTable(VTableColumn... columns)
          Creates a vTable by aggregating different values from different pvs.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

vDoubleOf

public static SourceRateExpression<VDouble> vDoubleOf(SourceRateExpression<?> expression)
Expects a numeric scalar (VDouble or VInt) and converts it to a VDouble.

Parameters:
expression - an expression that returns a numeric scalar
Returns:
a new expression

vDoubleArrayOf

public static SourceRateExpression<VDoubleArray> vDoubleArrayOf(SourceRateExpression<?> expression)
Expects a numeric array (VDoubleArray, VFloatArray, VIntArray, VShortArray or VByteArray) and converts it to a VDoubleArray.

Parameters:
expression - an expression that returns a numeric array
Returns:
a new expression

vDouble

public static ChannelExpression<VDouble,Double> vDouble(String name)
A channel with the given name of type VDouble.

Parameters:
name - the channel name; can't be null
Returns:
an expression representing the channel

vFloatArray

public static ChannelExpression<VFloatArray,float[]> vFloatArray(String name)
A channel with the given name of type VFloatArray.

Parameters:
name - the channel name; can't be null
Returns:
an expression representing the channel

vDoubleArray

public static ChannelExpression<VDoubleArray,float[]> vDoubleArray(String name)
A channel with the given name of type VDoubleArray.

Parameters:
name - the channel name; can't be null
Returns:
an expression representing the channel

vInt

public static ChannelExpression<VInt,Integer> vInt(String name)
A channel with the given name of type VInt.

Parameters:
name - the channel name; can't be null
Returns:
an expression representing the channel

vByteArray

public static ChannelExpression<VByteArray,byte[]> vByteArray(String name)
A channel with the given name of type VByteArray.

Parameters:
name - the channel name; can't be null
Returns:
an expression representing the channel

vShortArray

public static ChannelExpression<VShortArray,short[]> vShortArray(String name)
A channel with the given name of type VShortArray.

Parameters:
name - the channel name; can't be null
Returns:
an expression representing the channel

vIntArray

public static ChannelExpression<VIntArray,int[]> vIntArray(String name)
A channel with the given name of type VIntArray.

Parameters:
name - the channel name; can't be null
Returns:
an expression representing the channel

vString

public static ChannelExpression<VString,String> vString(String name)
A channel with the given name of type VString.

Parameters:
name - the channel name; can't be null
Returns:
an expression representing the channel

vStringArray

public static ChannelExpression<VStringArray,String[]> vStringArray(String name)
A channel with the given name of type VStringArray.

Parameters:
name - the channel name; can't be null
Returns:
an expression representing the channel

vEnum

public static ChannelExpression<VEnum,Integer> vEnum(String name)
A channel with the given name of type VEnum.

Parameters:
name - the channel name; can't be null
Returns:
an expression representing the channel

vDoubles

public static ChannelExpressionList<VDouble,Double> vDoubles(List<String> names)
A list of channels with the given names, all of type VDouble.

Parameters:
names - the channel names; can't be null
Returns:
a list of expressions representing the channels

vDoubleConstants

public static DesiredRateExpressionList<VDouble> vDoubleConstants(List<Double> values)
A list of constant expressions of type VDouble.


vIntConstants

public static DesiredRateExpressionList<VInt> vIntConstants(List<Integer> values)
A list of constant expressions of type VDouble.


vStringConstants

public static DesiredRateExpressionList<VString> vStringConstants(List<String> values)
A list of constant expressions of type VString.


averageOf

public static DesiredRateExpression<VDouble> averageOf(SourceRateExpression<VDouble> doublePv)
Aggregates the sample at the scan rate and takes the average.

Parameters:
doublePv - the expression to take the average of; can't be null
Returns:
an expression representing the average of the expression

statisticsOf

public static DesiredRateExpression<VStatistics> statisticsOf(SourceRateExpression<VDouble> doublePv)
Aggregates the sample at the scan rate and calculates statistical information.

Parameters:
doublePv - the expression to calculate the statistics information on; can't be null
Returns:
an expression representing the statistical information of the expression

statisticsOf

public static DesiredRateExpressionList<VStatistics> statisticsOf(SourceRateExpressionList<VDouble> doubleExpressions)
Applies #statisticsOf(org.epics.pvmanager.SourceRateExpression) to all arguments.

Parameters:
doubleExpressions - a list of double expressions
Returns:
a list of statistical expressions

synchronizedArrayOf

public static DesiredRateExpression<VMultiDouble> synchronizedArrayOf(TimeDuration tolerance,
                                                                      SourceRateExpressionList<VDouble> expressions)
A synchronized array from the given expression.

Parameters:
tolerance - maximum time difference between samples
expressions - the expressions from which to reconstruct the array
Returns:
an expression for the array

synchronizedArrayOf

public static DesiredRateExpression<VMultiDouble> synchronizedArrayOf(TimeDuration tolerance,
                                                                      TimeDuration cacheDepth,
                                                                      SourceRateExpressionList<VDouble> expressions)
A synchronized array from the given expression.

Parameters:
tolerance - maximum time difference between samples in the reconstructed array
cacheDepth - maximum time difference between samples in the caches used to reconstruct the array
expressions - the expressions from which to reconstruct the array
Returns:
an expression for the array

column

public static VTableColumn column(String name,
                                  DesiredRateExpressionList<?> values)
A column for an aggregated vTable.

Parameters:
name - the name of the column
values - the value of the column
Returns:
the column

vTable

public static DesiredRateExpression<VTable> vTable(VTableColumn... columns)
Creates a vTable by aggregating different values from different pvs.

Parameters:
columns - columns of the table
Returns:
an expression for the table


Copyright © 2011. All Rights Reserved.