SELENIO™ SEL‐1DEC1/SEL‐1DEC2
Installation and Operation Manual
GPI
© 2014 Imagine Communications Corp. Proprietary and Confidential.
Version 7.0 | Page 40
Custom GPI
The Custom Output Scripts field makes it possible to use more flexible scripts to configure GPIs. To
enable a custom GPI script, set the GPI Out Set parameter to Custom GPI Script for the selected GPI
output. Then enter your script into the Custom Output Script field. The parameter allows a maximum of
251 characters to be entered. Custom Output Status reports the parsing and active status of the script.
If a syntax error is detected when a new script is entered, this parameter will report Error: x message,
where
x
is an index number starting from the beginning of the script to indicate around which character
the script parser first encountered a syntax error.
Note: When the Custom GPI Output script involves multiple parameters, all of these values must be
changed at the same time to ensure the script behaves as intended.
Writing Custom GPI Scripts
GPI scripts are made up of one or more statements. Each statement consists of one condition and one
or more assignments. During device operation, if the condition in a statement becomes true, the
assignment(s) in the statement will take effect.
<script> ::= <statement> { <statement> }
<statement> ::= IF <condition> THEN <assignment> { <assignment> }
<condition> ::= <comparison> { <logic op> <comparison> }
<comparison> ::= PARAM[x] <comparison op> y
Where x is the CCSP ID of a device parameter, y is a value for that parameter. At this time, only
integer and enum type of parameter assignments are supported. String type parameter assignment
is not supported.
<assignment> ::= GPOx = y
Where x is in the range of [1, number of GPO outputs], y could be 0 or 1
<comparison op> ::= == | > | < | >= | <= | !=
<logic op> ::= && | ||
Comparisons can be ANDed together using &&, and then can be ORed together using ||. The AND
operation always has precedence over the OR operation when AND and OR both exist in a
condition.
The following GPI output script condition
PARAM[400]==5 || PARAM[400]==3 || PARAM[400] >= 8 && PARAM[400] <= 12
should be interpreted as
PARAM[400]==5 || PARAM[400]==3 || (PARAM[400] >= 8 && PARAM[400] <= 12)
GPI Output Example
IF PARAM[754]==2 THEN GPO1=0 GPO2=1