|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.stanford.hci.r3.pen.streaming.PenStreamingConnection
public class PenStreamingConnection
This class reads from a COM port (connected to a Bluetooth transceiver). It streams data from the Nokia SU-1B pen and converts it according to the Nokia Document. The idea for this class is that it reports low-level pen events. It does not do any bit of gesture recognition.
Example code is taken from: http://java.sun.com/products/javacomm/javadocs/API_users_guide.html
This software is distributed under the BSD License.
Field Summary | |
---|---|
static COMPort |
DEFAULT_PORT
|
Method Summary | |
---|---|
void |
addPenListener(PenListener pl)
Add a Pen Listener to the internal list. |
void |
exit()
Stops reading from the COM port. |
static PenStreamingConnection |
getInstance()
|
static PenStreamingConnection |
getInstance(COMPort port)
|
void |
serialEvent(SerialPortEvent event)
Whenever data is available, send bytes one in a row to the processor. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final COMPort DEFAULT_PORT
Method Detail |
---|
public static PenStreamingConnection getInstance()
public static PenStreamingConnection getInstance(COMPort port)
port
- if port is null, use the default port (COM5)public void addPenListener(PenListener pl)
pl
- public void exit()
public void serialEvent(SerialPortEvent event)
javax.comm.SerialPortEventListener#serialEvent(javax.comm.SerialPortEvent)
|
Copyright 2006 Stanford University | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |