Package iris

The iris package contains classes used to interact with IRIS receivers, part of IRIS, the IR Identification System.

See:
          Description

Interface Summary
MovementListener This interface allows an object to listen to "movements", i.e. people coming close to the detector, or moving away from it.
 

Class Summary
ComEnumerator This class enumerates the IRIS receivers connected to the computer, and constructs wrappers around them.
ComWrapper This class is a wrapper around the low-level I/O communication layer.
IRReceiver Handles the high-level dialogue with an IRIS receiver.
IRReceiverWithUI This class is similar to IRReceiver, except that it creates a user interface (UI) showing the list of currently detected badges.
 

Package iris Description

The iris package contains classes used to interact with IRIS receivers, part of IRIS, the IR Identification System.

To use the receiver one just has to:

  1. obtain, through ComEnumerator, an instance of ComWrapper corresponding to a given receiver,
  2. create an instance of IRReceiver or IRReceiverWithUI. Both classes work exactly the same, except that the latter will additionnaly display a UI showing the list of currently detected badges,
  3. implement the MovementListener interface, i.e. write code for a notifyMovement() method that will be called back every time a person comes close or moves away,
  4. register this MovementListener with the IRReceiver.

That's it! Let's see a very straightforward example:

class IRTest implements MovementListener {
        public void notifyMovemen(int id, boolean comeNear) {
                System.out.println("Person #" + id + (comeNear ? "coming close." : "moving away."));
        }
        
        public static void main(String[] args) {
                ComEnumerator e = new ComEnumerator();
                ComWrapper cw = e.getComWrapper(0);
                IRReceiver ir = new IRReceiver(cw);  // or new IRReceiverWithUI();
                ir.addMovementListener(this);
        }
}

Author:
Christophe Jacquet, Supelec, 2006