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 TypeMethodDescriptionvoid
clear()
frees up allocated resourcescreate a clone of the built-invoid
evaluation is finishedString[]
get a description of the argumentsint
getArity()
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-inlong
get the weight of the built-invoid
initialize the built-inboolean
isEvaluable
(BitSet grounds, BitSet variableInstantiations, Object[] args) is builtin evaluable with the given ground instantiation of variablesboolean
is it an internal built-inobjectGeneratingArguments
(BitSet grounds, BitSet variableInstantiations, Object[] args) at which argument positions new objects are generatedboolean
does the built-in read the symbol tablevoid
setProperties
(Properties prp) set the sytem propertiesvoid
setSymbolTable
(SymbolTable symbolTable) set the symbol tableboolean
does 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:Builtin
frees up allocated resources -
setProperties
Description copied from interface:Builtin
set the sytem properties- Parameters:
prp
- , properties
-
isEvaluable
public boolean isEvaluable(BitSet grounds, BitSet variableInstantiations, Object[] args) throws BuiltinException Description copied from class:SensorBuiltin
is builtin evaluable with the given ground instantiation of variables- Specified by:
isEvaluable
in interfaceBuiltin
- Specified by:
isEvaluable
in classSensorBuiltin
- Parameters:
grounds
- , which arguments are groundvariableInstantiations
- , which variables are instantiatedargs
- , the arguments- Returns:
- was it evaluable
- Throws:
BuiltinException
-
init
Description copied from class:SensorBuiltin
initialize the built-in- Specified by:
init
in interfaceBuiltin
- Specified by:
init
in classSensorBuiltin
- Parameters:
args
- , the builtin arguments- Throws:
InterruptedException
SemReasonerException
-
cloneBuiltin
Description copied from class:SensorBuiltin
create a clone of the built-in- Specified by:
cloneBuiltin
in interfaceBuiltin
- Specified by:
cloneBuiltin
in classSensorBuiltin
- Returns:
- the cloned built-in
-
setSymbolTable
Description copied from class:SensorBuiltin
set the symbol table- Specified by:
setSymbolTable
in interfaceBuiltin
- Overrides:
setSymbolTable
in classSensorBuiltin
- Parameters:
symbolTable
- , the symbol table
-
getWeight
Description copied from class:SensorBuiltin
get the weight of the built-in- Specified by:
getWeight
in interfaceBuiltin
- Specified by:
getWeight
in 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:SensorBuiltin
at which argument positions new objects are generated- Specified by:
objectGeneratingArguments
in interfaceBuiltin
- Specified by:
objectGeneratingArguments
in 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:SensorBuiltin
get the name of the built-in- Specified by:
getName
in interfaceBuiltin
- Specified by:
getName
in classSensorBuiltin
- Returns:
- the name of the built-in
-
getArity
public int getArity()Description copied from class:SensorBuiltin
get the arity of the built-in- Specified by:
getArity
in interfaceBuiltin
- Specified by:
getArity
in classSensorBuiltin
- Returns:
- the arity of the built-in
-
getType
Description copied from class:SensorBuiltin
get the type of the built-in- Specified by:
getType
in interfaceBuiltin
- Specified by:
getType
in classSensorBuiltin
- Returns:
- the type of the built-in
-
isInternal
public boolean isInternal()Description copied from class:SensorBuiltin
is it an internal built-in- Specified by:
isInternal
in interfaceBuiltin
- Specified by:
isInternal
in classSensorBuiltin
- Returns:
-
getArgumentDescriptions
Description copied from class:SensorBuiltin
get a description of the arguments- Specified by:
getArgumentDescriptions
in interfaceBuiltin
- Specified by:
getArgumentDescriptions
in classSensorBuiltin
- Returns:
- a description of the arguments of the built-in
-
getDescription
Description copied from class:SensorBuiltin
get a description of the built-in itself- Specified by:
getDescription
in interfaceBuiltin
- Specified by:
getDescription
in classSensorBuiltin
- Returns:
- a description of the built-in
-
readsSymbolTable
public boolean readsSymbolTable()Description copied from class:SensorBuiltin
does the built-in read the symbol table- Specified by:
readsSymbolTable
in interfaceBuiltin
- Specified by:
readsSymbolTable
in classSensorBuiltin
- Returns:
- true if it reads the symbol table
-
writesSymbolTable
public boolean writesSymbolTable()Description copied from class:SensorBuiltin
does the built-in write the symbol table- Specified by:
writesSymbolTable
in interfaceBuiltin
- Specified by:
writesSymbolTable
in classSensorBuiltin
- Returns:
- true if it writes to the symbol table
-
evaluationFinished
evaluation is finished- Specified by:
evaluationFinished
in interfaceBuiltin
- Overrides:
evaluationFinished
in classSensorBuiltin
- Throws:
BuiltinException
InterruptedException
-