Class ScriptTransform
- java.lang.Object
-
- com.inductiveautomation.perspective.gateway.binding.transforms.AbstractSynchronousTransform
-
- com.inductiveautomation.perspective.gateway.binding.transforms.script.ScriptTransform
-
- All Implemented Interfaces:
Transform
public class ScriptTransform extends AbstractSynchronousTransform
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
TYPE_ID
-
Constructor Summary
Constructors Constructor Description ScriptTransform(BindingContext context, com.inductiveautomation.ignition.common.gson.JsonObject config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.python.core.PyCode
compileInternal(BindingContext context, java.lang.String filename, java.lang.String code)
protected org.python.core.PyStringMap
createLocalsMap(BindingContext context)
protected void
runCode(org.python.core.PyCode compiledJyCode, org.python.core.PyStringMap localsMap)
protected org.python.core.PyObject
runFunction(BindingContext context, org.python.core.PyObject transformFunc, org.python.core.PyObject pySelf, org.python.core.PyObject pyValue, org.python.core.PyObject pyQuality, org.python.core.PyObject pyTimestamp)
protected QualifiedValue
synchronousTransformInternal(QualifiedValue value)
Perform a blocking transformation on aQualifiedValue
, returning the transformed value as a QualifiedValue.-
Methods inherited from class com.inductiveautomation.perspective.gateway.binding.transforms.AbstractSynchronousTransform
transform
-
-
-
-
Field Detail
-
TYPE_ID
public static final java.lang.String TYPE_ID
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ScriptTransform
public ScriptTransform(BindingContext context, com.inductiveautomation.ignition.common.gson.JsonObject config) throws ConfigurationException
- Throws:
ConfigurationException
-
-
Method Detail
-
compileInternal
protected org.python.core.PyCode compileInternal(BindingContext context, java.lang.String filename, java.lang.String code) throws org.python.core.PyException
- Throws:
org.python.core.PyException
-
createLocalsMap
protected org.python.core.PyStringMap createLocalsMap(BindingContext context)
-
runCode
protected void runCode(org.python.core.PyCode compiledJyCode, org.python.core.PyStringMap localsMap) throws JythonExecException
- Throws:
JythonExecException
-
runFunction
protected org.python.core.PyObject runFunction(BindingContext context, org.python.core.PyObject transformFunc, org.python.core.PyObject pySelf, org.python.core.PyObject pyValue, org.python.core.PyObject pyQuality, org.python.core.PyObject pyTimestamp) throws JythonExecException
- Throws:
JythonExecException
-
synchronousTransformInternal
protected QualifiedValue synchronousTransformInternal(@Nonnull QualifiedValue value)
Description copied from class:AbstractSynchronousTransform
Perform a blocking transformation on aQualifiedValue
, returning the transformed value as a QualifiedValue.- Specified by:
synchronousTransformInternal
in classAbstractSynchronousTransform
- Parameters:
value
- The input value to transform. The value will never be null.- Returns:
- The transformed value.
-
-