PenStreamingConnection Class Reference

List of all members.

Public Member Functions

void addPenListener (PenListener pl)
 Add a Pen Listener to the internal list.
void exit ()
 Stops reading from the COM port.
void serialEvent (SerialPortEvent event)
 Whenever data is available, send bytes one in a row to the processor.

Static Public Member Functions

static PenStreamingConnection getInstance ()

Static Public Attributes

static final COMPort DEFAULT_PORT = COMPort.COM5

Package Functions

 SuppressWarnings ("unchecked") public static PenStreamingConnection getInstance(COMPort port)

Detailed Description

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.

Author:
Ron B Yeh (ronyeh(AT)cs.stanford.edu)

Definition at line 40 of file PenStreamingConnection.java.


Member Function Documentation

void addPenListener ( PenListener  pl  ) 

Add a Pen Listener to the internal list.

Pen Listeners' callbacks will be called when pen events are detected.

Parameters:
pl 

Definition at line 193 of file PenStreamingConnection.java.

Referenced by PenServer.startJavaServer(), and PenServer.startTextServer().

static PenStreamingConnection getInstance (  )  [static]

Returns:
use COM5

Definition at line 72 of file PenStreamingConnection.java.

Referenced by PenServer.startJavaServer(), and PenServer.startTextServer().

void serialEvent ( SerialPortEvent  event  ) 

Whenever data is available, send bytes one in a row to the processor.

See also:
javax.comm.SerialPortEventListener.serialEvent(javax.comm.SerialPortEvent)

Definition at line 361 of file PenStreamingConnection.java.

SuppressWarnings ( "unchecked"   )  [package]

Parameters:
port if port is null, use the default port (COM5)

Definition at line 80 of file PenStreamingConnection.java.

References PenStreamingConnection.DEFAULT_PORT.


The documentation for this class was generated from the following file:
Generated on Sat Apr 14 18:21:44 2007 for R3 Paper Toolkit by  doxygen 1.4.7