|
||||||||||
PREV NEXT | FRAMES NO FRAMES |
See:
Description
Packages | |
com.phidgets | This package contains classes for each type of Phidget, as well as a Phidget Manager. |
com.phidgets.event | This package contains interfaces and data classes for all Phidget related events. |
This is the Java JNI implementation of the Phidget library, based on the phidget21 C library.
This library was written in Java as a JNI interface to the phidget21 C library. This base C library is available with the JNI extensions for Windows, MacOS and Linux, so Phidgets can be used with Java on all of these operating systems. The advantage of a JNI is that it is extremely fast compared to any sort of non-native interface. All of the functionality of the base library is provided through this JNI.
Phidget
.
To start using a Phidget, it's object must first be created, and then one of the open
methods must be called to create a connection. Open is an asynchronous call, so it's returning can not be tacken as meaning that the Phidget is available. To this end, there are both synchronous and asynchronous notification processes availabel for determining when a Phidget is connected. See open
for more information.
Many events are supported for each Phidget, with the base events Attach
, Detach
, ServerConnect
, ServerDisconnect
and Error
being available for every Phidget. These events should be registered before the call to open, so as to not miss any events.
Also, note that open is pervasive. This means that a Phidget can be opened when it is not plugged in, and stay opened even if it is unplugged multiple times during operation. Use the Attach
and Detach
events to keep track of this. When the phidget is no longer required, close
should be called.
|
||||||||||
PREV NEXT | FRAMES NO FRAMES |