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, TransitNumberFields 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 TypeMethodDescriptionvoidbeginInsertion(int timeout)Final part of BeginInsertion method.voidbeginRemoval(int timeout)Final part of BeginRemoval method.voidcheckHealth(int level)Final part of CheckHealth method.voidclaim(int timeout)Final part of setting claim.voidFinal part of EndInsertion method.voidWill be called whenever DeviceEnabled will be set to true if power notification is enabled (PowerNotify = PN_ENABLED).voidrelease()Final part of release method.Methods inherited from class de.gmxhome.conrad.jpos.jpos_base.micr.MICRProperties
checkBusy, checkNoData, clearDataProperties, endRemoval, initOnOpenMethods 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, 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, 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:JposBaseInterfaceFinal 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:
claimin interfaceJposBaseInterface- Overrides:
claimin 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:JposBaseInterfaceFinal 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:
releasein interfaceJposBaseInterface- Overrides:
releasein classJposCommonProperties- Throws:
jpos.JposException- See UPOS specification, method Release
-
handlePowerStateOnEnable
public void handlePowerStateOnEnable() throws jpos.JposExceptionDescription copied from interface:JposBaseInterfaceWill 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:
handlePowerStateOnEnablein interfaceJposBaseInterface- Overrides:
handlePowerStateOnEnablein classJposCommonProperties- Throws:
jpos.JposException- If an error occurs.
-
checkHealth
public void checkHealth(int level) throws jpos.JposExceptionDescription copied from interface:JposBaseInterfaceFinal 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:
checkHealthin interfaceJposBaseInterface- Overrides:
checkHealthin 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:MICRInterfaceFinal 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:
beginInsertionin interfaceMICRInterface- Overrides:
beginInsertionin 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:MICRInterfaceFinal 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:
endInsertionin interfaceMICRInterface- Overrides:
endInsertionin classMICRProperties- Throws:
jpos.JposException- See UPOS specification, method EndInsertion.
-
beginRemoval
public void beginRemoval(int timeout) throws jpos.JposExceptionDescription copied from interface:MICRInterfaceFinal 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:
beginRemovalin interfaceMICRInterface- Overrides:
beginRemovalin classMICRProperties- Parameters:
timeout- See UPOS specification, method BeginRemoval.- Throws:
jpos.JposException- See UPOS specification, method DisplayText.
-