Class ScriptFunction
java.lang.Object
com.inductiveautomation.ignition.common.expressions.functions.BaseFunction
com.inductiveautomation.ignition.common.expressions.functions.AbstractFunction
com.inductiveautomation.ignition.common.expressions.functions.AbstractPollingFunction
com.inductiveautomation.ignition.common.expressions.functions.ScriptFunction
- All Implemented Interfaces:
Function, ActionListener, EventListener
- Direct Known Subclasses:
ComponentRunScriptExpression, PerspectiveRunScriptFunction
-
Field Summary
FieldsFields inherited from class AbstractPollingFunction
context, rate, started, task, TIMER, updateListener -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncopy()Returns this.execute(Expression[] args) Execute this function, and return the function's qualified value.Returns a string to be used in the auto-generated function documentation.protected Stringprotected voidinitLocalsMap(org.python.core.PyStringMap map) protected booleanvalidateNumArgs(int num) Methods inherited from class AbstractPollingFunction
actionPerformed, cancelTask, connect, disconnect, setPollRate, shutdown, startTask, startupMethods inherited from class AbstractFunction
executeArg, initArgs, logMethods inherited from class BaseFunction
executeAllMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Function
getDescription, getType
-
Field Details
-
NAME
- See Also:
-
-
Constructor Details
-
ScriptFunction
public ScriptFunction()
-
-
Method Details
-
getFunctionDisplayName
- Specified by:
getFunctionDisplayNamein classAbstractFunction
-
execute
Description copied from interface:FunctionExecute this function, and return the function's qualified value.- Parameters:
args- the arguments for the function- Returns:
- the result of the function evaluation as a
QualifiedValue - Throws:
ExpressionException- if an error occurs during execution
-
initLocalsMap
protected void initLocalsMap(org.python.core.PyStringMap map) -
copy
Description copied from class:BaseFunctionReturns this. Override to create a clone if you need a unique function object per Expression.- Specified by:
copyin interfaceFunction- Specified by:
copyin classAbstractPollingFunction- Returns:
- a copy of this function
-
validateNumArgs
protected boolean validateNumArgs(int num) - Overrides:
validateNumArgsin classAbstractFunction
-
getArgDocString
Description copied from interface:FunctionReturns a string to be used in the auto-generated function documentation. The string should represent the arguments for the function, such as "string, count" for the "repeat" function.- Returns:
- the argument documentation string
-