00001 00002 /* 00003 * Copyright 2006 Phidgets Inc. All rights reserved. 00004 */ 00005 00006 package com.phidgets; 00007 import java.util.Iterator; 00008 import java.util.LinkedList; 00009 import com.phidgets.event.*; 00022 public final class LEDPhidget extends Phidget 00023 { 00024 public LEDPhidget () throws PhidgetException 00025 { 00026 super (create ()); 00027 } 00028 private static native long create () throws PhidgetException; 00029 00033 public static final int PHIDGET_LED_CURRENT_LIMIT_20mA = 1; 00037 public static final int PHIDGET_LED_CURRENT_LIMIT_40mA = 2; 00041 public static final int PHIDGET_LED_CURRENT_LIMIT_60mA = 3; 00045 public static final int PHIDGET_LED_CURRENT_LIMIT_80mA = 4; 00046 00050 public static final int PHIDGET_LED_VOLTAGE_1_7V = 1; 00054 public static final int PHIDGET_LED_VOLTAGE_2_75V = 2; 00058 public static final int PHIDGET_LED_VOLTAGE_3_9V = 3; 00062 public static final int PHIDGET_LED_VOLTAGE_5_0V = 4; 00063 00073 public native int getCurrentLimit () throws PhidgetException; 00086 public native void setCurrentLimit (int currentLimit) throws PhidgetException; 00087 00097 public native int getVoltage () throws PhidgetException; 00110 public native void setVoltage (int voltage) throws PhidgetException; 00111 00119 public native int getLEDCount () throws PhidgetException; 00123 public native int getDiscreteLED (int index) throws PhidgetException; 00127 public native void setDiscreteLED (int index, int brightness) throws PhidgetException; 00135 public native double getBrightness (int index) throws PhidgetException; 00144 public native void setBrightness (int index, double brightness) throws PhidgetException; 00152 public native double getCurrentLimit (int index) throws PhidgetException; 00161 public native void setCurrentLimit (int index, double limit) throws PhidgetException; 00162 private final void enableDeviceSpecificEvents (boolean b) 00163 { 00164 } 00165 }