Package SampleCombiDevice
Class ToneIndicator
java.lang.Object
de.gmxhome.conrad.jpos.jpos_base.JposCommonProperties
de.gmxhome.conrad.jpos.jpos_base.toneindicator.ToneIndicatorProperties
SampleCombiDevice.ToneIndicator
- All Implemented Interfaces:
JposBaseInterface
,ToneIndicatorInterface
Class implementing the POSKeyboardInterface for the sample combi device.
External and interactive Checkhealth might be implemented in a later version.
-
Field Summary
Fields inherited from class de.gmxhome.conrad.jpos.jpos_base.toneindicator.ToneIndicatorProperties
CapMelody, CapPitch, CapVolume, InterToneWait, MelodyType, MelodyVolume, Tone1Duration, Tone1Pitch, Tone1Volume, Tone2Duration, Tone2Pitch, 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 TypeMethodDescriptionvoid
checkHealth(int level)
Final part of CheckHealth method.void
close()
Final part of close method.void
deviceEnabled(boolean enable)
Final part of setting DeviceEnabled.void
open()
Final part of open method.void
Final part of Sound method.Methods inherited from class de.gmxhome.conrad.jpos.jpos_base.toneindicator.ToneIndicatorProperties
initOnFirstEnable, initOnOpen, interToneWait, melodyType, melodyVolume, sound, tone1Duration, tone1Pitch, tone1Volume, tone2Duration, tone2Pitch, tone2Volume
Methods inherited from class de.gmxhome.conrad.jpos.jpos_base.JposCommonProperties
addProperties, asyncMode, attachWaiter, autoDisable, checkForDeprecation, checkProperties, claim, clearDataProperties, clearErrorProperties, clearInput, clearOutput, clearOutputErrorProperties, compareFirmwareVersion, dataEventEnabled, directIO, directIO, flagWhenIdle, freezeEvents, getClaimingInstance, handlePowerStateOnEnable, initOnClaim, initOnEnable, newJposOutputRequest, 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, claim, clearInput, clearOutput, compareFirmwareVersion, dataEventEnabled, directIO, directIO, flagWhenIdle, freezeEvents, handlePowerStateOnEnable, newJposOutputRequest, powerNotify, release, removeFromPropertySetList, resetStatistics, retrieveStatistics, retryInput, retryOutput, unitDataCount, updateFirmware, updateFirmware, updateStatistics
-
Constructor Details
-
ToneIndicator
Constructor. Gets instance of Device to be used as communication object. Device index for sample is always 0.- Parameters:
dev
- Instance of Device this object belongs to.
-
-
Method Details
-
deviceEnabled
public void deviceEnabled(boolean enable) throws jpos.JposExceptionDescription copied from interface:JposBaseInterface
Final part of setting DeviceEnabled. Can be overwritten within derived classes. Performs initOnEnable method of corresponding property set in addition to setting DeviceEnabled. This method will be called only if the following plausibility checks lead to a positive result:- Device has not been closed,
- ExclusiveUse equals ExclusiveYes: Device is claimed,
- DeviceEnabled != enabled.
- Specified by:
deviceEnabled
in interfaceJposBaseInterface
- Overrides:
deviceEnabled
in classJposCommonProperties
- Parameters:
enable
- True to enable, false to disable- Throws:
jpos.JposException
- If an error occurs during enable or disable
-
open
public void open() throws jpos.JposExceptionDescription copied from interface:JposBaseInterface
Final part of open method. Can be overwritten in derived class, if necessary. sets State property and calls method initOnOpen of object specified by dev. This method will be called whenever the service's open method will be called. All checks, if necessary, must be implemented within the derived service implementation.- Specified by:
open
in interfaceJposBaseInterface
- Overrides:
open
in classJposCommonProperties
- Throws:
jpos.JposException
- See UPOS specification, method Open
-
close
public void close() throws jpos.JposExceptionDescription copied from interface:JposBaseInterface
Final part of close 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 neither enabled nor claimed.
- Specified by:
close
in interfaceJposBaseInterface
- Overrides:
close
in classJposCommonProperties
- Throws:
jpos.JposException
- See UPOS specification, method Close
-
checkHealth
public void checkHealth(int level) throws jpos.JposExceptionDescription copied from interface:JposBaseInterface
Final part of CheckHealth method. Can be overwritten in derived class, if necessary. Keep in mind that dvice class specific checks (e.g. check of Claimed or DeviceEnabled) must be done within derived classes. This method will be called only if the following plausibility checks lead to a positive result:- Device is neither enabled nor claimed.
- Specified by:
checkHealth
in interfaceJposBaseInterface
- Overrides:
checkHealth
in classJposCommonProperties
- Parameters:
level
- See UPOS specification, method CheckHealth- Throws:
jpos.JposException
- See UPOS specification, method CheckHealth
-
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
- Overrides:
sound
in classToneIndicatorProperties
- 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
-