public class LaserRangefinderDaemon
extends java.lang.Object
QHV,3.80,M,0.00,D,6.60,D,3.80,M*67 $PLTIT,HV,3.10,M,0.00,D,6.10,D,3.20,M*63This shows a single reading, a single press of the fire button, taken after startup. The QHV line is the startup message. The readouts on the device are as follows: SD (slope distance): 3.2m VD (vertical distance): 0.3m HD (horizontal distance): 3.1m INC (inclination): 6.1 degrees 0: $PLTIT 1: HV 2: 3.10 3: M 4: 0.00 5: D 6: 6.10 7: D 8: 3.20 9: M Bah, make it a singleton for now.
| Modifier and Type | Method and Description |
|---|---|
void |
addLaserRangefinderListener(LaserRangefinderListener listener) |
boolean |
isRunning() |
void |
removeLaserRangefinderListener(LaserRangefinderListener listener) |
static LaserRangefinderDaemon |
singleton() |
void |
startDaemon(java.lang.String serialPort,
int baudRate) |
void |
stopDaemon() |
public static LaserRangefinderDaemon singleton()
public void addLaserRangefinderListener(LaserRangefinderListener listener)
public boolean isRunning()
public void removeLaserRangefinderListener(LaserRangefinderListener listener)
public void startDaemon(java.lang.String serialPort,
int baudRate)
throws java.io.IOException,
javax.comm.NoSuchPortException,
javax.comm.PortInUseException,
javax.comm.UnsupportedCommOperationException
java.io.IOExceptionjavax.comm.NoSuchPortExceptionjavax.comm.PortInUseExceptionjavax.comm.UnsupportedCommOperationExceptionpublic void stopDaemon()