org.jcsp.nxt.io
Class ActiveLightSensor

java.lang.Object
  extended by org.jcsp.nxt.io.ActiveLightSensor
All Implemented Interfaces:
lejos.nxt.SensorPortListener, CSProcess

public class ActiveLightSensor
extends java.lang.Object
implements CSProcess, lejos.nxt.SensorPortListener


Field Summary
static int ACTIVATE
           
static int CALIBR_HIGH
           
static int CALIBR_LOW
           
(package private)  ChannelInputInt configChannel
           
(package private)  int delta
           
static int FLOOD_OFF
           
static int FLOOD_ON
           
(package private)  int lastValueTransmitted
           
static int LEVEL
           
(package private)  ChannelOutputInt levelChannel
           
(package private)  ChannelOutputInt outChannel
           
(package private)  lejos.nxt.SensorPort port
           
(package private)  boolean running
           
(package private)  lejos.nxt.LightSensor sensor
           
 
Constructor Summary
ActiveLightSensor(lejos.nxt.SensorPort p, boolean floodlighting, ChannelInputInt configChannel, ChannelOutputInt levelChannel, ChannelOutputInt outChannel)
           
ActiveLightSensor(lejos.nxt.SensorPort p, boolean floodlighting, ChannelOutputInt outChannel)
           
ActiveLightSensor(lejos.nxt.SensorPort p, ChannelInputInt configChannel, ChannelOutputInt outChannel)
           
ActiveLightSensor(lejos.nxt.SensorPort p, ChannelInputInt configChannel, ChannelOutputInt levelChannel, ChannelOutputInt outChannel)
           
ActiveLightSensor(lejos.nxt.SensorPort p, ChannelOutputInt outChannel)
           
ActiveLightSensor(lejos.nxt.SensorPort p, int delta, boolean floodlighting, ChannelInputInt configChannel, ChannelOutputInt levelChannel, ChannelOutputInt outChannel)
           
ActiveLightSensor(lejos.nxt.SensorPort p, int delta, ChannelInputInt configChannel, ChannelOutputInt levelChannel, ChannelOutputInt outChannel)
           
ActiveLightSensor(lejos.nxt.SensorPort p, int delta, ChannelOutputInt outChannel)
           
 
Method Summary
 void run()
          This defines the actions of the process.
 void stateChanged(lejos.nxt.SensorPort p, int oldVal, int newVal)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FLOOD_ON

public static final int FLOOD_ON
See Also:
Constant Field Values

FLOOD_OFF

public static final int FLOOD_OFF
See Also:
Constant Field Values

CALIBR_LOW

public static final int CALIBR_LOW
See Also:
Constant Field Values

CALIBR_HIGH

public static final int CALIBR_HIGH
See Also:
Constant Field Values

LEVEL

public static final int LEVEL
See Also:
Constant Field Values

ACTIVATE

public static final int ACTIVATE
See Also:
Constant Field Values

outChannel

ChannelOutputInt outChannel

configChannel

ChannelInputInt configChannel

levelChannel

ChannelOutputInt levelChannel

sensor

lejos.nxt.LightSensor sensor

port

lejos.nxt.SensorPort port

running

boolean running

lastValueTransmitted

int lastValueTransmitted

delta

int delta
Constructor Detail

ActiveLightSensor

public ActiveLightSensor(lejos.nxt.SensorPort p,
                         ChannelOutputInt outChannel)

ActiveLightSensor

public ActiveLightSensor(lejos.nxt.SensorPort p,
                         int delta,
                         ChannelOutputInt outChannel)

ActiveLightSensor

public ActiveLightSensor(lejos.nxt.SensorPort p,
                         boolean floodlighting,
                         ChannelOutputInt outChannel)

ActiveLightSensor

public ActiveLightSensor(lejos.nxt.SensorPort p,
                         ChannelInputInt configChannel,
                         ChannelOutputInt levelChannel,
                         ChannelOutputInt outChannel)

ActiveLightSensor

public ActiveLightSensor(lejos.nxt.SensorPort p,
                         int delta,
                         ChannelInputInt configChannel,
                         ChannelOutputInt levelChannel,
                         ChannelOutputInt outChannel)

ActiveLightSensor

public ActiveLightSensor(lejos.nxt.SensorPort p,
                         ChannelInputInt configChannel,
                         ChannelOutputInt outChannel)

ActiveLightSensor

public ActiveLightSensor(lejos.nxt.SensorPort p,
                         boolean floodlighting,
                         ChannelInputInt configChannel,
                         ChannelOutputInt levelChannel,
                         ChannelOutputInt outChannel)

ActiveLightSensor

public ActiveLightSensor(lejos.nxt.SensorPort p,
                         int delta,
                         boolean floodlighting,
                         ChannelInputInt configChannel,
                         ChannelOutputInt levelChannel,
                         ChannelOutputInt outChannel)
Method Detail

stateChanged

public void stateChanged(lejos.nxt.SensorPort p,
                         int oldVal,
                         int newVal)
Specified by:
stateChanged in interface lejos.nxt.SensorPortListener

run

public void run()
Description copied from interface: CSProcess
This defines the actions of the process.

Specified by:
run in interface CSProcess