Class JposCommonProperties

java.lang.Object
de.gmxhome.conrad.jpos.jpos_base.JposCommonProperties
All Implemented Interfaces:
JposBaseInterface
Direct Known Subclasses:
BeltProperties, BillAcceptorProperties, BillDispenserProperties, BiometricsProperties, BumpBarProperties, CashChangerProperties, CashDrawerProperties, CATProperties, CheckScannerProperties, CoinAcceptorProperties, CoinDispenserProperties, DeviceMonitorProperties, ElectronicJournalProperties, ElectronicValueRWProperties, FiscalPrinterProperties, GateProperties, GestureControlProperties, GraphicDisplayProperties, HardTotalsProperties, ImageScannerProperties, IndividualRecognitionProperties, ItemDispenserProperties, KeylockProperties, LightsProperties, LineDisplayProperties, MICRProperties, MotionSensorProperties, MSRProperties, PINPadProperties, PointCardRWProperties, POSKeyboardProperties, POSPowerProperties, POSPrinterProperties, RemoteOrderDisplayProperties, RFIDScannerProperties, ScaleProperties, ScannerProperties, SignatureCaptureProperties, SmartCardRWProperties, SoundPlayerProperties, SoundRecorderProperties, SpeechSynthesisProperties, ToneIndicatorProperties, VideoCaptureProperties, VoiceRecognitionProperties

public abstract class JposCommonProperties extends Object implements JposBaseInterface
Class containing common properties, property defaults, several values necessary for common event handling and for standardized asynchronous method call processing and default implementations of JposBaseInterface.
For details about properties, methods and method parameters, see UPOS specification, chapter Common Properties, Methods and Events.

Default values of properties that will be initialized with a device specific value when method open will be called, must be directly set during object construction. Default values for all other properties must be set within method changeDefault in the device implementation class by setting the default value into a property with name PropertyNameDef. Whenever the corresponding property shall be initialized (e.g. during enable), the default value will be copied to the property.

  • Field Details

    • Device

      public JposDevice Device
      Instance of JposDevice implementation that has been bound to this property set.
    • CapStatisticsReporting

      public boolean CapStatisticsReporting
      UPOS property CapStatisticsReporting. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • CapUpdateStatistics

      public boolean CapUpdateStatistics
      UPOS property CapStatisticsReporting. Default: false. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • DeviceServiceDescription

      public String DeviceServiceDescription
      UPOS property DeviceServiceDescription. Default: "Default service implementation". Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • DeviceServiceVersion

      public int DeviceServiceVersion
      UPOS property DeviceServiceVersion. Default: 1016000. Can be overwritten by objects derived from JposDevice within the changeDefaults method.
    • State

      public int State
      UPOS property State.
    • AsyncMode

      public boolean AsyncMode
      UPOS property AsyncMode.
    • AutoDisable

      public boolean AutoDisable
      UPOS property AutoDisable.
    • FlagWhenIdle

      public boolean FlagWhenIdle
      UPOS property FlagWhenIdle.
    • CheckHealthText

      public String CheckHealthText
      UPOS property CheckHealthText.
    • Claimed

      public boolean Claimed
      UPOS property Claimed.
    • DataCount

      public int DataCount
      UPOS property DataCount.
    • DataEventEnabled

      public boolean DataEventEnabled
      UPOS property DataEventEnabled.
    • DeviceEnabled

      public boolean DeviceEnabled
      UPOS property DeviceEnabled.
    • FreezeEvents

      public boolean FreezeEvents
      UPOS property FreezeEvents.
    • OutputID

      public int OutputID
      UPOS property OutputID.
    • PowerNotify

      public int PowerNotify
      UPOS property PowerNotify.
    • PowerState

      public int PowerState
      UPOS property PowerState.
    • LogicalName

      public String LogicalName
      Logical device name. Passed by Open method.
    • CurrentUnitID

      public int CurrentUnitID
      UPOS property CurrentUnitID. Must be initialized at least in initOnFirstEnable method of derived class, if UsesSubsystemUnits is true.
    • ErrorString

      public String ErrorString
      UPOS property ErrorString.
    • ErrorUnits

      public int ErrorUnits
      UPOS property ErrorUnits.
    • EventString

      public String EventString
      UPOS property EventString.
    • EventUnitID

      public int EventUnitID
      UPOS property EventUnitID.
    • EventUnits

      public int EventUnits
      UPOS property EventUnits.
    • UnitsOnline

      public int UnitsOnline
      UPOS property UnitsOnline.
    • EventCB

      public jpos.services.EventCallbacks EventCB
      Object for event callbacks. Passed by Open method.
    • EventSource

      public JposBase EventSource
      Object to be used as source of Jpos events.
    • AllowAlwaysSetProperties

      public boolean AllowAlwaysSetProperties
      Storage for jpos.xml property AllowAlwaysSetProperties. Specifies how the service instance shall handle write access to writable properties while the device has not been claimed for exclusive-use devices:
      If true, setting such properties will remain possible and it is up to the service how to handle the new value. Since no physical access to the device is allowed until the device has been claimed, the service can buffer the new value for later use after a successful call of method claim.
      If false, only read access will be possible until the device has been claimed. If the application tries to change a writable property, a JposException will be thrown with error code E_NOTCLAIMED.
    • MaximumConfirmationEventWaitingTime

      public int MaximumConfirmationEventWaitingTime
      Maximum time in milliseconds an event callback may block event processing (default: FOREVER). Only conforms to UPOS specification if FOREVER. lower values can lead to concurrent processing of event coroutines.
    • StrictFIFOEventHandling

      public boolean StrictFIFOEventHandling
      Specifies whether event handling conforms strictly to UPOS specification (all events handled in a first-in-first-out mammer) or not (data and input error can be bypassed by other events as long as DataEventEnabled is false). Since strict UPOS conformance is impractical, the default is false.
    • ClaimWaiters

      public final List<SyncObject> ClaimWaiters
      List containing SyncObject instances to be signalled after releasing a claimed object. Whenever a service tries to claim a device which has been claimed before by another instance, if adds a SyncObject to this list and waits until the object will be signalled. During release or close, all objects within this list will be signalled to allow all waiting instances to try claiming again.
    • EventList

      public final List<jpos.events.JposEvent> EventList
      Event list, holds at least events until they can be fired. As long as DataEventEnabled = false, data events and (input) error events will be put into DataEventList instead.
    • DataEventList

      protected final List<jpos.events.JposEvent> DataEventList
      Event list, holds all data and input error events until they can be fired.
    • DevProps

      public List<JposCommonProperties> DevProps
      List of all property sets sharing the same UPOS device.
    • Index

      public int Index
      Device index. Must be betwen 0 and the number of devices of the device class that the driver supports minus one.
    • ExclusiveYes

      public static final int ExclusiveYes
      Value for ExclusiveUse. Must be set within derived classes that support only exclusive use.
      See Also:
      Constant Field Values
    • ExclusiveAllowed

      public static final int ExclusiveAllowed
      Value for ExclusiveUse. Must be set within derived classes that are sharable but allow exclusive use.
      See Also:
      Constant Field Values
    • ExclusiveNo

      public static final int ExclusiveNo
      Value for ExclusiveUse. Must be set within derived classes that are sharable and do not allow exclusive use.
      See Also:
      Constant Field Values
    • ExclusiveUse

      public int ExclusiveUse
      Specifies the device model the device supports. Default is ExclusiveYes.
    • UsesSubsystemUnits

      public boolean UsesSubsystemUnits
      Specifies whether the device class supports use of subsystem units. If true, the service implements a device class that supports the properties EventUnitID, EventUnits, EventText, ErrorUnits, ErrorText and UnitsOnline. Currently, this restricts usage to device class BumpBar and RemoteOrderDisplay.
    • FirstEnableHappened

      public boolean FirstEnableHappened
      Specifies whether first enable happened before.
    • Claiming

      public JposCommonProperties[] Claiming
      Array holding the property sets of the device service that claimed this device class.
    • FlagWhenIdleStatusValue

      public Integer FlagWhenIdleStatusValue
      Holds the value to be set in StatusUpdateEvents fired due to FlagWhenIdle = true
    • AllowDeprecatedMethods

      public boolean AllowDeprecatedMethods
      Flag that specifies whether the device supports deprecated methods in cases where UPOS specifies that a service may throw an exception with error code E_DEPRECATED. This is the case whenever deprecation started more than 2 minor release numbers before the current UPOS release. Since this implementation is for UPOS release 1.16, this affects methods that are deprecated since UPOS version 1.13 or earlier.
    • SuspendedCommands

      public List<JposOutputRequest> SuspendedCommands
      List holding asynchronous output requests whenever service is in error state.
    • CurrentCommands

      public List<JposOutputRequest> CurrentCommands
      Currently executed output requests if the service supports concurrent method execution. If a service supports concurrent method execution, it must set CurrentCommands to a non-null value.
    • SuspendedConcurrentCommands

      public List<JposOutputRequest> SuspendedConcurrentCommands
      List holding asynchronous output requests which allow concurrent processing whenever service is in error state.
    • SerializedRequestRunner

      public Runnable SerializedRequestRunner
      Runnable for serialized request processing.
    • SerializedRequests

      public List<Runnable> SerializedRequests
      Output request runners waiting for service-specific serialization of asynchronous processing.
    • AsyncInputActive

      public boolean AsyncInputActive
      State of asynchronous input processing. Will be set whenever asynchronous input request will be enqueued and reset when the last input operation has been finished.
  • Constructor Details

    • JposCommonProperties

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

    • checkProperties

      public void checkProperties(jpos.config.JposEntry entry) throws jpos.JposException
      Checks jpos entries for service specific jpos property values and set corresponding service values.
      Parameters:
      entry - JposEntry instance that contains all jpos properties for the device. Only service specific entries are of interest here, device specific entries should be processed by the corresponding checkProperties method of the device implementation derived from JposDevice.
      Throws:
      jpos.JposException - a service related property is invalid or a mandatory service related property is missing.
    • checkForDeprecation

      public void checkForDeprecation(int firstDeprecatedVersion, String message) throws jpos.JposException
      Checks whether a method may throw a JposException with error code JPOS_E_DEPRECATED.
      Parameters:
      firstDeprecatedVersion - Version when the method to be checked became deprecated.
      message - message to be used in JposException with JPOS_E_DEPRECATED will be thrown.
      Throws:
      jpos.JposException - If DeviceServiceVersion is more than two minor releases behind the deprecation and AllowDeprecatedMethods has not been set.
    • initOnOpen

      public void initOnOpen()
      Initialization of properties that must be initialized during open.
    • initOnEnable

      public void initOnEnable(boolean enable)
      Initialization of properties that must be initialized during deviceEnable.
      Parameters:
      enable - True: initialize properties, false: do nothing
    • initOnFirstEnable

      public boolean initOnFirstEnable()
      Initialize properties that must be initialized whenever the device will be enabled the first time-
      Returns:
      Returns true in case of first enable.
    • initOnClaim

      public void initOnClaim()
      Initialize properties that must be initialized whenever the device will be claimed.
    • clearDataProperties

      public void clearDataProperties()
      Clear data properties. Performed during ClearInput and ClearInputProperties.
    • clearErrorProperties

      public void clearErrorProperties()
      Clear error properties. Performed at the end of any error handling.
    • clearOutputErrorProperties

      public void clearOutputErrorProperties()
      Clear output error properties. Performed at the end of any output error handling. Must only be overwritten when different operation is necessary for input and output errors or if the device supports subsystem units.
    • addProperties

      public void addProperties(List<JposCommonProperties>[] props)
      Add this to the given array of property set lists. Index specifies to which list it will be added.
      Parameters:
      props - array of property set lists to be used
    • removeFromPropertySetList

      public void removeFromPropertySetList()
      remove this from the list of property sets.
      Specified by:
      removeFromPropertySetList in interface JposBaseInterface
    • attachWaiter

      public void attachWaiter()
      Attach SyncObject for status synchronization. Will be attached when a method needs to wait for a status change. After status changed, events derived from JposStatusUpdateEvents that support waiting for status change will signal the SyncObject after updating the corresponding properties. After being woken up, the previously waiting method should release the SyncObject as soon as possible.
    • releaseWaiter

      public void releaseWaiter()
      Release SyncObject for status synchronization. See attachWaiter for further details.
    • signalWaiter

      public void signalWaiter()
      Signals SyncObject for status synchronization. See attachWaiter for further details.
    • waitWaiter

      public boolean waitWaiter(long timeout)
      Suspend thread until SyncObject for status synchronization has been signalled. See attachWaiter for further details.
      Parameters:
      timeout - Maximum time to wait for status status change
      Returns:
      true when signalled, false otherwise (timeout / no SyncObject present)
    • getClaimingInstance

      public JposCommonProperties getClaimingInstance()
      Retrieves the property set of the service instance that claims the device.
      Returns:
      property set of claiming instance, null if no instance claims the device.
    • deviceEnabled

      public void deviceEnabled(boolean enable) throws jpos.JposException
      Description 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 interface JposBaseInterface
      Parameters:
      enable - True to enable, false to disable
      Throws:
      jpos.JposException - If an error occurs during enable or disable
    • freezeEvents

      public void freezeEvents(boolean freezeEvents) throws jpos.JposException
      Description copied from interface: JposBaseInterface
      Final part of setting FreezeEvents. Can be overwritten within derived classes, if necessary. Calls processEventList and processDataEventList in addition to setting FreezeEvents. This method will be called only if the following plausibility checks lead to a positive result:
      • Device has not been closed.
      Specified by:
      freezeEvents in interface JposBaseInterface
      Parameters:
      freezeEvents - False to enable, true to disable event delivery
      Throws:
      jpos.JposException - If an error occurs during enable or disable
    • powerNotify

      public void powerNotify(int powerNotify) throws jpos.JposException
      Description copied from interface: JposBaseInterface
      Final part of setting PowerNotify. Can be overwritten within derived classes. This method will be called only if the following plausibility checks lead to a positive result:
      • Device has not been closed,
      • Device is not enabled,
      • powerNotify is PN_DISABLED or PN_ENABLED,
      • CapPowerReporting is not PR_NONE or powerNotify is PN_DISABLED.
      If powerNotify equals PN_DISABLED, PowerState will be set to PS_UNKNOWN after this method returns.
      Specified by:
      powerNotify in interface JposBaseInterface
      Parameters:
      powerNotify - New property value
      Throws:
      jpos.JposException - If an error occurs while setting the property
    • autoDisable

      public void autoDisable(boolean b) throws jpos.JposException
      Description copied from interface: JposBaseInterface
      Final part of setting AutoDisable. Can be overwritten within derived classes. This method will be called only if the following plausibility checks lead to a positive result:
      • Device has not been closed.
      Specified by:
      autoDisable in interface JposBaseInterface
      Parameters:
      b - New property value
      Throws:
      jpos.JposException - If an error occurs while setting the property
    • asyncMode

      public void asyncMode(boolean b) throws jpos.JposException
      Description copied from interface: JposBaseInterface
      Final part of setting AsyncMode. Can be overwritten within derived classes. This method will be called only if the following plausibility checks lead to a positive result:
      • Device is enabled.
      Specified by:
      asyncMode in interface JposBaseInterface
      Parameters:
      b - New property value
      Throws:
      jpos.JposException - If an error occurs while setting the property.
    • dataEventEnabled

      public void dataEventEnabled(boolean b) throws jpos.JposException
      Description copied from interface: JposBaseInterface
      Final part of setting DataEventEnabled. Can be overwritten within derived classes. Calls processDataEventList in addition to setting DataEventEnabled This method will be called only if the following plausibility checks lead to a positive result:
      • Device has not been closed.
      Specified by:
      dataEventEnabled in interface JposBaseInterface
      Parameters:
      b - New property value
      Throws:
      jpos.JposException - If an error occurs while setting the property DataEventEnabled.
    • flagWhenIdle

      public void flagWhenIdle(boolean b) throws jpos.JposException
      Description copied from interface: JposBaseInterface
      Final part of setting FlagWhenIdle. Can be overwritten within derived classes. Setting it to true will be processed only if State is neither S_ERROR nor S_BUSY. Otherwise, a StatusUpdateEvent with the device type specific FlagWhenIdle status value will be generated and FlagWhenIdle remains false. This method will be called only if the following plausibility checks lead to a positive result:
      • Device has been enabled.
      Specified by:
      flagWhenIdle in interface JposBaseInterface
      Parameters:
      b - New property value
      Throws:
      jpos.JposException - If an error occurs while setting the property FlagWhenIdle.
    • unitDataCount

      public int unitDataCount()
      Description copied from interface: JposBaseInterface
      Counts enqueued data events of subsystem unit specified by CurrentUnitID.
      Specified by:
      unitDataCount in interface JposBaseInterface
      Returns:
      Number of enqueued data events from subsystem unit specified by CurrentUnitID.
    • claim

      public void claim(int timeout) throws jpos.JposException
      Description copied from interface: JposBaseInterface
      Final part of setting claim. Can be overwritten within derived classes. This method will be called only if the following plausibility checks lead to a positive result:
      • Device has not been closed,
      • The device is not claimed,
      • ExclusiveUse dos not equal ExclusiveNo,
      • timeout is negative not equal to FOREVER.
      Specified by:
      claim in interface JposBaseInterface
      Parameters:
      timeout - see UPOS specification, method Claim
      Throws:
      jpos.JposException - If an error occurs while claiming the device
    • close

      public void close() throws jpos.JposException
      Description 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 interface JposBaseInterface
      Throws:
      jpos.JposException - See UPOS specification, method Close
    • checkHealth

      public void checkHealth(int level) throws jpos.JposException
      Description 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 interface JposBaseInterface
      Parameters:
      level - See UPOS specification, method CheckHealth
      Throws:
      jpos.JposException - See UPOS specification, method CheckHealth
    • directIO

      public DirectIO directIO(int command, int[] data, Object object) throws jpos.JposException
      Description copied from interface: JposBaseInterface
      Final or validation part of DirectIO 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:
      • data is an integer array with length 1 or null, if data will not be used in case of the given command.
      All other checks, if necessary, must be implemented within the derived service implementation.
      In case of validation only (asynchronous mode), a DirectIO object created with command, data[0] and object as parameters must be returned.
      Specified by:
      directIO in interface JposBaseInterface
      Parameters:
      command - See UPOS specification, method DirectIO
      data - See UPOS specification, method DirectIO
      object - See UPOS specification, method DirectIO
      Returns:
      DirectIO object for use in final part or null if method has been performed synchronously.
      Throws:
      jpos.JposException - See UPOS specification, method DirectIO.
    • directIO

      public void directIO(DirectIO request) throws jpos.JposException
      Description copied from interface: JposBaseInterface
      Final part of DirectIO method. Can be overwritten within derived classes, if necessary. The parameters of the method will be passed via a DirectIO object. This method will be called when the corresponding operation shall be performed asynchronously. All plausibility checks have been made before, only runtime errors can occur.
      This method will only be called if the validation method threw a JposException with ErrorCode = 0.
      Specified by:
      directIO in interface JposBaseInterface
      Parameters:
      request - Output request object that contains all parameters to be used by ReadWeight.
      Throws:
      jpos.JposException - If an error occurs.
    • open

      public void open() throws jpos.JposException
      Description 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 interface JposBaseInterface
      Throws:
      jpos.JposException - See UPOS specification, method Open
    • release

      public void release() throws jpos.JposException
      Description copied from interface: JposBaseInterface
      Final part of release 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 claimed,
      • ExclusiveUse equals ExclusiveYes: Device is not enabled.
      Specified by:
      release in interface JposBaseInterface
      Throws:
      jpos.JposException - See UPOS specification, method Release
    • clearInput

      public void clearInput() throws jpos.JposException
      Description copied from interface: JposBaseInterface
      Clear input processing: Clear data event list, clear data event count, set State to idle. 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.
      Specified by:
      clearInput in interface JposBaseInterface
      Throws:
      jpos.JposException - See UPOS specification, method ClearInput
    • retryInput

      public void retryInput() throws jpos.JposException
      Description copied from interface: JposBaseInterface
      Initiates input retrieval. Must be overwritten in devices that support retrying input operation.
      Specified by:
      retryInput in interface JposBaseInterface
      Throws:
      jpos.JposException - Should never be thrown. Instead, the retryInput implementation should generate an ErrorEvent whenever retryInput fails. The application should set ErrorResponse of that ErrorEvent after some unsuccessful retries.
    • newJposOutputRequest

      public JposOutputRequest newJposOutputRequest()
      Description copied from interface: JposBaseInterface
      Class factory for JposOutputRequests.
      Specified by:
      newJposOutputRequest in interface JposBaseInterface
      Returns:
      A new instance of JposOutputRequest or a derived class.
    • clearOutput

      public void clearOutput() throws jpos.JposException
      Description copied from interface: JposBaseInterface
      Clear output processing. Removes all OutputCompleteEvents and ErrorEvents from event queue and sets State to S_IDLE. Clears all outstanding commands of the given property set as well. 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.
      Specified by:
      clearOutput in interface JposBaseInterface
      Throws:
      jpos.JposException - See UPOS specification, method ClearOutput
    • retryOutput

      public void retryOutput() throws jpos.JposException
      Description copied from interface: JposBaseInterface
      Initiates output retrieval. Must be overwritten in devices that support retrying output operations.
      Specified by:
      retryOutput in interface JposBaseInterface
      Throws:
      jpos.JposException - Should never be thrown. Since retryOutput should only re-add the previously suspended requests to the request queue and - if necessary - restart the JposOutputRequest handler, a JposException should not be necessary.
    • compareFirmwareVersion

      public void compareFirmwareVersion(String firmwareFileName, int[] result) throws jpos.JposException
      Description copied from interface: JposBaseInterface
      Final part of CompareFirmwareVersion 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,
      • CapCompareFirmwareVersion is true.
      Specified by:
      compareFirmwareVersion in interface JposBaseInterface
      Parameters:
      firmwareFileName - See UPOS specification, method CompareFirmwareVersion.
      result - See UPOS specification, method CompareFirmwareVersion.
      Throws:
      jpos.JposException - See UPOS specification, method CompareFirmwareVersion
    • updateFirmware

      public UpdateFirmware updateFirmware(String firmwareFileName) throws jpos.JposException
      Description copied from interface: JposBaseInterface
      Final or validation part of UpdateFirmware 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,
      • CapUpdateFirmware is true.
      In case of successful validation, an UpdateFirmware object created with firmwareFileName as parameters must be returned because updateFirmware will always be performed asynchronously.
      Specified by:
      updateFirmware in interface JposBaseInterface
      Parameters:
      firmwareFileName - See UPOS specification, method UpdateFirmware
      Returns:
      UpdateFirmware object for use in final part.
      Throws:
      jpos.JposException - See UPOS specification, method UpdateFirmware
    • updateFirmware

      public void updateFirmware(UpdateFirmware request) throws jpos.JposException
      Description copied from interface: JposBaseInterface
      Final part of UpdateFirmware method. Can be overwritten within derived classes, if necessary. The parameters of the method will be passed via an UpdateFirmware object. All plausibility checks have been made before, only runtime errors can occur.
      The result of this method will always be provided by the framework via StatusUpdateEvent. Its Status property can be set as follows:
      • If the method ends normally, Status will be SUE_UF_COMPLETE.
      • If the method ends with a JposException with ErrorCodeExtended set to SUE_UF_COMPLETE, SUE_UF_COMPLETE_DEV_NOT_RESTORED, SUE_UF_FAILED_DEV_OK, SUE_UF_FAILED_DEV_UNRECOVERABLE, SUE_UF_FAILED_DEV_NEEDS_FIRMWARE or SUE_UF_FAILED_DEV_UNKNOWN, Status will be set to ErrorCodeExtended.
      • In case of any other exception, Status will be set to the value stored in the Result property of request. The default is SUE_UF_FAILED_DEV_UNKNOWN, but can be changed via method setResult of request.
      Specified by:
      updateFirmware in interface JposBaseInterface
      Parameters:
      request - Output request object that contains all parameters to be used by ReadWeight.
      Throws:
      jpos.JposException - If an error occurs.
    • resetStatistics

      public void resetStatistics(String statisticsBuffer) throws jpos.JposException
      Description copied from interface: JposBaseInterface
      Final part of ResetStatistics 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,
      • CapUpdateStatistics and CapStatisticsReporting are true.
      Specified by:
      resetStatistics in interface JposBaseInterface
      Parameters:
      statisticsBuffer - See UPOS specification, method ResetStatistics
      Throws:
      jpos.JposException - See UPOS specification, method ResetStatistics
    • retrieveStatistics

      public void retrieveStatistics(String[] statisticsBuffer) throws jpos.JposException
      Description copied from interface: JposBaseInterface
      Final part of RetrieveStatistics 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,
      • CapStatisticsReporting are true,
      • statisticsBuffer is not null.
      Specified by:
      retrieveStatistics in interface JposBaseInterface
      Parameters:
      statisticsBuffer - See UPOS specification, method RetrieveStatistics
      Throws:
      jpos.JposException - See UPOS specification, method RetrieveStatistics
    • updateStatistics

      public void updateStatistics(String statisticsBuffer) throws jpos.JposException
      Description copied from interface: JposBaseInterface
      Final part of UpdateStatistics 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,
      • CapUpdateStatistics and CapStatisticsReporting are true.
      Specified by:
      updateStatistics in interface JposBaseInterface
      Parameters:
      statisticsBuffer - See UPOS specification, method UpdateStatistics
      Throws:
      jpos.JposException - See UPOS specification, method UpdateStatistics
    • handlePowerStateOnEnable

      public void handlePowerStateOnEnable() throws jpos.JposException
      Description copied from interface: JposBaseInterface
      Will be called whenever DeviceEnabled will be set to true if power notification is enabled (PowerNotify = PN_ENABLED). Should update the PowerState property. Further processing like firing a StatusUpdateEvent is not necessary, this will be made by the framework automatically.
      Specified by:
      handlePowerStateOnEnable in interface JposBaseInterface
      Throws:
      jpos.JposException - If an error occurs.