Package SampleMICR
Class MICR
- All Implemented Interfaces:
JposBaseInterface
,MICRInterface
Class derived from MICRProperties that implements the MICRInterface for the sample magnetic ink character
recognition reader.
The following commands of the sample MICR simulator will be used:
< ttttttttt < aaaaaaaaaaaaaaa ; ssss LF
where
- I: The command to open the cheque slot for MICR reading,
- R: The command to close the cheque slot for MICR reading.
< ttttttttt < aaaaaaaaaaaaaaa ; ssss LF
where
- <: The Transit character. Will be replaced by t in property RawData due to UPOS convention,
- ttttttttt: The left justified maximum 9 digit transit number,
- aaaaaaaaaaaaaaa: The right justified maximum 15 digit account number, filled with spaces,
- ;: The On-Us character. Will be replaced by o in property RawData due to UPOS convention,
- ssss: The 4 digit special information field, for example a cheque count,
- LF: A newline character (0Ah), used as frame terminator.
-
Field Summary
Fields inherited from class de.gmxhome.conrad.jpos.jpos_base.micr.MICRProperties
AccountNumber, Amount, BankNumber, CapValidationDevice, CheckType, CountryCode, EPC, InsertionMode, RawData, RemovalMode, SerialNumber, TransitNumber
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
beginInsertion(int timeout)
Final part of BeginInsertion method.void
beginRemoval(int timeout)
Final part of BeginRemoval method.void
checkHealth(int level)
Final part of CheckHealth method.void
claim(int timeout)
Final part of setting claim.void
Final part of EndInsertion method.void
Will be called whenever DeviceEnabled will be set to true if power notification is enabled (PowerNotify = PN_ENABLED).void
release()
Final part of release method.Methods inherited from class de.gmxhome.conrad.jpos.jpos_base.micr.MICRProperties
checkBusy, checkNoData, clearDataProperties, endRemoval, initOnOpen
Methods inherited from class de.gmxhome.conrad.jpos.jpos_base.JposCommonProperties
addProperties, asyncMode, attachWaiter, autoDisable, checkForDeprecation, checkProperties, clearErrorProperties, clearInput, clearOutput, clearOutputErrorProperties, close, compareFirmwareVersion, dataEventEnabled, deviceEnabled, directIO, directIO, flagWhenIdle, freezeEvents, getClaimingInstance, initOnClaim, initOnEnable, initOnFirstEnable, newJposOutputRequest, open, powerNotify, 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, clearInput, clearOutput, close, compareFirmwareVersion, dataEventEnabled, deviceEnabled, directIO, directIO, flagWhenIdle, freezeEvents, newJposOutputRequest, open, powerNotify, removeFromPropertySetList, resetStatistics, retrieveStatistics, retryInput, retryOutput, unitDataCount, updateFirmware, updateFirmware, updateStatistics
-
Constructor Details
-
MICR
The constructor. Gets the Device object that implements the device communication as parameter. The device index used by the sample device is always 0.- Parameters:
dev
- Instance of Device this object belongs to.
-
-
Method Details
-
claim
public void claim(int timeout) throws jpos.JposExceptionDescription 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 interfaceJposBaseInterface
- Overrides:
claim
in classJposCommonProperties
- Parameters:
timeout
- see UPOS specification, method Claim- Throws:
jpos.JposException
- If an error occurs while claiming the device
-
release
public void release() throws jpos.JposExceptionDescription 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 interfaceJposBaseInterface
- Overrides:
release
in classJposCommonProperties
- Throws:
jpos.JposException
- See UPOS specification, method Release
-
handlePowerStateOnEnable
public void handlePowerStateOnEnable() throws jpos.JposExceptionDescription 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 interfaceJposBaseInterface
- Overrides:
handlePowerStateOnEnable
in classJposCommonProperties
- Throws:
jpos.JposException
- If an error occurs.
-
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
-
beginInsertion
public void beginInsertion(int timeout) throws jpos.JposExceptionDescription copied from interface:MICRInterface
Final part of BeginInsertion method. 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,
- checkBusy did not throw an exception,
- The timeout is ≥ 0 or JPOS_FOREVER.
- Specified by:
beginInsertion
in interfaceMICRInterface
- Overrides:
beginInsertion
in classMICRProperties
- Parameters:
timeout
- See UPOS specification, method BeginInsertion.- Throws:
jpos.JposException
- See UPOS specification, method DisplayText.
-
endInsertion
public void endInsertion() throws jpos.JposExceptionDescription copied from interface:MICRInterface
Final part of EndInsertion method. 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,
- checkBusy did not throw an exception,
- Device is not in insertion mode,
- Specified by:
endInsertion
in interfaceMICRInterface
- Overrides:
endInsertion
in classMICRProperties
- Throws:
jpos.JposException
- See UPOS specification, method EndInsertion.
-
beginRemoval
public void beginRemoval(int timeout) throws jpos.JposExceptionDescription copied from interface:MICRInterface
Final part of BeginRemoval method. 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,
- checkBusy did not throw an exception,
- The timeout is ≥ 0 or JPOS_FOREVER.
- Specified by:
beginRemoval
in interfaceMICRInterface
- Overrides:
beginRemoval
in classMICRProperties
- Parameters:
timeout
- See UPOS specification, method BeginRemoval.- Throws:
jpos.JposException
- See UPOS specification, method DisplayText.
-