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
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 Summary
FieldsModifier and TypeFieldDescriptionint
UPOS property CapAlarm.boolean
UPOS property CapBlink.int
UPOS property CapColor.int
UPOS property CapPattern.int
UPOS property MaxLights.Fields inherited from class de.gmxhome.conrad.jpos.jpos_base.JposCommonProperties
AllowAlwaysSetProperties, AllowDeprecatedMethods, AsyncInputActive, AsyncMode, AutoDisable, CapStatisticsReporting, CapUpdateStatistics, CheckHealthText, Claimed, Claiming, ClaimWaiters, CurrentCommands, CurrentUnitID, DataCount, DataEventEnabled, DataEventList, Device, DeviceEnabled, DeviceServiceDescription, DeviceServiceVersion, DevProps, ErrorString, ErrorUnits, EventCB, EventList, EventSource, EventString, EventUnitID, EventUnits, ExclusiveAllowed, ExclusiveNo, ExclusiveUse, ExclusiveYes, FirstEnableHappened, FlagWhenIdle, FlagWhenIdleStatusValue, FreezeEvents, Index, LogicalName, MaximumConfirmationEventWaitingTime, OutputID, PowerNotify, PowerState, SerializedRequestRunner, SerializedRequests, State, StrictFIFOEventHandling, SuspendedCommands, SuspendedConcurrentCommands, UnitsOnline, UsesSubsystemUnits
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
switchOff(int lightNumber)
Final part of SwitchOff method.void
Final part of SwitchOn method.void
switchOn(int lightNumber, int blinkOnCycle, int blinkOffCycle, int color, int alarm)
Final part of SwitchOn method.void
switchOnMultiple(String lightNumbers, int blinkOnCycle, int blinkOffCycle, int color, int alarm)
Final part of SwitchOn method.void
switchOnPattern(int pattern, int alarm)
Final part of SwitchOn method.Methods inherited from class de.gmxhome.conrad.jpos.jpos_base.JposCommonProperties
addProperties, asyncMode, attachWaiter, autoDisable, checkForDeprecation, checkHealth, checkProperties, claim, clearDataProperties, clearErrorProperties, clearInput, clearOutput, clearOutputErrorProperties, close, compareFirmwareVersion, dataEventEnabled, deviceEnabled, directIO, directIO, flagWhenIdle, freezeEvents, getClaimingInstance, handlePowerStateOnEnable, initOnClaim, initOnEnable, initOnFirstEnable, initOnOpen, newJposOutputRequest, open, powerNotify, release, releaseWaiter, removeFromPropertySetList, resetStatistics, retrieveStatistics, retryInput, retryOutput, signalWaiter, unitDataCount, updateFirmware, updateFirmware, updateStatistics, waitWaiter
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface de.gmxhome.conrad.jpos.jpos_base.JposBaseInterface
asyncMode, autoDisable, checkHealth, claim, clearInput, clearOutput, close, compareFirmwareVersion, dataEventEnabled, deviceEnabled, directIO, directIO, flagWhenIdle, freezeEvents, handlePowerStateOnEnable, newJposOutputRequest, open, powerNotify, release, removeFromPropertySetList, resetStatistics, retrieveStatistics, retryInput, retryOutput, unitDataCount, updateFirmware, updateFirmware, updateStatistics
-
Field Details
-
CapAlarm
public int CapAlarmUPOS property CapAlarm. Default: ALARM_NOALARM. Can be overwritten by objects derived from JposDevice within the changeDefaults method. -
CapBlink
public boolean CapBlinkUPOS property CapBlink. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method. -
CapColor
public int CapColorUPOS property CapColor. Default: COLOR_PRIMARY. Can be overwritten by objects derived from JposDevice within the changeDefaults method. -
MaxLights
public int MaxLightsUPOS property MaxLights. Default: 1. Can be overwritten by objects derived from JposDevice within the changeDefaults method. -
CapPattern
public int CapPatternUPOS 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.JposExceptionDescription 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 interfaceLightsInterface
- 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.JposExceptionDescription 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 interfaceLightsInterface
- 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.JposExceptionFinal 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 interfaceLightsInterface
- 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.JposExceptionFinal 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 interfaceLightsInterface
- 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.JposExceptionFinal 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 interfaceLightsInterface
- Throws:
jpos.JposException
- If an error occurs.
-