iris
Class IRReceiver

java.lang.Object
  extended by iris.IRReceiver
Direct Known Subclasses:
IRReceiverWithUI

public class IRReceiver
extends java.lang.Object

Handles the high-level dialogue with an IRIS receiver. Upon instantiation, this class tries to attach to an IRIS receiver, and thereupon starts handling communication with it. It maintains an internal list of detected IR badges. To be notified of incoming or outgoing badges, one must create a MovementListener implementation, and register it with the method addMovementListener. The movement listener will then be notified of every badge coming in or going out.

Author:
Christophe Jacquet, Supelec, 2006

Constructor Summary
IRReceiver(ComWrapper cw)
          Constructs a new IR receiver.
 
Method Summary
 void addMovementListener(MovementListener l)
          Adds a movement listener to the receiver's list of listeners.
 java.lang.String getVersionId()
          Returns the physical receiver's firmware version string.
 void removeMovementListener(MovementListener l)
          Removes a movement listener from the receiver's list of listeners.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IRReceiver

public IRReceiver(ComWrapper cw)
Constructs a new IR receiver. It starts (i.e. launches its internal threads) as soon as the object is constructed. Note that you must register at least one movement listener with the receiver in order to use sensed information.

Parameters:
cw - the ComWrapper corresponding to the receiver
Method Detail

addMovementListener

public void addMovementListener(MovementListener l)
Adds a movement listener to the receiver's list of listeners.

Parameters:
l - a movement listener

removeMovementListener

public void removeMovementListener(MovementListener l)
Removes a movement listener from the receiver's list of listeners.

Parameters:
l - the movement listener to be removed

getVersionId

public java.lang.String getVersionId()
Returns the physical receiver's firmware version string.

Returns:
the version string