nns
Class BioSensor

java.lang.Object
  extended by java.lang.Thread
      extended by biocell.BioThread
          extended by nns.BioSensor
All Implemented Interfaces:
BioDevice, java.lang.Runnable, java.util.EventListener, MNSListener
Direct Known Subclasses:
AliceBasedInterface, AliceDecoder, DanceGenerator, Milford5120, NetDecoder, PMotionCalculator, SpeechRecognizer

public class BioSensor
extends BioThread
implements BioDevice

Author:
martin lukac The Class encapsuating all sensory function in the robot, wether they are software or hooked to some hardware device such as network adapter, camera or microphone

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
static int EXTERO_SENSOR
          Comment for EXTERO_SENSOR
static int INTERO_SENSOR
          Comment for INTERO_SENSOR
static int PROPRIO_SENSOR
          Comment for 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
BioSensor(int Type, java.lang.String portName)
           
 
Method Summary
 void addListener(BioDeviceListener rP)
           
 void addListener(BioSensorListener listener)
           
 void addSensorListener(BioSensorListener n)
           
 int geState()
           
 java.lang.String getControls()
           
 int getCurrentPosition()
           
 int getCurrentState()
           
 BioSensorListener getListener()
           
 java.lang.String getname()
           
 int getType()
           
 void load(MNSEvent cnE)
          simple interface to control all Devices
 void loadCNTR(MNSEvent cnE)
           
 void process(MNSEvent cnv)
          loads a CNSEvent into a listener
 void seState(int State)
           
 void setListener(BioSensorListener listener)
           
 void setname(java.lang.String name)
           
 void setType(int type)
           
 
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, run, 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

EXTERO_SENSOR

public static final int EXTERO_SENSOR
Comment for EXTERO_SENSOR

See Also:
Constant Field Values

INTERO_SENSOR

public static final int INTERO_SENSOR
Comment for INTERO_SENSOR

See Also:
Constant Field Values

PROPRIO_SENSOR

public static final int PROPRIO_SENSOR
Comment for PROPRIO_SENSOR

See Also:
Constant Field Values
Constructor Detail

BioSensor

public BioSensor(int Type,
                 java.lang.String portName)
Parameters:
portName -
Method Detail

addListener

public void addListener(BioDeviceListener rP)
Specified by:
addListener in interface BioDevice

getControls

public java.lang.String getControls()
Specified by:
getControls in interface BioDevice
Returns:

geState

public int geState()

seState

public void seState(int State)

process

public void process(MNSEvent cnv)
Description copied from interface: MNSListener
loads a CNSEvent into a listener

Specified by:
process in interface MNSListener

addListener

public void addListener(BioSensorListener listener)

getCurrentPosition

public int getCurrentPosition()
Specified by:
getCurrentPosition in interface BioDevice
Returns:

getCurrentState

public int getCurrentState()
Specified by:
getCurrentState in interface BioDevice
Returns:

load

public void load(MNSEvent cnE)
Description copied from interface: BioDevice
simple interface to control all Devices

Specified by:
load in interface BioDevice

loadCNTR

public void loadCNTR(MNSEvent cnE)
Specified by:
loadCNTR in interface BioDevice

addSensorListener

public void addSensorListener(BioSensorListener n)
Parameters:
n -

getListener

public BioSensorListener getListener()
Returns:
Returns the listener.

setListener

public void setListener(BioSensorListener listener)
Parameters:
listener - The listener to set.

getType

public int getType()
Returns:
Returns the type.

setType

public void setType(int type)
Parameters:
type - The type to set.

getname

public java.lang.String getname()
Specified by:
getname in interface BioDevice
Returns:
Returns the name.

setname

public void setname(java.lang.String name)
Parameters:
name - The name to set.