devs.sensorpackage.milford5120
Class Milford5120

java.lang.Object
  extended by java.lang.Thread
      extended by biocell.BioThread
          extended by nns.BioSensor
              extended by devs.sensorpackage.milford5120.Milford5120
All Implemented Interfaces:
BioDevice, java.lang.Runnable, java.util.EventListener, MNSListener

public class Milford5120
extends BioSensor


Nested Class Summary
(package private)  class Milford5120.InputReader
           
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
static java.io.BufferedReader bir
          Comment for bir
static java.io.BufferedOutputStream bos
          Comment for bos
protected  boolean changed
          the blocking variable busy
static java.io.InputStream is
          Comment for is
static int MAX_SWEEP
           
static int MIN_SWEEP
           
static javax.comm.SerialPort mPort
          Comment for mPort
static javax.comm.CommPortIdentifier mPortId
          Comment for mPortId
static boolean[] visualChanged
          Comment for visualChanged
static int[] visualField
          Comment for visualField
 
Fields inherited from class nns.BioSensor
EXTERO_SENSOR, INTERO_SENSOR, PROPRIO_SENSOR
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Fields inherited from interface biocell.BioDevice
BLOCKED, BUSY, CYCLING, DONE, END, PAUSED, RESUMED, START, WAIT
 
Constructor Summary
Milford5120(java.lang.String portName)
           
Milford5120(java.lang.String portName, BioSensorListener listener)
           
 
Method Summary
 boolean isEnabled()
           
 void run()
           
 void sendInt(int i)
          Sends a command to the ASC16 micro-controller
 void sensorCRLPercieved(BioSensorEvent event)
           
 void sensorPercieved(BioSensorEvent event)
           
 void setEnabled(boolean enabled)
           
 void setRange(int center)
           
 
Methods inherited from class nns.BioSensor
addListener, addListener, addSensorListener, geState, getControls, getCurrentPosition, getCurrentState, getListener, getname, getType, load, loadCNTR, process, seState, setListener, setname, setType
 
Methods inherited from class biocell.BioThread
getCurrentmood, getMoodParam, getstate, setMood, stepEnergy
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, 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

mPortId

public static javax.comm.CommPortIdentifier mPortId
Comment for mPortId


mPort

public static javax.comm.SerialPort mPort
Comment for mPort


is

public static java.io.InputStream is
Comment for is


visualField

public static int[] visualField
Comment for visualField


visualChanged

public static boolean[] visualChanged
Comment for visualChanged


MAX_SWEEP

public static int MAX_SWEEP

MIN_SWEEP

public static int MIN_SWEEP

bos

public static java.io.BufferedOutputStream bos
Comment for bos


bir

public static java.io.BufferedReader bir
Comment for bir


changed

protected boolean changed
the blocking variable busy

Constructor Detail

Milford5120

public Milford5120(java.lang.String portName)
Parameters:
portName - - the name of the port

Milford5120

public Milford5120(java.lang.String portName,
                   BioSensorListener listener)
Parameters:
portName - - name of the port
listener - - the Device listener
Method Detail

sensorCRLPercieved

public void sensorCRLPercieved(BioSensorEvent event)

sensorPercieved

public void sensorPercieved(BioSensorEvent event)

setRange

public void setRange(int center)
Parameters:
rangeLow -
rangeHigh -

sendInt

public void sendInt(int i)
Sends a command to the ASC16 micro-controller

Parameters:
i - - integer

isEnabled

public boolean isEnabled()
Returns:
Returns the enabled.

setEnabled

public void setEnabled(boolean enabled)
Parameters:
enabled - The enabled to set.

run

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