mypv123 : the pv called "mypv123" mypv+123 : the pv called "mypv" added to 123 'mypv+123' : a pv called "mypv2+123" "mypv+123" : the string "mypv+123"The parser will always give precedence to an expression than to pvs. If a pv looks like an expression, it should be escaped by single quotes.
loc://log(1) : the pv from loc datasource called "log(1)" log(1) : the function log applied to the number 1 log : the pv called logAn identifier followed by parenthesis will be interpreted as a function, and if not followed by parenthesis is interpreted as unquoted pv. If the pv includes the datasource, then the following parenthesis are considered part of the pv name.
| Syntax | Description |
|---|---|
Numeric constant423.141e5 |
A number can either be an integer, or a floating point in either decimal or exponential notation. |
"String constant" |
String constants are opened and closed by double quotes. TODO escape characteres. |
'an+escaped/pv'simpleUnescapedPvloc://complexPvWithSource("Hello!") |
A string surrounded by single quotes represents a pv. If the pvname does not clash with another expression, you can omit the quotes (i.e. it must be made only of the following characters 0-9a-zA-Z.$_:{} and must contain
one letter).If the syntax contain the source, these restriction are somewhat lifted: you can have a pair of parenthesis and a comma separated list of parameters. This combination should allow to keep most reasonably named pvs without single quotes, while allowing all the rest in single quotes. |
Algebraic operatorsexpr + expr: additionexpr - expr: subtraction- expr: negationexpr * expr: multiplicationexpr / expr: divisionexpr % expr: moduloexpr ^ expr: powerexpr ** expr: power |
Standard algebraic operator between expressions are supported. |
Numeric functionsabs(expr): absolute valueacos(expr): arc cosineasin(expr): arc sineatan(expr): arc tangentcbrt(expr): cubic rootceil(expr): round upcos(expr): cosinecosh(expr): hyperbolic cosineexp(expr): exponentialfloor(expr): round downlog(expr): natural logarithmlog10(expr): base 10 logarithmsignum(expr): sign functionsin(expr): sinesinh(expr): hyperbolic sinesqrt(expr): square root |
Some common numeric functions are also supported. For implementation details refer to the corresponding java.lang.Math method. |