|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectfr.emn.reactiveinput.Slot
fr.emn.reactiveinput.In
Input slot.
** Input slot states: **
During design, the following assertions are true:
isValid(t) -> isConnected(t)
During execution (inside init() and update() methods), the following assertions are true:
isObligatory(t) -> hasValue(t) -> isValid(t)
hasSignal(t) -> hasValue(t) -> isValid(t)
isObligatory(t) <-> isObligatory(t+1)
isValid(t) <-> isValid(t+1)
hasValue(t) -> hasValue(t+1)
| Field Summary |
| Fields inherited from class fr.emn.reactiveinput.Slot |
description, dynamic, help, mutable, name, owner, supertype, type |
| Constructor Summary | |
In(Device owner,
java.lang.String name,
int type,
boolean obligatory)
USE: Design. |
|
In(MutableDevice owner,
java.lang.String name,
int supertype,
boolean obligatory,
boolean mutable)
USE: Design. |
|
In(MutableDevice owner,
java.lang.String name,
int supertype,
boolean obligatory,
boolean mutable,
boolean dynamic)
USE: Design. |
|
| Method Summary | |
boolean |
getBooleanValue()
USE: Execution. |
Out |
getConnected()
REMOVE. |
int |
getConnectedType()
USE: Design. |
double |
getDoubleValue()
USE: Execution. |
int |
getIntValue()
USE: Execution. |
java.lang.Object |
getObjectValue()
USE: Execution. |
java.lang.String |
getStringValue()
USE: Execution. |
boolean |
hasSignal()
USE: Execution. |
boolean |
hasValue()
USE: Execution. |
boolean |
isConnected()
USE: Design. |
boolean |
isObligatory()
USE: Design / Execution. |
boolean |
isValid()
USE: Design / Execution. |
| Methods inherited from class fr.emn.reactiveinput.Slot |
flatten, flatten, flatten, getDescription, getHelp, getName, getParent, getProperties, getSupertype, getType, isDynamic, isMutable, remove, rename, setDescription, setHelp, setInfo, setProperties, setType, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public In(Device owner,
java.lang.String name,
int type,
boolean obligatory)
public In(MutableDevice owner,
java.lang.String name,
int supertype,
boolean obligatory,
boolean mutable)
public In(MutableDevice owner,
java.lang.String name,
int supertype,
boolean obligatory,
boolean mutable,
boolean dynamic)
| Method Detail |
public boolean getBooleanValue()
public Out getConnected()
public int getConnectedType()
This gives the type of connected slot. This is used in Mutable Devices to adapt themselves to connected devices.
This method returns the type of the connected Output Slot, or Slot.NULL if it's not connected.
Throws NonMutableException if this slot is not mutable.
getConnectedType in class Slotpublic double getDoubleValue()
public int getIntValue()
public java.lang.Object getObjectValue()
public java.lang.String getStringValue()
public boolean hasSignal()
Returns false if this slot has not received a signal during the current tick or if it is not valid.
public boolean hasValue()
Returns false if this slot has no value yet or is not valid (which also means that it will never receive a value).
public boolean isConnected()
Used in mutable devices. To test a slot validity, use isValid() instead.
public boolean isObligatory()
public boolean isValid()
An input slot is valid if it is properly connected to a compatible output slot (compatibility = COMPATIBLE_ALWAYS or COMPATIBLE_FOR_NOW), and if this output slot is valid itself.
!! Don't retrieve values from an input slot before checking isValid(), hasValue() or hasSignal(). This never happens with obligatory input slots, but may happen with optional input slots.
isValid in class Slot
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||