fr.emn.reactiveinput.devices
Class DGaming

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

public class DGaming
extends AbstractDevice

A "gaming" device (Joystick, magellan, etc.)


Field Summary
 Out[] axes
           
 Out[] buttons
           
 
Fields inherited from class fr.emn.reactiveinput.AbstractDevice
currIndex, ins, outs
 
Fields inherited from interface fr.emn.reactiveinput.Device
AUTO_PROPERTIES
 
Constructor Summary
DGaming(java.lang.String name, com.centralnexus.input.Joystick j)
           
 
Method Summary
 Device copy()
          Is isCopiable() returns true, copies the device by calling DeviceUtilities.defaultCopy().
 double getDeadZone()
           
 boolean hasExternalInput()
          Specifies whether this device has external (implicit) input or not.
 void init()
          Initializes device's output values.
 void setDeadZone(double value)
           
 void update()
          Updates device's output values.
 
Methods inherited from class fr.emn.reactiveinput.AbstractDevice
addIn, addIn, addOut, close, doDisable, doEnable, finalize, getError, getIndex, getInfo, getIns, getName, getOuts, getProperties, hasExternalOutput, 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

buttons

public Out[] buttons

axes

public Out[] axes
Constructor Detail

DGaming

public DGaming(java.lang.String name,
               com.centralnexus.input.Joystick j)
Method Detail

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

copy

public Device copy()
Description copied from class: AbstractDevice
Is isCopiable() returns true, copies the device by calling DeviceUtilities.defaultCopy(). Returns null if isCopiable() returns false.

Subclass this method if you want to provide another strategy.

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

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()

getDeadZone

public double getDeadZone()

setDeadZone

public void setDeadZone(double value)