|
void | dispose () |
|
String | deviceListToText (String tab) |
|
String | devicesToText (String tab) |
|
int | getNumberOfDevices () |
|
List< ControlDevice > | getDevices () |
|
ControlDevice | getDevice (final int i_deviceNumber) |
|
ControlDevice | getDevice (final String i_deviceName) |
|
ControlDevice | getConfiguredDevice () |
|
void | setConfiguredDevice (ControlDevice configuredDevice) |
|
ControlDevice | getMatchedDevice (final String filename) |
|
ControlIO | filter (int filter) |
|
ControlDevice | getMatchedDeviceSilent (final String filename) |
|
ControlDevice | getMatchedDevice (final Configuration config) |
|
ControlDevice | getMatchedDeviceSilent (final Configuration config) |
|
void | finishedConfig (ControlDevice dev) |
|
void | pre () |
|
void | run () |
|
void | plug (final Object i_object, final String i_methodName, final int i_eventType, final int i_intputDevice, final int i_input) |
|
void | plug (final String i_methodName, final int i_eventType, final int i_intputDevice, final int i_input) |
|
void | plug (final Object i_object, final String i_methodName, final int i_eventType, final String i_intputDevice, final String i_input) |
|
void | plug (final String i_methodName, final int i_eventType, final String i_intputDevice, final String i_input) |
|
ControllIO is the base class for using controllers in Processing. It provides methods to retrieve information about the connected devices and to get the input data from them.
To get a ControllIO object you to use the getInstance() Method. To get started you should use the deviceListToText(...) or the devicesToText(...) to see if what control devices you have attached and their details.
To react on button events you can plug methods, that are called when a button is pressed, released or while a button is pressed.
- Author
- Christian Riekoff & Peter Lager
ControlIO org.gamecontrolplus.ControlIO.filter |
( |
int |
filter | ) |
|
This sets the filter to apply to the next getMatchedDevice/getMatchedDeviceSilent method to be called. The filter is single use only and will be clear after the next search for a matched device.
Examples
// Filter
GCP.KEYBOARD; keyboards only
GCP.KEYBOARD | GCP.MOUSE keyboards or mice only
~GCP.STICK anything but joysticks
~(GCP.GAMEPAD | GCP.MOUSE) anything but gamepads and mice
Look in the GCP class for a full list of filter constants but beware JInput does not always report the device correctly, it reported my Logitech Master MX2 mouse as a keyboard. So use cautiously.
- Parameters
-
- Returns
- this ControlIO singleton object
void org.gamecontrolplus.ControlIO.plug |
( |
final Object |
i_object, |
|
|
final String |
i_methodName, |
|
|
final int |
i_eventType, |
|
|
final int |
i_intputDevice, |
|
|
final int |
i_input |
|
) |
| |
Plug is a handy method to handle incoming button events. To create a plug you have to implement a method that reacts on the events. To plug a method you need to give ControllIO the method name, the event type you want to react on and the device and button. If your method is inside a class you have to give ControllIO a reference to it.
If you want to handle the events of a simple button, you only have to implement a method without parameters. To react on the events of a hat you method needs to receive two float values, so that ProControl Plus can send you the x and y values of the hat.
- Parameters
-
i_object | Object: the object with the method to plug |
i_methodName | String: the name of the method that has to be plugged |
i_eventType | constant: can be ControllIO.ON_PRESS, ControllIO.ON_RELEASE or ControllIO.WHILE_PRESS |
i_intputDevice | int: the number of the device that triggers the plug |
i_input | int: the number of the button that triggers the plug |
void org.gamecontrolplus.ControlIO.plug |
( |
final String |
i_methodName, |
|
|
final int |
i_eventType, |
|
|
final int |
i_intputDevice, |
|
|
final int |
i_input |
|
) |
| |
Plug is a handy method to handle incoming button events. To create a plug you have to implement a method that reacts on the events. To plug a method you need to give ControllIO the method name, the event type you want to react on and the device and button. If your method is inside a class you have to give ControllIO a reference to it.
If you want to handle the events of a simple button, you only have to implement a method without parameters. To react on the events of a hat you method needs to receive two float values, so that ProControl Plus can send you the x and y values of the hat.
- Parameters
-
i_methodName | String: the name of the method that has to be plugged |
i_eventType | constant: can be ControllIO.ON_PRESS, ControllIO.ON_RELEASE or ControllIO.WHILE_PRESS |
i_intputDevice | int: the number of the device that triggers the plug |
i_input | int: the number of the button that triggers the plug |
void org.gamecontrolplus.ControlIO.plug |
( |
final Object |
i_object, |
|
|
final String |
i_methodName, |
|
|
final int |
i_eventType, |
|
|
final String |
i_intputDevice, |
|
|
final String |
i_input |
|
) |
| |
Plug is a handy method to handle incoming button events. To create a plug you have to implement a method that reacts on the events. To plug a method you need to give ControllIO the method name, the event type you want to react on and the device and button. If your method is inside a class you have to give ControllIO a reference to it.
If you want to handle the events of a simple button, you only have to implement a method without parameters. To react on the events of a hat you method needs to receive two float values, so that ProControl Plus can send you the x and y values of the hat.
- Parameters
-
i_object | Object: the object with the method to plug |
i_methodName | String: the name of the method that has to be plugged |
i_eventType | constant: can be ControllIO.ON_PRESS, ControllIO.ON_RELEASE or ControllIO.WHILE_PRESS |
i_intputDevice | String: the name of the device that triggers the plug |
i_input | String: the name of the input that triggers the plug. Can be system name or name from the configuration file. |
void org.gamecontrolplus.ControlIO.plug |
( |
final String |
i_methodName, |
|
|
final int |
i_eventType, |
|
|
final String |
i_intputDevice, |
|
|
final String |
i_input |
|
) |
| |
Plug is a handy method to handle incoming button events. To create a plug you have to implement a method that reacts on the events. To plug a method you need to give ControllIO the method name, the event type you want to react on and the device and button. If your method is inside a class you have to give ControllIO a reference to it.
If you want to handle the events of a simple button, you only have to implement a method without parameters. To react on the events of a hat you method needs to receive two float values, so that ProControl Plus can send you the x and y values of the hat.
- Parameters
-
i_methodName | String: the name of the method that has to be plugged |
i_eventType | constant: can be ControllIO.ON_PRESS, ControllIO.ON_RELEASE or ControllIO.WHILE_PRESS |
i_intputDevice | String: the name of the device that triggers the plug |
i_input | String: the name of the input that triggers the plug. Can be system name or name from the configuration file. |