RoboJDETM v2.0

com.ridgesoft.robotics
Class BasicLED

java.lang.Object
  extended by com.ridgesoft.robotics.BasicLED
All Implemented Interfaces:
LED

public class BasicLED
extends Object
implements LED

Implements the LED inteface to a DigitalOutput class which controls an LED.


Constructor Summary
BasicLED(DigitalOutput digitalOutput, boolean isActiveLow)
          Constructs a BasicLED object.
 
Method Summary
 boolean isOn()
          Reads the state of the LED.
 void off()
          Turns the LED off.
 void on()
          Turns the LED on.
 void toggle()
          Toggles the state of the LED.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait
 

Constructor Detail

BasicLED

public BasicLED(DigitalOutput digitalOutput,
                boolean isActiveLow)
Constructs a BasicLED object.

Parameters:
digitalOutput - the digital output that controls the LED's state
isActiveLow - true if the LED is on when the output is low, otherwise false
Method Detail

isOn

public boolean isOn()
Reads the state of the LED.

Specified by:
isOn in interface LED
Returns:
true if the LED is on, false if it is off

off

public void off()
Turns the LED off.

Specified by:
off in interface LED

on

public void on()
Turns the LED on.

Specified by:
on in interface LED

toggle

public void toggle()
Toggles the state of the LED.

Specified by:
toggle in interface LED

RoboJDETM v2.0

Copyright (c) 2003-2009 RidgeSoft, LLC. All rights reserved.
www.ridgesoft.com