Class TagFunction
java.lang.Object
com.inductiveautomation.ignition.common.expressions.functions.BaseFunction
com.inductiveautomation.ignition.common.expressions.functions.AbstractFunction
com.inductiveautomation.ignition.common.expressions.functions.TagFunction
- All Implemented Interfaces:
Function
,TagChangeListener
,EventListener
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionTagFunction
(boolean useReads) Create a tag function that can use reads instead of subscribing. -
Method Summary
Modifier and TypeMethodDescriptionvoid
connect
(CommonContext context, InteractionListener updateListener) Empty implementation from BaseFunction.copy()
Returns this.void
Empty implementation from BaseFunction.execute
(Expression[] args) Execute this function, and return the function's qualified value.protected void
protected void
Returns a string to be used in the auto-generated function documentation.protected String
Class<?>
getType()
Returns the type that this function will return upon executiongetValue()
void
void
void
shutdown()
Empty implementation from BaseFunction.void
startup()
Empty implementation from BaseFunction.void
Invoked when the tag has changedprotected void
updatePath
(TagPath path) protected void
updateValueSynched
(QualifiedValue value) protected boolean
validateNumArgs
(int num) Methods inherited from class com.inductiveautomation.ignition.common.expressions.functions.AbstractFunction
executeArg, initArgs, log
Methods inherited from class com.inductiveautomation.ignition.common.expressions.functions.BaseFunction
executeAll
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.inductiveautomation.ignition.common.tags.model.event.TagChangeListener
isLightweight
-
Constructor Details
-
TagFunction
public TagFunction() -
TagFunction
public TagFunction(boolean useReads) Create a tag function that can use reads instead of subscribing. If false, it will use Subscribed_ReadInitial, due to changes that were made in the 8.0 line, which introduced that semantic. If that is not desired, the more specific constructor that tags EvaluationMode should be used. -
TagFunction
-
-
Method Details
-
executeRead
- Throws:
ExpressionException
-
updatePath
- Throws:
Exception
-
execute
Description copied from interface:Function
Execute this function, and return the function's qualified value.- Specified by:
execute
in interfaceFunction
- Throws:
ExpressionException
-
validateNumArgs
protected boolean validateNumArgs(int num) - Overrides:
validateNumArgs
in classAbstractFunction
-
copy
Description copied from class:BaseFunction
Returns this. Override to create a clone if you need a unique function object per Expression.- Specified by:
copy
in interfaceFunction
- Overrides:
copy
in classBaseFunction
-
connect
Description copied from class:BaseFunction
Empty implementation from BaseFunction. Override if necessary.- Specified by:
connect
in interfaceFunction
- Overrides:
connect
in classBaseFunction
-
disconnect
public void disconnect()Description copied from class:BaseFunction
Empty implementation from BaseFunction. Override if necessary.- Specified by:
disconnect
in interfaceFunction
- Overrides:
disconnect
in classBaseFunction
-
shutdown
public void shutdown()Description copied from class:BaseFunction
Empty implementation from BaseFunction. Override if necessary.- Specified by:
shutdown
in interfaceFunction
- Overrides:
shutdown
in classBaseFunction
-
startup
public void startup()Description copied from class:BaseFunction
Empty implementation from BaseFunction. Override if necessary.- Specified by:
startup
in interfaceFunction
- Overrides:
startup
in classBaseFunction
-
getArgDocString
Description copied from interface:Function
Returns 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.- Specified by:
getArgDocString
in interfaceFunction
-
getType
Description copied from interface:Function
Returns the type that this function will return upon execution -
setType
-
getSecurityContext
- Specified by:
getSecurityContext
in interfaceTagChangeListener
- Returns:
- the
SecurityContext
associated with thisTagChangeListener
-
tagChanged
Description copied from interface:TagChangeListener
Invoked when the tag has changed- Specified by:
tagChanged
in interfaceTagChangeListener
- Parameters:
e
- a ChangeEvent object
-
updateValueSynched
-
fireInteractionListener
protected void fireInteractionListener() -
getValue
-
setValue
-
getFunctionDisplayName
- Specified by:
getFunctionDisplayName
in classAbstractFunction
-