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 TypeFieldDescriptionintUPOS property CapMelody.booleanUPOS property CapPitch.booleanUPOS property CapVolume.intUPOS property InterToneWait.intUPOS property MelodyType.intUPOS property MelodyVolume.intUPOS property Tone1Duration.intUPOS property Tone1Pitch.intUPOS property Tone1Volume.intUPOS property Tone2Duration.intUPOS property Tone2Pitch.intUPOS 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 TypeMethodDescriptionbooleanInitialize properties that must be initialized whenever the device will be enabled the first time-voidInitialization of properties that must be initialized during open.voidinterToneWait(int delay)Final part of setting InterToneWait.voidmelodyType(int type)Final part of setting MelodyType.voidmelodyVolume(int volume)Final part of setting MelodyVolume.sound(int numberOfCycles, int interSoundWait)Validation part of Sound method.voidFinal part of Sound method.voidtone1Duration(int duration)Final part of setting Tone1Duration.voidtone1Pitch(int type)Final part of setting Tone1Pitch.voidtone1Volume(int type)Final part of setting Tone1Volume.voidtone2Duration(int type)Final part of setting Tone2Duration.voidtone2Pitch(int type)Final part of setting Tone2Pitch.voidtone2Volume(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, waitWaiterMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:JposCommonPropertiesInitialization of properties that must be initialized during open.- Overrides:
initOnOpenin classJposCommonProperties
-
initOnFirstEnable
public boolean initOnFirstEnable()Description copied from class:JposCommonPropertiesInitialize properties that must be initialized whenever the device will be enabled the first time-- Overrides:
initOnFirstEnablein classJposCommonProperties- Returns:
- Returns true in case of first enable.
-
melodyType
public void melodyType(int type) throws jpos.JposExceptionDescription copied from interface:ToneIndicatorInterfaceFinal 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:
melodyTypein 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:ToneIndicatorInterfaceFinal 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:
melodyVolumein 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:ToneIndicatorInterfaceFinal 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:
interToneWaitin 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:ToneIndicatorInterfaceFinal 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:
tone1Durationin 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:ToneIndicatorInterfaceFinal 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:
tone1Pitchin 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:ToneIndicatorInterfaceFinal 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:
tone1Volumein 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:ToneIndicatorInterfaceFinal 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:
tone2Durationin 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:ToneIndicatorInterfaceFinal 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:
tone2Pitchin 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:ToneIndicatorInterfaceFinal 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:
tone2Volumein interfaceToneIndicatorInterface- Parameters:
type- New Tone2Volume value- Throws:
jpos.JposException- If an error occurs during enable or disable
-
sound
Description copied from interface:ToneIndicatorInterfaceValidation 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:
soundin 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:ToneIndicatorInterfaceFinal 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:
soundin 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
-