fr.emn.reactiveinput.devices
Class DDirectMouse

java.lang.Object
  extended byfr.emn.reactiveinput.AbstractDevice
      extended byfr.emn.reactiveinput.devices.DDirectMouse
All Implemented Interfaces:
Device, Processor

public class DDirectMouse
extends AbstractDevice


Field Summary
 Out but1
           
 Out but2
           
 Out but3
           
 Out dx
           
 Out dy
           
 Out wheel
           
 
Fields inherited from class fr.emn.reactiveinput.AbstractDevice
currIndex, ins, outs
 
Fields inherited from interface fr.emn.reactiveinput.Device
AUTO_PROPERTIES
 
Constructor Summary
DDirectMouse()
           
 
Method Summary
 void close()
          Add closing code here if needed.
 void doDisable()
          Add device disabling code here (does nothing by default).
 DeviceInfo getDeviceInfo()
           
 boolean getDisableSystem()
           
 boolean hasExternalInput()
          Specifies whether this device has external (implicit) input or not.
 void init()
          Initializes device's output values.
 Processor open(OpenContext context)
          Check DirectMouse also.
 void setDisableSystem(boolean newDisableSystem)
           
 void update()
          Updates device's output values.
 
Methods inherited from class fr.emn.reactiveinput.AbstractDevice
addIn, addIn, addOut, copy, doEnable, finalize, getError, getIndex, getInfo, getIns, getName, getOuts, getProperties, hasExternalOutput, insertAt, insertAtEnd, insertBefore, isCopiable, isEnabled, isOpenable, setEnabled, setInfo, setInfo, setLastError, setName
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dx

public final Out dx

dy

public final Out dy

but1

public final Out but1

but2

public final Out but2

but3

public final Out but3

wheel

public final Out wheel
Constructor Detail

DDirectMouse

public DDirectMouse()
Method Detail

getDeviceInfo

public DeviceInfo getDeviceInfo()

getDisableSystem

public boolean getDisableSystem()
Returns:
boolean

hasExternalInput

public boolean hasExternalInput()
Description copied from class: AbstractDevice
Specifies whether this device has external (implicit) input or not. Returns false by default.

Return 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.

Specified by:
hasExternalInput in interface Device
Overrides:
hasExternalInput in class AbstractDevice

open

public Processor open(OpenContext context)
Check DirectMouse also.

Specified by:
open in interface Device
Overrides:
open in class AbstractDevice
See Also:
Processor, Device.open()

doDisable

public void doDisable()
Description copied from class: AbstractDevice
Add device disabling code here (does nothing by default).

Overrides:
doDisable in class AbstractDevice

close

public void close()
Description copied from class: AbstractDevice
Add closing code here if needed.

Specified by:
close in interface Device
Overrides:
close in class AbstractDevice

setDisableSystem

public void setDisableSystem(boolean newDisableSystem)
Parameters:
newDisableSystem - boolean

init

public void init()
Description copied from class: AbstractDevice
Initializes device's output values.

Subclass 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.

Specified by:
init in interface Processor
Overrides:
init in class AbstractDevice
See Also:
Processor.init()

update

public void update()
Description copied from class: AbstractDevice
Updates device's output values.

Subclass init() and update() methods if you want the device to process the data itself. Otherwise, subclass getProcessor() method to use extern processors.

Specified by:
update in interface Processor
Overrides:
update in class AbstractDevice
See Also:
Processor.update()