package com.rle.monitor; /* * RLE Surface Crack Detector Graphing Software * * Copyright (C) 2002 RLE Technologies * For more information visit http://www.rletech.com/ * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. */ /** * @author Andy Goth * @author Eric Peterson * @author Matt Lane * @version 0.1 */ import java.io.*; import java.lang.*; /** Scanner device that both provides data and accepts commands. */ public interface Scanner { /* Command echo types */ public static final int OFFSET = 1; public static final int GAIN = 2; public static final int AUTO_OFFSET = 3; public static final int ALARM = 4; public static final int LED = 5; public static final int THRESHHOLD = 6; public static final int QUERY = 7; /** Opens a connection to the named device. */ public void open(String portName) throws IOException; /** Resets and closes the connection. */ public void close() throws IOException; /** Sets the handler for sample data. */ public void setSampleListener(SampleListener l); /** Sets the handler for command echoes. */ public void setEchoListener(EchoListener l); /** Starts data transfer. */ public void beginDataTransfer() throws IOException; /** Stops data transfer. */ public void reset() throws IOException; /** Adjusts the device's offset. */ public void setOffset(int o) throws IOException; /** Adjusts the device's gain. */ public void setGain(int g) throws IOException; /** Adjusts the device's offset to automatic. */ public void setAutoOffset() throws IOException; /** Enables or disables the audible alarm. */ public void setAlarm(boolean f) throws IOException; /** Makes the LED turn red. */ public void setRedLED() throws IOException; /** Makes the LED turn green. */ public void setGreenLED() throws IOException; /** Turns the LED on or off. */ public void setLED(boolean f) throws IOException; /** Adjusts the device's threshhold. */ public void setThreshhold(int t) throws IOException; /** Queries the device's offset. */ public void queryOffset() throws IOException; /** Queries the device's gain. */ public void queryGain() throws IOException; /** Queries the device's threshhold. */ public void queryThreshhold() throws IOException; }