Class ToneIndicatorProperties
java.lang.Object
de.gmxhome.conrad.jpos.jpos_base.JposCommonProperties
de.gmxhome.conrad.jpos.jpos_base.toneindicator.ToneIndicatorProperties
- All Implemented Interfaces:
JposBaseInterface
,ToneIndicatorInterface
- Direct Known Subclasses:
ToneIndicator
Class containing the tone indicator specific properties, their default values and default implementations of
ToneIndicatorInterface.
For details about properties, methods and method parameters, see UPOS specification, chapter Tone Indicator.
-
Field Summary
FieldsModifier and TypeFieldDescriptionint
UPOS property CapMelody.boolean
UPOS property CapPitch.boolean
UPOS property CapVolume.int
UPOS property InterToneWait.int
UPOS property MelodyType.int
UPOS property MelodyVolume.int
UPOS property Tone1Duration.int
UPOS property Tone1Pitch.int
UPOS property Tone1Volume.int
UPOS property Tone2Duration.int
UPOS property Tone2Pitch.int
UPOS property Tone2Volume.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 TypeMethodDescriptionboolean
Initialize properties that must be initialized whenever the device will be enabled the first time-void
Initialization of properties that must be initialized during open.void
interToneWait(int delay)
Final part of setting InterToneWait.void
melodyType(int type)
Final part of setting MelodyType.void
melodyVolume(int volume)
Final part of setting MelodyVolume.sound(int numberOfCycles, int interSoundWait)
Validation part of Sound method.void
Final part of Sound method.void
tone1Duration(int duration)
Final part of setting Tone1Duration.void
tone1Pitch(int type)
Final part of setting Tone1Pitch.void
tone1Volume(int type)
Final part of setting Tone1Volume.void
tone2Duration(int type)
Final part of setting Tone2Duration.void
tone2Pitch(int type)
Final part of setting Tone2Pitch.void
tone2Volume(int type)
Final part of setting Tone2Volume.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, 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
-
CapMelody
public int CapMelodyUPOS property CapMelody. Default: 0. Can be overwritten by objects derived from JposDevice within the changeDefaults method. -
CapPitch
public boolean CapPitchUPOS property CapPitch. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method. -
CapVolume
public boolean CapVolumeUPOS property CapVolume. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method. -
InterToneWait
public int InterToneWaitUPOS property InterToneWait. -
MelodyType
public int MelodyTypeUPOS property MelodyType. -
MelodyVolume
public int MelodyVolumeUPOS property MelodyVolume. -
Tone1Duration
public int Tone1DurationUPOS property Tone1Duration. -
Tone1Pitch
public int Tone1PitchUPOS property Tone1Pitch. -
Tone1Volume
public int Tone1VolumeUPOS property Tone1Volume. -
Tone2Duration
public int Tone2DurationUPOS property Tone2Duration. -
Tone2Pitch
public int Tone2PitchUPOS property Tone2Pitch. -
Tone2Volume
public int Tone2VolumeUPOS property Tone2Volume.
-
-
Constructor Details
-
ToneIndicatorProperties
public ToneIndicatorProperties(int dev)Constructor. Sets ExclusiveUse to ExclusiveAllowed to match the ToneIndicator device model.- Parameters:
dev
- Device index
-
-
Method Details
-
initOnOpen
public void initOnOpen()Description copied from class:JposCommonProperties
Initialization of properties that must be initialized during open.- Overrides:
initOnOpen
in classJposCommonProperties
-
initOnFirstEnable
public boolean initOnFirstEnable()Description copied from class:JposCommonProperties
Initialize properties that must be initialized whenever the device will be enabled the first time-- Overrides:
initOnFirstEnable
in classJposCommonProperties
- Returns:
- Returns true in case of first enable.
-
melodyType
public void melodyType(int type) throws jpos.JposExceptionDescription copied from interface:ToneIndicatorInterface
Final part of setting MelodyType. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- type is between 0 and CapMelody.
- Specified by:
melodyType
in interfaceToneIndicatorInterface
- Parameters:
type
- New MelodyType value- Throws:
jpos.JposException
- If an error occurs during enable or disable
-
melodyVolume
public void melodyVolume(int volume) throws jpos.JposExceptionDescription copied from interface:ToneIndicatorInterface
Final part of setting MelodyVolume. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled.
- Specified by:
melodyVolume
in interfaceToneIndicatorInterface
- Parameters:
volume
- New MelodyVolume value- Throws:
jpos.JposException
- If an error occurs during enable or disable
-
interToneWait
public void interToneWait(int delay) throws jpos.JposExceptionDescription copied from interface:ToneIndicatorInterface
Final part of setting InterToneWait. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- delay is ≥ 0.
- Specified by:
interToneWait
in interfaceToneIndicatorInterface
- Parameters:
delay
- New InterToneWait value- Throws:
jpos.JposException
- If an error occurs during enable or disable
-
tone1Duration
public void tone1Duration(int duration) throws jpos.JposExceptionDescription copied from interface:ToneIndicatorInterface
Final part of setting Tone1Duration. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled.
- Specified by:
tone1Duration
in interfaceToneIndicatorInterface
- Parameters:
duration
- New Tone1Duration value- Throws:
jpos.JposException
- If an error occurs during enable or disable
-
tone1Pitch
public void tone1Pitch(int type) throws jpos.JposExceptionDescription copied from interface:ToneIndicatorInterface
Final part of setting Tone1Pitch. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled.
- Specified by:
tone1Pitch
in interfaceToneIndicatorInterface
- Parameters:
type
- New Tone1Pitch value- Throws:
jpos.JposException
- If an error occurs during enable or disable
-
tone1Volume
public void tone1Volume(int type) throws jpos.JposExceptionDescription copied from interface:ToneIndicatorInterface
Final part of setting Tone1Volume. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled.
- Specified by:
tone1Volume
in interfaceToneIndicatorInterface
- Parameters:
type
- New Tone1Volume value- Throws:
jpos.JposException
- If an error occurs during enable or disable
-
tone2Duration
public void tone2Duration(int type) throws jpos.JposExceptionDescription copied from interface:ToneIndicatorInterface
Final part of setting Tone2Duration. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled.
- Specified by:
tone2Duration
in interfaceToneIndicatorInterface
- Parameters:
type
- New Tone2Duration value- Throws:
jpos.JposException
- If an error occurs during enable or disable
-
tone2Pitch
public void tone2Pitch(int type) throws jpos.JposExceptionDescription copied from interface:ToneIndicatorInterface
Final part of setting Tone2Pitch. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled.
- Specified by:
tone2Pitch
in interfaceToneIndicatorInterface
- Parameters:
type
- New Tone2Pitch value- Throws:
jpos.JposException
- If an error occurs during enable or disable
-
tone2Volume
public void tone2Volume(int type) throws jpos.JposExceptionDescription copied from interface:ToneIndicatorInterface
Final part of setting Tone2Volume. Can be overwritten within derived classes, if necessary. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled.
- Specified by:
tone2Volume
in interfaceToneIndicatorInterface
- Parameters:
type
- New Tone2Volume value- Throws:
jpos.JposException
- If an error occurs during enable or disable
-
sound
Description copied from interface:ToneIndicatorInterface
Validation part of Sound method. For details, see UPOS specification. Can be overwritten within derived classes, if necessary. This method shall only perform additional validation. It will be called before the service buffers the method call for synchronous or asynchronous execution. This method will be called only if the following plausibility checks lead to a positive result:- Device is enabled,
- interSoundWait ≥ 0,
- numberOfCycles > 0 or JPOS_FOREVER,
- AsyncMode is false: numberOfCycles is not JPOS_FOREVER.
- Specified by:
sound
in interfaceToneIndicatorInterface
- Parameters:
numberOfCycles
- The number of cycles to sound the indicator device. If FOREVER, then start the indicator sounding and repeat continuously, else perform the sound for the specified number of cycles.interSoundWait
- When numberOfCycles is not one, then pause for interSoundWait milliseconds before repeating the tone cycle (before playing tone-1 again).- Returns:
- Sound object for use in final part.
- Throws:
jpos.JposException
- For details, see UPOS method Sound.
-
sound
Description copied from interface:ToneIndicatorInterface
Final part of Sound method. Can be overwritten within derived classes, if necessary. The parameters of the method will be passed via a Sound object. This method will be called when the corresponding operation shall be performed, either synchronously or asynchronously. All plausibility checks have been made before, only runtime errors can occur.
This method will be used in method SoundImmediate as well.- Specified by:
sound
in interfaceToneIndicatorInterface
- Parameters:
request
- Sound object. Used to perform methods synchronously or asynchronously, depending on call parameters. Holds Abort and EndSync objects that should be checked in longer operations.- Throws:
jpos.JposException
- See UPOS specification, method Sound
-