Class Ticks
java.lang.Object
com.semedy.reasoner.api.builtin.SensorBuiltin
com.semedy.reasoner.builtin.sensor.Ticks
- All Implemented Interfaces:
Builtin
Creates ticks in time
Used for stream-based reasoning to trigger an event.
Used for stream-based reasoning to trigger an event.
- Author:
- angele
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()frees up allocated resourcescreate a clone of the built-invoidevaluation is finishedString[]get a description of the argumentsintgetArity()get the arity of the built-inget a description of the built-in itselfgetName()get the name of the built-ingetType()get the type of the built-inlongget the weight of the built-invoidinitialize the built-inbooleanisEvaluable(BitSet grounds, BitSet variableInstantiations, Object[] args) is builtin evaluable with the given ground instantiation of variablesbooleanis it an internal built-inobjectGeneratingArguments(BitSet grounds, BitSet variableInstantiations, Object[] args) at which argument positions new objects are generatedbooleandoes the built-in read the symbol tablevoidsetProperties(Properties prp) set the sytem propertiesvoidsetSymbolTable(SymbolTable symbolTable) set the symbol tablebooleandoes the built-in write the symbol tableMethods inherited from class com.semedy.reasoner.api.builtin.SensorBuiltin
addReceiver, receiveEncodedEvent, receiveEvent, retractEncodedEvent, retractEvent, retractEvents, setSemaphore
-
Constructor Details
-
Ticks
public Ticks()
-
-
Method Details
-
clear
public void clear()Description copied from interface:Builtinfrees up allocated resources -
setProperties
Description copied from interface:Builtinset the sytem properties- Parameters:
prp- , properties
-
isEvaluable
public boolean isEvaluable(BitSet grounds, BitSet variableInstantiations, Object[] args) throws BuiltinException Description copied from class:SensorBuiltinis builtin evaluable with the given ground instantiation of variables- Specified by:
isEvaluablein interfaceBuiltin- Specified by:
isEvaluablein classSensorBuiltin- Parameters:
grounds- , which arguments are groundvariableInstantiations- , which variables are instantiatedargs- , the arguments- Returns:
- was it evaluable
- Throws:
BuiltinException
-
init
Description copied from class:SensorBuiltininitialize the built-in- Specified by:
initin interfaceBuiltin- Specified by:
initin classSensorBuiltin- Parameters:
args- , the builtin arguments- Throws:
InterruptedExceptionSemReasonerException
-
cloneBuiltin
Description copied from class:SensorBuiltincreate a clone of the built-in- Specified by:
cloneBuiltinin interfaceBuiltin- Specified by:
cloneBuiltinin classSensorBuiltin- Returns:
- the cloned built-in
-
setSymbolTable
Description copied from class:SensorBuiltinset the symbol table- Specified by:
setSymbolTablein interfaceBuiltin- Overrides:
setSymbolTablein classSensorBuiltin- Parameters:
symbolTable- , the symbol table
-
getWeight
Description copied from class:SensorBuiltinget the weight of the built-in- Specified by:
getWeightin interfaceBuiltin- Specified by:
getWeightin classSensorBuiltin- Parameters:
grounds- , ground argumentsvariableInstantiations- , instantiated variablesargs- , arguments of the builtin- Returns:
- the weight of the builtin (influences the position in the rule)
-
objectGeneratingArguments
public BitSet objectGeneratingArguments(BitSet grounds, BitSet variableInstantiations, Object[] args) throws BuiltinException Description copied from class:SensorBuiltinat which argument positions new objects are generated- Specified by:
objectGeneratingArgumentsin interfaceBuiltin- Specified by:
objectGeneratingArgumentsin classSensorBuiltin- Parameters:
grounds- , ground argument positionsvariableInstantiations- , instantiated variablesargs- , arguments of the literal- Returns:
- each bit indicates the argument position where new objects are created
- Throws:
BuiltinException
-
getName
Description copied from class:SensorBuiltinget the name of the built-in- Specified by:
getNamein interfaceBuiltin- Specified by:
getNamein classSensorBuiltin- Returns:
- the name of the built-in
-
getArity
public int getArity()Description copied from class:SensorBuiltinget the arity of the built-in- Specified by:
getArityin interfaceBuiltin- Specified by:
getArityin classSensorBuiltin- Returns:
- the arity of the built-in
-
getType
Description copied from class:SensorBuiltinget the type of the built-in- Specified by:
getTypein interfaceBuiltin- Specified by:
getTypein classSensorBuiltin- Returns:
- the type of the built-in
-
isInternal
public boolean isInternal()Description copied from class:SensorBuiltinis it an internal built-in- Specified by:
isInternalin interfaceBuiltin- Specified by:
isInternalin classSensorBuiltin- Returns:
-
getArgumentDescriptions
Description copied from class:SensorBuiltinget a description of the arguments- Specified by:
getArgumentDescriptionsin interfaceBuiltin- Specified by:
getArgumentDescriptionsin classSensorBuiltin- Returns:
- a description of the arguments of the built-in
-
getDescription
Description copied from class:SensorBuiltinget a description of the built-in itself- Specified by:
getDescriptionin interfaceBuiltin- Specified by:
getDescriptionin classSensorBuiltin- Returns:
- a description of the built-in
-
readsSymbolTable
public boolean readsSymbolTable()Description copied from class:SensorBuiltindoes the built-in read the symbol table- Specified by:
readsSymbolTablein interfaceBuiltin- Specified by:
readsSymbolTablein classSensorBuiltin- Returns:
- true if it reads the symbol table
-
writesSymbolTable
public boolean writesSymbolTable()Description copied from class:SensorBuiltindoes the built-in write the symbol table- Specified by:
writesSymbolTablein interfaceBuiltin- Specified by:
writesSymbolTablein classSensorBuiltin- Returns:
- true if it writes to the symbol table
-
evaluationFinished
evaluation is finished- Specified by:
evaluationFinishedin interfaceBuiltin- Overrides:
evaluationFinishedin classSensorBuiltin- Throws:
BuiltinExceptionInterruptedException
-