Interface PointCardRWInterface
- All Superinterfaces:
JposBaseInterface
- All Known Implementing Classes:
PointCardRWProperties
Interface for methods that implement property setter and method calls for the PointCardRW device category.
For details about properties, methods and method parameters, see UPOS specification, chapter Point Card Reader / Writer.
Further details about error handling can be found in introduction - Device Behavior Models - Errors.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
beginInsertion(int timeout)
Final part of BeginInsertion method.void
beginRemoval(int timeout)
Final part of BeginRemoval method.void
characterSet(int code)
Final part of setting CharacterSet.void
Final part of DestroyWindow method.void
clearPrintWrite(int kind, int hposition, int vposition, int width, int height)
Final part of ClearPrintWrite method.void
Final part of EndInsertion method.void
Final part of EndRemoval method.void
lineChars(int chars)
Final part of setting LineChars.void
lineHeight(int height)
Final part of setting LineHeight.void
lineSpacing(int spacing)
Final part of setting LineSpacing.void
mapCharacterSet(boolean flag)
Final part of setting MapCharacterSet.void
mapMode(int mode)
Final part of setting MapMode.printWrite(int kind, int hposition, int vposition, String data)
Validation part of PrintWrite method.void
printWrite(PrintWrite request)
Final part of PrintWrite method.void
rotatePrint(int rotation)
Final part of RotatePrint method.void
tracksToRead(int tracks)
Final part of setting TracksToRead.void
tracksToWrite(int tracks)
Final part of setting TracksToWrite.void
validateData(PointCardRWService.EscAlignment escAlignment)
Validate alignment sequence.void
validateData(PointCardRWService.EscEmbedded escEmbedded)
Validate embedded data sequence.void
validateData(PointCardRWService.EscFontTypeface escFontTypeface)
Validate font typeface selection sequence.void
validateData(PointCardRWService.EscNormalize escNormalize)
Validate normalize escape sequence.void
validateData(PointCardRWService.EscScale escScale)
Validate print scale sequence.void
validateData(PointCardRWService.EscSimple escSimple)
Validate attribute setting sequences.void
validateData(PointCardRWService.EscUnderline escUnderline)
Validate combined underline printing sequence.void
validateData(PointCardRWService.EscUnknown printData)
Validate unknown sequence.void
validateData(PointCardRWService.PrintData printData)
Validate printable character sequence.void
validateData(String data)
Final part of DestroyWindow method.void
write1Data(String trackdata)
Final part of setting Write1Data.void
write2Data(String trackdata)
Final part of setting Write2Data.void
write3Data(String trackdata)
Final part of setting Write3Data.void
write4Data(String trackdata)
Final part of setting Write4Data.void
write5Data(String trackdata)
Final part of setting Write5Data.void
write6Data(String trackdata)
Final part of setting Write6Data.Methods 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
-
Method Details
-
characterSet
void characterSet(int code) throws jpos.JposExceptionFinal part of setting CharacterSet. 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,
- CapPrint is true,
- code equals one of the values specified in CharacterSetList.
- Parameters:
code
- New CharacterSet value- Throws:
jpos.JposException
- If an error occurs
-
lineChars
void lineChars(int chars) throws jpos.JposExceptionFinal part of setting LineChars. 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,
- CapPrint is true,
- chars is above zero but not above the maximum of all values specified in LineCharsList.
- Parameters:
chars
- New LineChars value- Throws:
jpos.JposException
- If an error occurs
-
lineHeight
void lineHeight(int height) throws jpos.JposExceptionFinal part of setting LineHeight. 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,
- CapPrint is true,
- height is above zero.
- Parameters:
height
- New LineHeight value- Throws:
jpos.JposException
- If an error occurs
-
lineSpacing
void lineSpacing(int spacing) throws jpos.JposExceptionFinal part of setting LineSpacing. 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,
- CapPrint is true,
- spacing is above zero.
- Parameters:
spacing
- New LineSpacing value- Throws:
jpos.JposException
- If an error occurs
-
mapCharacterSet
void mapCharacterSet(boolean flag) throws jpos.JposExceptionFinal part of setting MapCharacterSet. 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,
- CapPrint is true,
- CapMapCharacterSet is true or flag is false.
- Parameters:
flag
- New MapCharacterSet value- Throws:
jpos.JposException
- If an error occurs
-
mapMode
void mapMode(int mode) throws jpos.JposExceptionFinal part of setting MapMode. 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,
- mode is one of MM_DOTS, MM_TWIPS, MM_ENGLISH and MM_METRIC.
- Parameters:
mode
- New MapMode value- Throws:
jpos.JposException
- If an error occurs
-
tracksToRead
void tracksToRead(int tracks) throws jpos.JposExceptionFinal part of setting TracksToRead. 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,
- Only tracks that have been specified in CapTracksToRead are specified in tracks.
- Parameters:
tracks
- New TracksToRead value- Throws:
jpos.JposException
- If an error occurs
-
tracksToWrite
void tracksToWrite(int tracks) throws jpos.JposExceptionFinal part of setting TracksToWrite. 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,
- Only tracks that have been specified in CapTracksToWrite are specified in tracks.
- Parameters:
tracks
- New TracksToWrite value- Throws:
jpos.JposException
- If an error occurs
-
write1Data
Final part of setting Write1Data. 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,
- Bit PCRW_TRACK1 is set in TracksToWrite.
- Parameters:
trackdata
- New Write1Data value- Throws:
jpos.JposException
- If an error occurs
-
write2Data
Final part of setting Write2Data. 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,
- Bit PCRW_TRACK2 is set in TracksToWrite.
- Parameters:
trackdata
- New Write2Data value- Throws:
jpos.JposException
- If an error occurs
-
write3Data
Final part of setting Write3Data. 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,
- Bit PCRW_TRACK3 is set in TracksToWrite.
- Parameters:
trackdata
- New Write3Data value- Throws:
jpos.JposException
- If an error occurs
-
write4Data
Final part of setting Write4Data. 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,
- Bit PCRW_TRACK4 is set in TracksToWrite.
- Parameters:
trackdata
- New Write4Data value- Throws:
jpos.JposException
- If an error occurs
-
write5Data
Final part of setting Write5Data. 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,
- Bit PCRW_TRACK5 is set in TracksToWrite.
- Parameters:
trackdata
- New Write5Data value- Throws:
jpos.JposException
- If an error occurs
-
write6Data
Final part of setting Write6Data. 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,
- Bit PCRW_TRACK6 is set in TracksToWrite.
- Parameters:
trackdata
- New Write6Data value- Throws:
jpos.JposException
- If an error occurs
-
beginInsertion
void beginInsertion(int timeout) throws jpos.JposExceptionFinal part of BeginInsertion 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,
- No asynchronous output is in progress,
- timeout is above zero or FOREVER.
- Parameters:
timeout
- Maximum time to wait for card insertion.- Throws:
jpos.JposException
- If an error occurs.
-
beginRemoval
void beginRemoval(int timeout) throws jpos.JposExceptionFinal part of BeginRemoval 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,
- No asynchronous output is in progress,
- timeout is above zero or FOREVER.
- Parameters:
timeout
- Maximum time to wait for card insertion.- Throws:
jpos.JposException
- If an error occurs.
-
cleanCard
void cleanCard() throws jpos.JposExceptionFinal part of DestroyWindow 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,
- CapCleanCard is true.
- Throws:
jpos.JposException
- If an error occurs.
-
clearPrintWrite
void clearPrintWrite(int kind, int hposition, int vposition, int width, int height) throws jpos.JposExceptionFinal part of ClearPrintWrite 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,
- No asynchronous output is in progress,
- kind is 1, 2 or 3,
- if kind is 1 or 3:
- CapClearPrint is true,
- hposition and vposition are positive values,
- width and height are above -2.
- Parameters:
kind
- Parts of the point card that will be cleared. See UPOS specification.hposition
- The horizontal start position for erasing the printing area.vposition
- The vertical start position for erasing the printing area.width
- The width used for erasing the printing area.height
- The height used for erasing the printing area.- Throws:
jpos.JposException
- If an error occurs.
-
endInsertion
void endInsertion() throws jpos.JposExceptionFinal part of EndInsertion 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.
- Throws:
jpos.JposException
- If an error occurs.
-
endRemoval
void endRemoval() throws jpos.JposExceptionFinal part of EndRemoval 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.
- Throws:
jpos.JposException
- If an error occurs.
-
rotatePrint
void rotatePrint(int rotation) throws jpos.JposExceptionFinal part of RotatePrint 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,
- CapPrint is true,
- rotation is one of RP_NORMAL, RP_RIGHT90, RP_LEFT90 and RP_ROTATE180,
- The corresponding capability, CapRight90, CapLeft90 or CapRotate180, is true.
- Parameters:
rotation
- Requested rotation.- Throws:
jpos.JposException
- If an error occurs.
-
validateData
Final part of DestroyWindow 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,
- No asynchronous output is in progress,
- CapPrint is true.
The service developer has the choice:- data can be parsed to check whether whether parts are valid or contain conditions that require to throw a JposException with ErrorCode E_ILLEGAL or E_FAILURE and if not, to throw a JposException with ErrorCode 0. In this case, the other validateData methods should not be overriden.
- This method performs nothing. In that case, validation occurs for each escape sequence via the corresponding validateData method, and the other validation routines must be implemented if the default behavior do not match the needs.
- Parameters:
data
- Print data to be checked for validity.- Throws:
jpos.JposException
- If an error occurs.
-
printWrite
PrintWrite printWrite(int kind, int hposition, int vposition, String data) throws jpos.JposExceptionValidation part of PrintWrite 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,
- kind is 1, 2 or 3,
- if kind is 1 or 3:
- CapPrint is true,
- hposition and vposition are positive values.
- if kind is 2 or 3:
- Property TracksToWrite contains only tracks that are contained in CapTracksToWrite as well,
- The corresponding WritexData properties are not empty strings.
- Parameters:
kind
- Parts of the point card that will be written or printed. See UPOS specification.hposition
- The horizontal start position for printing.vposition
- The vertical start position for printing.data
- Print data.- Returns:
- PrintWrite object for use in final part.
- Throws:
jpos.JposException
- If an error occurs.
-
printWrite
Final part of PrintWrite method. Can be overwritten within derived classes, if necessary. The parameters of the method will be passed via a PrintWrite object. This method will be performed asynchronously. All plausibility checks have been made before, only runtime errors can occur.
If this method performs a write operation, it must set the write status of each track via method setWriteState of the give request to ensure that property WriteState1 and WriteState2 will be set correctly in error case. Otherwise, the status of all tracks specified via TracksToWrite will be set to SUCCESS on success and to E_FAILURE on failure.- Parameters:
request
- Output request object returned by validation method that contains all parameters to be used by PrintWrite.- Throws:
jpos.JposException
- If an error occurs.
-
validateData
Validate unknown sequence. Default is no support. If a device supports further sequences, this method must be overwritten. The following plausibility checks will be made before this method will be called:- CapPrint is true.
- Parameters:
printData
- EscUnknown object containing the sequence attributes.- Throws:
jpos.JposException
- For details, see UPOS method ValidateData.
-
validateData
Validate printable character sequence. ESC sequences have been filtered out. Default behavior is that all other characters with character code ≤ 0x20 are invalid. If a service should support more characters, this method must be overwritten.
The following plausibility checks will be made before this method will be called:- CapPrint is true.
- Parameters:
printData
- Data to be printed.- Throws:
jpos.JposException
- For details, see UPOS method ValidateData.
-
validateData
Validate embedded data sequence. For details, see UPOS specification of ESC|#E. Default behavior is that the given sequence is valid. The following plausibility checks will be made before this method will be called:- CapPrint is true.
- Parameters:
escEmbedded
- EscEmbedded object containing sequence attributes.- Throws:
jpos.JposException
- For details, see UPOS method ValidateData.
-
validateData
Validate font typeface selection sequence. For details, see UPOS specification of ESC|#fT. Default behavior is to support all type fonts specified in FontTypefaceList. The following plausibility checks will be made before this method will be called:- CapPrint is true,
- EscFontTypeface attribute is between 0 and the number of type face names specified in FontTypefaceList.
- Parameters:
escFontTypeface
- EscFontTypeface object containing the sequence attributes.- Throws:
jpos.JposException
- For details, see UPOS method ValidateData.
-
validateData
Validate alignment sequence. For details, see UPOS specification of ESC|xA. Default behavior is that the service supports centered and right aligned text. The following plausibility checks will be made before this method will be called:- CapPrint is true.
- Parameters:
escAlignment
- EscAlignment object that contains the sequence attributes.- Throws:
jpos.JposException
- For details, see UPOS method ValidateData.
-
validateData
Validate normalize escape sequence. For details, see UPOS specification of ESC|N. Should always be valid. Can be overwritten by service implementations. The following plausibility checks will be made before this method will be called:- CapPrint is true.
- Parameters:
escNormalize
- EscNormalize object containing the sequence attributes.- Throws:
jpos.JposException
- For details, see UPOS method ValidateData.
-
validateData
Validate attribute setting sequences. For details, see UPOS specification for ESC|bC, ESC|iC and ESC|rvC. The default behavior is that reverse video is not supported. If a printer supports these attributes, this method must be overwritten.
The following plausibility checks will be made before this method will be called:- CapPrint is true,
- If EscSimple attribute Bold is true, CapBold is true,
- If EscSimple attribute Italic is true, CapItalic is true.
- Parameters:
escSimple
- Object holding data of simple esc sequence- Throws:
jpos.JposException
- For details, see UPOS method ValidateData.
-
validateData
Validate combined underline printing sequence. For details, see UPOS specification for ESC|[#]uC. Default behavior is support for thickness of 1 dot for underline only. If a service does not support underline or supports another thickness, this method must be overwritten. The following plausibility checks will be made before this method will be called:- CapPrint is true.
- Parameters:
escUnderline
- EscUnderline object containing the sequence attributes.- Throws:
jpos.JposException
- For details, see UPOS method ValidateData.
-
validateData
Validate print scale sequence. For details, see UPOS specification for ESC|xC, ESC|#hC or ESC|#vC. Default behavior is only support for scale = 1 and 2 if the corresponding capabilities for width and height of the specified station are true. If a service supports more scales, this method must be overwritten. The following plausibility checks will be made before this method will be called:- CapPrint is true.
- If EscScale attribute ScaleValue is above 1, CapDhigh, CapDwide or CapDwideDhigh is true if the corresponding EscScale attribute(s) ScaleHorizontal and / or ScaleVertical is / are true.
- Parameters:
escScale
- EscScale object that holds the sequence specific attributes.- Throws:
jpos.JposException
- For details, see UPOS method ValidateData.
-