|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object fr.emn.reactiveinput.AbstractDevice fr.emn.reactiveinput.AbstractMutableDevice fr.emn.reactiveinput.devices.DThreshold
Field Summary | |
In |
in
|
Out |
inside
|
Out |
out
|
Out |
outside
|
Fields inherited from class fr.emn.reactiveinput.AbstractDevice |
currIndex, ins, outs |
Fields inherited from interface fr.emn.reactiveinput.Device |
AUTO_PROPERTIES |
Constructor Summary | |
DThreshold()
|
Method Summary | |
boolean |
getEnableMax()
|
boolean |
getEnableMin()
|
double |
getMax()
|
double |
getMin()
|
Slot[] |
getMutationTriggers()
Returns the mutation triggers for this mutable device, i.e. all input or output slots that trigger a mutation when it is connected to another type. |
java.lang.String[] |
getProperties()
Declares the device's properties, or returns AUTO_PROPERTIES if properties can be automatically deduced from accessor methods (in this case the order of properties as they appear in dialog box is not predictable). |
void |
mutate()
Perform a mutation on this device. |
Processor |
open(OpenContext context)
Ensures that the device will be ready for processing or producing data, and returns the Processor object that will process data, or null if an error occured. |
void |
setEnableMax(boolean v)
|
void |
setEnableMin(boolean v)
|
void |
setMax(double value)
|
void |
setMin(double value)
|
Methods inherited from class fr.emn.reactiveinput.AbstractMutableDevice |
addMutableIn, addMutableIn, addMutableIn, addMutableOut, addMutableOut, remove |
Methods inherited from class fr.emn.reactiveinput.AbstractDevice |
addIn, addIn, addOut, close, copy, doDisable, doEnable, finalize, getError, getIndex, getInfo, getIns, getName, getOuts, hasExternalInput, hasExternalOutput, init, insertAt, insertAtEnd, insertBefore, isCopiable, isEnabled, isOpenable, setEnabled, setInfo, setInfo, setLastError, setName, update |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface fr.emn.reactiveinput.Device |
close, copy, getError, getInfo, getIns, getName, getOuts, hasExternalInput, hasExternalOutput, isCopiable, isOpenable, setEnabled |
Field Detail |
public final In in
public final Out out
public final Out inside
public final Out outside
Constructor Detail |
public DThreshold()
Method Detail |
public Slot[] getMutationTriggers()
AbstractMutableDevice
getMutationTriggers
in interface MutableDevice
getMutationTriggers
in class AbstractMutableDevice
public void mutate()
AbstractMutableDevice
Add mutation code here.
mutate
in interface MutableDevice
mutate
in class AbstractMutableDevice
public Processor open(OpenContext context)
Device
Some devices may need to perform some more or less heavy initialization (such as allocating resources or opening a stream) before being able to process or produce data. This is the case for most input devices, and some I/O and output devices. All these initializations must be done in the open() method.
Because these initializations are subject to fail, open() may return null even if isOpenable() returns true. In all cases, returning a non-null Processor means that the device is now able to process or produce data.
RE-OPENING A DEVICE:
Devices always stay open during reconfiguration, in order to avoid unnecessary deallocation and reallocation of resources. However, some devices will need to be re-open before re-starting the configuration. So open() is always called on all devices before re-starting.
If open() is called on a device that is already open, it may have no effect (and the current Processor is returned), or the device may be re-open if something has changed in its configuration.
Using a Processor as a return value allows the use of different processors, each adapted to a specific device configuration.
open
in interface Device
open
in class AbstractDevice
Processor
,
Device.open()
public boolean getEnableMax()
public void setEnableMax(boolean v)
public double getMax()
public void setMax(double value)
public boolean getEnableMin()
public void setEnableMin(boolean v)
public double getMin()
public void setMin(double value)
public java.lang.String[] getProperties()
Device
All declared properties must be accessible through setXXX and getXXX accessor methods.
Example: If your device has the "Value" property of integer type, you must implement the "int getValue()" and "void setValue(int)" methods. Note: Property names are case-sensitive.
Currently supported types are:
getProperties
in interface Device
getProperties
in class AbstractDevice
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |