Package gda.device.light
Class LEDLight
java.lang.Object
gda.factory.FindableBase
gda.device.light.LEDLight
Represents and controls a LED light. The LED light should have either On/Off switch, or brightness control, or both.
Usage example:
Server-side beans:
<bean id="cl1_switch" class="gda.device.enumpositioner.EpicsSimpleBinary">
<property name="pvName" value="BL06J-EA-DDIFF-01:LED1:TOGGLE"/>
</bean>
<bean id="cl1_intensity" class="gda.device.scannable.PVScannable">
<property name="pvName" value="BL06J-EA-DDIFF-01:LED1:PWMDEMAND"/>
</bean>
<bean id="cl1" class="gda.device.light.LEDLight" init-method="afterPropertiesSet">
<property name="lightSwitch" ref="cl1_switch"/>
<property name="lightIntensity" ref="cl1_intensity"/>
<property name="hasSwitch" value="true"/>
<property name="hasBrightnessControl" value="true"/>
</bean>
- Since:
- 9.16
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddoubleget the brightness of the lightbooleanweather the device has brightness control or notbooleanweather the device has switch control or notvoidoff()switch light offvoidon()switch light onvoidsetBrightness(double v) set the brightness of the lightvoidsetHasBrightnessControl(boolean hasBrightnessControl) voidsetHasSwitch(boolean hasSwitch) voidsetLightIntensity(Scannable lightIntensity) voidsetLightSwitch(Scannable lightSwitch) Methods inherited from class gda.factory.FindableBase
equals, getName, hashCode, setName
-
Constructor Details
-
LEDLight
public LEDLight()
-
-
Method Details
-
on
Description copied from interface:ILEDLightswitch light on- Specified by:
onin interfaceILEDLight- Throws:
DeviceException
-
off
Description copied from interface:ILEDLightswitch light off- Specified by:
offin interfaceILEDLight- Throws:
DeviceException
-
setBrightness
Description copied from interface:ILEDLightset the brightness of the light- Specified by:
setBrightnessin interfaceILEDLight- Parameters:
v-- Throws:
DeviceException
-
getBrightness
Description copied from interface:ILEDLightget the brightness of the light- Specified by:
getBrightnessin interfaceILEDLight- Returns:
- the brightness of the light
- Throws:
DeviceException
-
afterPropertiesSet
public void afterPropertiesSet() -
getLightSwitch
-
setLightSwitch
-
getLightIntensity
-
setLightIntensity
-
hasSwitch
public boolean hasSwitch()Description copied from interface:ILEDLightweather the device has switch control or not -
hasBrightnessControl
public boolean hasBrightnessControl()Description copied from interface:ILEDLightweather the device has brightness control or not- Specified by:
hasBrightnessControlin interfaceILEDLight- Returns:
- true or false
-
setHasSwitch
public void setHasSwitch(boolean hasSwitch) -
setHasBrightnessControl
public void setHasBrightnessControl(boolean hasBrightnessControl)
-