|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectfr.emn.reactiveinput.AbstractDevice
fr.emn.reactiveinput.devices.DSwCommand
| Nested Class Summary | |
static class |
DSwCommand.CmdEnum
|
| Field Summary | |
In |
arg1
|
In |
arg2
|
In |
cmd
|
Out |
errorMsg
|
In |
perform
|
static java.lang.String[] |
SUPPORTED_COMMANDS
|
Out |
thru_arg1
|
Out |
thru_arg2
|
Out |
thru_cmd
|
Out |
valid
|
| Fields inherited from class fr.emn.reactiveinput.AbstractDevice |
currIndex, ins, outs |
| Fields inherited from interface fr.emn.reactiveinput.Device |
AUTO_PROPERTIES |
| Constructor Summary | |
DSwCommand()
|
|
| Method Summary | |
static java.lang.String |
getCommandError(java.lang.String cmd,
java.lang.Object arg1,
java.lang.Object arg2)
Returns an error msg or null if command is valid. |
DSwCommand.CmdEnum |
getDefaultCommand()
|
boolean |
hasExternalInput()
Specifies whether this device has external (implicit) input or not. |
boolean |
hasExternalOutput()
Specifies whether this device has external (implicit) output or not. |
void |
init()
Initializes device's output values. |
void |
performCommand(java.lang.String cmd,
java.lang.Object arg1,
java.lang.Object arg2)
|
void |
setDefaultCommand(DSwCommand.CmdEnum defaultCommand)
|
void |
update()
Updates device's output values. |
| Methods inherited from class fr.emn.reactiveinput.AbstractDevice |
addIn, addIn, addOut, close, copy, doDisable, doEnable, finalize, getError, getIndex, getInfo, getIns, getName, getOuts, getProperties, insertAt, insertAtEnd, insertBefore, isCopiable, isEnabled, isOpenable, open, setEnabled, setInfo, setInfo, setLastError, setName |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String[] SUPPORTED_COMMANDS
public final In perform
public final In cmd
public final In arg1
public final In arg2
public final Out valid
public final Out errorMsg
public final Out thru_cmd
public final Out thru_arg1
public final Out thru_arg2
| Constructor Detail |
public DSwCommand()
| Method Detail |
public static java.lang.String getCommandError(java.lang.String cmd,
java.lang.Object arg1,
java.lang.Object arg2)
public void performCommand(java.lang.String cmd,
java.lang.Object arg1,
java.lang.Object arg2)
public void init()
AbstractDeviceSubclass init() and update() methods if you want the device to process the data itself. Otherwise, subclass getProcessor() method to use extern processors. By default, this method calls update(). Subclass this method if you'd like to make a specific initialization routine.
init in interface Processorinit in class AbstractDeviceProcessor.init()public void update()
AbstractDeviceSubclass init() and update() methods if you want the device to process the data itself. Otherwise, subclass getProcessor() method to use extern processors.
update in interface Processorupdate in class AbstractDeviceProcessor.update()public DSwCommand.CmdEnum getDefaultCommand()
public void setDefaultCommand(DSwCommand.CmdEnum defaultCommand)
defaultCommand - The defaultCommand to set.public boolean hasExternalInput()
AbstractDeviceReturn false if the device is deterministic from the data & time points of view, i.e. if its output production only depend on the explicit input history (input slots) and device's initial configuration. This is the case of most of the processing devices.
Return true if output values not only depend on the values of input slots, or if output production takes undefined time. Examples of devices with external input are input peripherals and asynchronous devices.
This method is used by the reactive machine to determine if this device is triggered by its input slots, or if it must be triggered continuously (i.e. each tick). This method can also be used by the editor for the device's graphical representation.
hasExternalInput in interface DevicehasExternalInput in class AbstractDevicepublic boolean hasExternalOutput()
AbstractDeviceReturn false if the device has no border effects. Most of input and processing devices are in this case.
Return true if the device has border effects, such as graphical feedback, or control of some external value. Examples of devices with external output are application-interfacing devices and all user feedback devices.
This method can be used by the editor for the device's graphical representation. However there is at now no clear definition of what is external output.
hasExternalOutput in interface DevicehasExternalOutput in class AbstractDevice
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||