Class LightsProperties

java.lang.Object
de.gmxhome.conrad.jpos.jpos_base.JposCommonProperties
de.gmxhome.conrad.jpos.jpos_base.lights.LightsProperties
All Implemented Interfaces:
JposBaseInterface, LightsInterface

public class LightsProperties extends JposCommonProperties implements LightsInterface
Class containing the lights specific properties, their default values and default implementations of LightsInterface. For details about properties, methods and method parameters, see UPOS specification, chapter Lights.
  • Field Details

    • CapAlarm

      public int CapAlarm
      UPOS property CapAlarm. Default: ALARM_NOALARM. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapColor

      public int CapColor
      UPOS property CapColor. Default: COLOR_PRIMARY. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • MaxLights

      public int MaxLights
      UPOS property MaxLights. Default: 1. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapPattern

      public int CapPattern
      UPOS property CapPattern. Default: LGT_PATTERN_NOPATTERN. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
  • Constructor Details

    • LightsProperties

      protected LightsProperties(int dev)
      Constructor.
      Parameters:
      dev - Device index
  • Method Details

    • switchOff

      public void switchOff(int lightNumber) throws jpos.JposException
      Description copied from interface: LightsInterface
      Final part of SwitchOff method. Can be overwritten in derived class, if necessary. This method will be called only if the following plausibility checks lead to a positive result:
      • Device is enabled,
      • lightNumber is between 1 and MaxLights.
      Specified by:
      switchOff in interface LightsInterface
      Parameters:
      lightNumber - light number between 1 and MaxLights.
      Throws:
      jpos.JposException - If an error occurs.
    • switchOn

      public void switchOn(int lightNumber, int blinkOnCycle, int blinkOffCycle, int color, int alarm) throws jpos.JposException
      Description copied from interface: LightsInterface
      Final part of SwitchOn method. Can be overwritten in derived class, if necessary. This method will be called only if the following plausibility checks lead to a positive result:
      • Device is enabled,
      • lightNumber is between 1 and MaxLights,
      • CapColor is COLOR_PRIMARY or color is one of the colors specified by CapColor,
      • CapAlarm is ALARM_NOALARM or alarm is one of the alarms specified by CapAlarm.
      Specified by:
      switchOn in interface LightsInterface
      Parameters:
      lightNumber - light number between 1 and MaxLights.
      blinkOnCycle - If blinking, light-on time in milliseconds.
      blinkOffCycle - If blinking, light-off time in milliseconds.
      color - Light color as specified by CapColor.
      alarm - Alarm value as specified by CapAlarm.
      Throws:
      jpos.JposException - If an error occurs.
    • switchOnMultiple

      public void switchOnMultiple(String lightNumbers, int blinkOnCycle, int blinkOffCycle, int color, int alarm) throws jpos.JposException
      Final part of SwitchOn method. Can be overwritten in derived class, if necessary. This method will be called only if the following plausibility checks lead to a positive result:
      • Device is enabled,
      • lightNumbers consists of a comma separated list of numbers between 1 and MaxLights,
      • CapColor is COLOR_PRIMARY or color is one of the colors specified by CapColor,
      • CapAlarm is ALARM_NOALARM or alarm is one of the alarms specified by CapAlarm.
      Specified by:
      switchOnMultiple in interface LightsInterface
      Parameters:
      lightNumbers - light numbers between 1 and MaxLights, separated by comma.
      blinkOnCycle - If blinking, light-on time in milliseconds.
      blinkOffCycle - If blinking, light-off time in milliseconds.
      color - Light color as specified by CapColor.
      alarm - Alarm value as specified by CapAlarm.
      Throws:
      jpos.JposException - If an error occurs.
    • switchOnPattern

      public void switchOnPattern(int pattern, int alarm) throws jpos.JposException
      Final part of SwitchOn method. Can be overwritten in derived class, if necessary. This method will be called only if the following plausibility checks lead to a positive result:
      • Device is enabled,
      • Only pattern set in CapPattern are specified in pattern,
      • CapAlarm is ALARM_NOALARM or alarm is one of the alarms specified by CapAlarm.
      Specified by:
      switchOnPattern in interface LightsInterface
      Parameters:
      pattern - Lightning pattern to be switched on.
      alarm - Alarm value as specified by CapAlarm.
      Throws:
      jpos.JposException - If an error occurs.
    • switchOffPattern

      public void switchOffPattern() throws jpos.JposException
      Final part of SwitchOn method. Can be overwritten in derived class, if necessary. This method will be called only if the following plausibility checks lead to a positive result:
      • Device is enabled,
      • CapPattern is not equal to LGT_PATTERN_NOPATTERN.
      Specified by:
      switchOffPattern in interface LightsInterface
      Throws:
      jpos.JposException - If an error occurs.