uwcse.location.objects.sick
Class LMSSerialPortThread

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--uwcse.location.objects.sick.LMSSerialPortThread
All Implemented Interfaces:
Runnable

public class LMSSerialPortThread
extends Thread

A Thread to initialize and then read streaming measured values from the serial port connected to an LMS200 laser range rinder. Each 180 degree scan produces 361 measurements at 0.5 degree increments. The reported values are distances in millimeters.

Version:
$Revision: 1.2 $
Author:
Jeffrey Hightower, Daniel Dunham

Field Summary
protected  boolean m_flag
           
protected  ProducerConsumerQueue m_valuesQueue
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
LMSSerialPortThread(javax.comm.SerialPort serialPort, ProducerConsumerQueue valuesQueue)
          Create an LMS200 serial port thread.
 
Method Summary
 void run()
           
 void shutdown()
          Signal the thread to stop executing.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

m_valuesQueue

protected ProducerConsumerQueue m_valuesQueue

m_flag

protected volatile boolean m_flag
Constructor Detail

LMSSerialPortThread

public LMSSerialPortThread(javax.comm.SerialPort serialPort,
                           ProducerConsumerQueue valuesQueue)
                    throws IOException
Create an LMS200 serial port thread.

Parameters:
serialPort - must be a valid open serial port connected to a laser range finder at the proper baud rate.
Throws:
IOException
Method Detail

shutdown

public void shutdown()
Signal the thread to stop executing.


run

public void run()
Specified by:
run in interface Runnable
Overrides:
run in class Thread


This documentation is for the Location Stack v0.8. The latest distribution, the documentation, and the list of contributors to the Location Stack can always be found at http://portolano.cs.washington.edu/projects/location/

© Copyright 2004 University of Washington CSE