Class LEDLight

java.lang.Object
gda.factory.FindableBase
gda.device.light.LEDLight
All Implemented Interfaces:
ILEDLight, Findable

@ServiceInterface(ILEDLight.class) public class LEDLight extends FindableBase implements ILEDLight
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 Details

    • LEDLight

      public LEDLight()
  • Method Details

    • on

      public void on() throws DeviceException
      Description copied from interface: ILEDLight
      switch light on
      Specified by:
      on in interface ILEDLight
      Throws:
      DeviceException
    • off

      public void off() throws DeviceException
      Description copied from interface: ILEDLight
      switch light off
      Specified by:
      off in interface ILEDLight
      Throws:
      DeviceException
    • setBrightness

      public void setBrightness(double v) throws DeviceException
      Description copied from interface: ILEDLight
      set the brightness of the light
      Specified by:
      setBrightness in interface ILEDLight
      Parameters:
      v -
      Throws:
      DeviceException
    • getBrightness

      public double getBrightness() throws DeviceException
      Description copied from interface: ILEDLight
      get the brightness of the light
      Specified by:
      getBrightness in interface ILEDLight
      Returns:
      the brightness of the light
      Throws:
      DeviceException
    • afterPropertiesSet

      public void afterPropertiesSet()
    • getLightSwitch

      public Scannable getLightSwitch()
    • setLightSwitch

      public void setLightSwitch(Scannable lightSwitch)
    • getLightIntensity

      public Scannable getLightIntensity()
    • setLightIntensity

      public void setLightIntensity(Scannable lightIntensity)
    • hasSwitch

      public boolean hasSwitch()
      Description copied from interface: ILEDLight
      weather the device has switch control or not
      Specified by:
      hasSwitch in interface ILEDLight
      Returns:
      true or false
    • hasBrightnessControl

      public boolean hasBrightnessControl()
      Description copied from interface: ILEDLight
      weather the device has brightness control or not
      Specified by:
      hasBrightnessControl in interface ILEDLight
      Returns:
      true or false
    • setHasSwitch

      public void setHasSwitch(boolean hasSwitch)
    • setHasBrightnessControl

      public void setHasBrightnessControl(boolean hasBrightnessControl)