Class ScriptTransform
java.lang.Object
com.inductiveautomation.perspective.gateway.binding.transforms.AbstractSynchronousTransform
com.inductiveautomation.perspective.gateway.binding.transforms.script.ScriptTransform
- All Implemented Interfaces:
Transform
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionScriptTransform
(BindingContext context, com.inductiveautomation.ignition.common.gson.JsonObject config) -
Method Summary
Modifier and TypeMethodDescriptionprotected org.python.core.PyCode
compileInternal
(BindingContext context, String filename, 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
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
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.inductiveautomation.perspective.gateway.api.Transform
resolveReferences, shutdown, startup
-
Field Details
-
TYPE_ID
- See Also:
-
-
Constructor Details
-
ScriptTransform
public ScriptTransform(BindingContext context, com.inductiveautomation.ignition.common.gson.JsonObject config) throws ConfigurationException - Throws:
ConfigurationException
-
-
Method Details
-
compileInternal
protected org.python.core.PyCode compileInternal(BindingContext context, String filename, String code) throws org.python.core.PyException - Throws:
org.python.core.PyException
-
createLocalsMap
-
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
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.
-