|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.cau.cs.kieler.sj.Signal
de.cau.cs.kieler.sj.ValuedSignal
public class ValuedSignal
SJ realization of a valued signal.
Field Summary |
---|
Fields inherited from class de.cau.cs.kieler.sj.Signal |
---|
ABSENT, hasStateChecked, index, lastSignalAssignments, present, PRESENT, program |
Constructor Summary | |
---|---|
ValuedSignal(String name)
Creates a new valued signal with the given name. |
|
ValuedSignal(String name,
CombinationFunction combinationFuction)
Creates a new valued signal with the given name an combination function for more than one value. |
|
ValuedSignal(String name,
CombinationFunction combinationFunction,
int historyLength)
Creates a new valued signal. |
|
ValuedSignal(String name,
int historyLength)
Creates a new valued signal. |
Method Summary | |
---|---|
void |
emit(Number val)
Emits a signal with a given value. |
Number |
getValue()
Returns the value of the valued signal. |
ValuedSignal |
pre()
Returns the previous instance of a signal. |
void |
setStartValue(Number startVal)
Sets the default value for the signal at the beginning of every new tick. |
void |
sustainCB(Number val)
Sustain a signal using the given value. |
String |
toJSONString()
The JSON representation of the ValuedSignal object. |
String |
toString()
Return a sting representation of the this valued signal. |
Methods inherited from class de.cau.cs.kieler.sj.Signal |
---|
emit, getName, isPresent, sustainCB |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ValuedSignal(String name)
name
- The name for the valued signal.public ValuedSignal(String name, CombinationFunction combinationFuction)
name
- The name for the valued signal.combinationFuction
- The combination function for the valued signal.public ValuedSignal(String name, int historyLength)
name
- The name for the valued signal.historyLength
- The history length of the valued signal.public ValuedSignal(String name, CombinationFunction combinationFunction, int historyLength)
name
- The name for the signal.combinationFunction
- The combination function for the signal.historyLength
- The length of the signal history to log.Method Detail |
---|
public ValuedSignal pre()
Signal
s.pre().pre()
is possible.
pre
in class Signal
Signal.Signal(String, int)
public void emit(Number val)
val
- The given value.Signal.emit()
public void sustainCB(Number val)
val
- The value.public Number getValue()
public String toJSONString()
null
if he has
not been set for the signal.
toJSONString
in class Signal
public String toString()
toString
in class Signal
public void setStartValue(Number startVal)
startVal
- The start value.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |