Welch AllynData Collection, Inc. (d/b/a Hand Held Products) reserves the right to make changes in specifications and other
information contained in this document without prior notice, and the reader should in all cases consult Hand Held Products to
determine whether any such changes have been made. The information in this publication does not represent a commitment on
the part of Hand Held Products.
Hand Held Products shall not be liable for technical or editorial errors or omissions contained herein; nor for incidental or
consequential damages resulting from the furnishing, performance, or use of this material.
This document contains proprietary information which is protected by copyright. All rights are reserved. No part of this document
may be photocopied, reproduced, or translated into another language without the prior written consent of Hand Held Products.
2000-2001 Welch Allyn Data Collection, Inc. All rights reserved.
Web Address: www.handheld.com
PenWare100 and PenWare1500 are registered trademarks of @pos.com.
Microsoft Visual C/C++, MS-DOS, Windows 95, Windows 98, Windows 2000, and Windows NT are either registered trademarks
or trademarks of Microsoft Corporation in the United States and/or other countries.
Other product names mentioned in this document may be trademarks or registered trademarks of other companies and are the
property of their respective owners.
Table of Contents
Chapter 1 - Introduction and Installation
Introducing Hand Held Products PadCom Library .............................................................................1-1
Features of PadCom Library.........................................................................................................1-1
Hand Held Products Transaction Team Terminals Supported by PadCom..................................1-1
PadCom Signature Capture Sample for DOS:.....................................................................................5-1
PadCom Signature Capture Sample for Windows 3.x: .......................................................................5-3
PadCom Signature Capture Sample for Windows95/NT ....................................................................5-8
PadCom Sample Source Code for the Magnetic Stripe Reader (MSR) ............................................5-12
PadCom MSR Sample Code for DOS: .......................................................................................5-12
PadCom MSR Sample Code for Win 3.x ...................................................................................5-17
PadCom MSR Sample Code for Win 95/NT:.............................................................................5-29
iv
1
Introduction and Installation
Introducing Hand Held Products PadCom Library
PadCom library by Hand Held Products is a tool that allows developers to interface to Transaction Team units easily and
quickly. Developers can use PadCom library to capture signatures, read MSR, perform PINpad transactions, display text or
bitmaps, and write innovative graphical interfaces. By leveraging on Hand Held Products’ position as a leader in signature
capture technology, you can rest assured that your application will provide accurate and quality results with minimal
programming efforts.
Features of PadCom Library
Hand Held Products’ PadCom library includes the following key features:
• Full interface to all Transaction Team devices.
• Flexible architecture to support a wide variety of development needs.
• Simple, easy to use command set for rapid applications development.
• Consistent cross-platform APIs for enhanced portability.
• Accurate representation of image points.
• Interrupt/message driven engine for quick response to hardware activities.
• Reliable implementation of RS-232 serial communications protocol.
• Automatic detection of connected Transaction Team unit and automatic configuration.
In addition, PadCom library has been designed to work seamlessly with Transaction Team SigKit1, the signature processing
library for a complete signature capture solution.
Hand Held Products Transaction Team Terminals Supported by PadCom
PadCom contains full support for the Transaction Team 1500 and the Transaction Team 3100 Series.
PadCom Interface
The following diagram represents the PadCom interface to Transaction Team units.
PadCom
MS-DOS, Windows 3.X, Windows 95, 98,
Transaction Team Functional Implementation
RS-232 Protocol Implementation
The diagram shows how PadCom communicates with the Transaction Team unit. The functional implementation of a
Transaction Team device is implemented on top of the RS-232 protocol implementation. PadCom then communicates to
the device over the supported operating systems platforms, which include MS-DOS
Windows
Products recommends that you use the built-in driver. You do not have any direct access to internal firmware in the
Transaction Team units.
®
98, Windows®2000, and Windows NT®. Although it is possible to use other RS-232 implementations, Hand Held
Operating System
2000, Windows NT
Transaction Team Firmware
Transaction Team Unit
®
, Windows®3.x, Windows®95,
1. For more information about the SigKit library and other development tools, please contact your Hand Held Products sales representative.
1-1
Installation
Hand Held Products’ PadCom Library comes bundled as a set of static libraries with operating system dependent (MS-
®
,WIN16,andWIN32®) and compiler dependent (Microsoft®and Borland®) solutions available for your use. PadCom
DOS
is part of the Software Development Kit (SDK) which is available in 16-bit or 32-bit versions, and is included on the
Transaction Team 1500 and Transaction Team 3100 Series software suite CDs. The SDK installation program is a simple
to use InstallShield
refer to the Startup Guide you received with your hardware for instructions on software installation. For further information
on other components of the SDK, see the SDK Roadmap document which is available upon installation of the SDK.
®
application. It allows you to selectively install the desired components and sample programs. Please
Transaction Team Device Overview
The device’s pad surface is composed of a large number of individual points or “pixels,” as are video monitors, printers and
other devices. Because the library is designed to maintain the integrity of the input points, it does NOT distort the image by
adjusting for squareness. Therefore, when using points obtained, it is important to understand both the mapping of the pad
surface and the concept of aspect ratios. In addition, the methods used to represent pen strokes must be considered.
The points on the pad are specified by using a pair of horizontal and vertical coordinates (referred to as X and Y coordinates,
respectively). The origin of the coordinates is at the top/left corner and increases in a positive direction toward the bottom/
right. Therefore, the coordinate pair “0,0” is at top/left corner; “0,100” is 100 points down, “100,0” is 100 points to the right;
and “100,100” is both 100 points to the right and 100 points down. The actual coordinates of the bottom/right corner can be
represented as padWidth()-1, padHeight()-1, or obtained by using the padGetArea function (page 3-10).
x0,y0x100,y0
x0,y100x100,y100
X
Aspect Ratio Considerations
Y
Since the points returned by the library represent the actual points on the physical pad device, it is necessary to understand
the concept of “aspect ratios.” Basically, an aspect ratio refers to the difference between the width and height of the physical
points. For example, a 1:1 ratio means that the width and height of a point are the same and that the point is perfectly square.
Similarly, an aspect ratio of 2:1 means that a point is twice as wide as it is high. This is important because a shape that
appears square when created at, for example, a 2:1 aspect ratio, will appear vertically stretched when viewed at an aspect
ratio of 1:1. The aspect ratio of the pad surface is represented by the ratio between horizontal and vertical “dots-per-inch”
and can be obtained by using the functions padHorzDPI (page 3-23), and padVertDPI (page 3-66), respectively. To
maintain proper aspect ratios when drawing the points on the screen or other device, the library provides functions such as
padScaleDPI (page 3-47) to facilitate aspect ratio adjustment.
Representing Pen Strokes
While a single point consists of a single horizontal and vertical coordinate, a pen stroke consists of all the points received
from the time the pen comes into contact with the pad through the time it is removed. A typical stroke contains many points.
The first point, referred to as a “moveto” point, indicates where the pen was first placed in contact with the pad. Remaining
points, referred to as “lineto” points, indicate that the pen is being dragged across the pad surface. Consequently, the
padGet function (page 3-9) retrieves a “moveto/lineto” pen indicator as well as the corresponding coordinates.
1-2
Illustration of two pen strokes:
4,1
4,4
3,2
5,2
Move to 4,1
begin first stroke
Line to 4,4
continue first stroke
Move to 3,2
begin a new stroke
Line to 5,2
continue new stroke
Using PadCom
PadCom provides an interface that can be fully customized to Transaction Team pads. An operating system-dependent set
of libraries are provided which use the most popular compilers to support a wide variety of development needs. For example,
for the Windows 3.x operating system, a separate set of three libraries is compiled using Borland C++ and Microsoft
®
compilers. In addition to this, various memory models and thread support is provided wherever applicable.
C++
PadCom consists of statically linked libraries. This means that the application development needs to be carried out in the
following stages:
®
Visual
Implementation
Before proceeding with the design specifications, it is recommended that you study the functionality supported by the chosen
Transaction Team device. A complete list of functions exposed by PadCom is provided in the
on page 2-1.
See
Sample Source Code
functions. The same sample source code is also provided as a part of the sample application code installed with the SDK
components. These samples are intended for demo purposes only and do not necessarily perform useful tasks. However,
they provide a basis on which you can build complex and meaningful Point Of Sale (POS) applications.
beginning on page 5-1 for an example of how to use the PadCom library and the exposed API
Compiling and Linking
Library Reference
beginning
Compiling and linking your application involves selecting the appropriate libraries and choosing the correct build environment
on the compiler of your choice. As mentioned before, a complete operating system and compiler-dependent solution is
available for your use. The libraries are named using a standard naming convention.
For MS-DOS
padcomds.lib padcomdm.lib and padcomdl.lib are available to support the small, medium and the large memory models.
®
For Microsoft®Windows®3.x
padcomws.lib padcomwm.lib and padcomwl.lib are available to support the small, medium and the large memory models.
1-3
For Microsoft®Windows®95/98/2000/NT
padcomw.lib and padcomwt.lib1are available.
Select the supported library and add it to the project. Add the common header file padcom.h or else the program will not
compile correctly. Transaction Team libraries are not differentiated based on the type of compiler used. For example,
padcomds.lib is available for both the Borland C++ and Microsoft
correct library. The automatic installation program puts these libraries in clearly marked folders.
Make sure the compiler settings comply with the memory model (or the thread option wherever applicable). Failure to do so
can result in unpredictable program failures.
®
Visual C++®compilers. It is your responsibility to use the
Troubleshooting
Application development always involves debugging your application code. Hand Held Products has put together a highly
competent Technical Support Team to help you troubleshoot your applications quickly. However, there is some simple
troubleshooting that you can do on your end before calling Technical Support at Hand Held Products.
Hand Held Products strongly recommends that you always run the sample test programs you installed while installing the
library components. Call Hand Held Products immediately if any of these sample programs do not work on the intended
operating systems.
If the sample test programs work, but your applications do not, re-check the compiler settings, used libraries, and the sample
code. Before you call Hand Held Products Technical Support, note the operating system, environment, compilers, compiler
settings, used libraries, and other information that you think may be useful or relevant. This will help the Technical Support
personnel quickly diagnose and/or make recommendations.
Help Desk
If you need assistance installing or troubleshooting your software, please call your Distributor or the nearest Hand Held
Products technical support office:
1. PadComwt.lib is available for the Microsoft compiler only.
1-4
2
Library Reference
Library Functions List by Transaction Team Pad Compatibility
A blank in the model column indicates that the function is not supported for that model.
FunctionTT1500TT3100 Series
padBinaryGetTableXX
padBinaryGetVarXX
padBoxXX
padClearXX
padClearPixelX
padComDateXX
padComVersionXX
padConnectXX
padConnectClearScreenXX
padDisplayObjectX
padDisplayTimeX
padEchoCommX
padEraseTableXX
padFieldButtonX
padFieldSignatureXX
padFlushXX
padFormDeleteFldX
padFormSaveFldX
padFrameXX
padGetXX
padGetAllMagCardTracksX
padGetBaudRateXX
padGetAreaXX
padGetBkColorX
padGetCmdSetIDX
padGetColorX
padGetColorsX
padGetConnectTimeoutXX
padGetDefaultBaudRateX
padGetDUKPTbinaryPINX
padGetDUKPTtextPINX
padGetFontXX
padGetFontSizeX
padGetInTimeoutXX
padGetMagTrackX
padGetMasterSessionBinaryPINX
2-1
FunctionTT1500TT3100 Series
padGetMasterSessionTextPINX
padGetMaxCardTracksX
padGetMaxCardTrackSizeX
padGetModelXX
padGetNumVarXX
padGetOutTimeoutXX
padGetPageXX
padGetPortXX
padGetPortAddrXX
padGetPortIrqXX
padGetPortsXX
padGetScanRateX
padGetTableItemXX
padGetVersionXX
padHeightXX
padHideTimeX
padHorzDPIXX
padInkExportXX
padInvertX
padIsKeyX
padIsLcdXX
padIsNewStrokeXX
padIsaResetXX
padIsOnXX
padIsPenDownXX
padIsRecordXX
padLcdHeightXX
padLcdHorzDPIXX
padLcdVertDPIXX
padLcdWidthXX
padLightOffX
padLightOnX
padLineXX
padMemClearX
padMemDeleteX
padMemDeleteVarXX
padMemFindX
padMemGetChecksumX
padMemGetFreeX
padMemGetVarXX
padMemLoadBitmapX
2-2
FunctionTT1500TT3100 Series
padMemLoadBitmapFileX
padMemLoadTextX
padMemResetX
padMemSetVarXX
padNameXX
padNewXXX
padNewYXX
padOffXX
padOldXXX
padOldYXX
padOnXX
padPassThroughHandshakingXX
padPassThroughOffX
padPassThroughOnX
padPassThroughResetCodesX
padPassThroughSetOffCodeX
padPassThroughSetOnCodeX
padPortReclaimXX
padPortReleaseXX
padPromptHexNumberX
padPromptNumX
padPromptNumberX
padPromptResetX
padPromptSignatureX
padPromptStringX
padPromptTimeoutX
padPutBitsX
padPutBmpFileX
padPutLogoX
padPutTextXX
padReadByteXX
padRecordXX
padResetX
padResetAreaXX
padResetBaudRateX
padResetConnectTimeoutXX
padResetDefaultBaudRateX
padResetInTimeoutXX
padResetMagCardX
padResetOutTimeoutXX
padScaleXX
2-3
FunctionTT1500TT3100 Series
padScaleDPIXX
padScaleToXX
padScaleXXX
padScaleYXX
padSendByteXX
padSetAreaXX
padSetAutoInkingX
padSetBaudRateX
padSetBkColorX
padSetColorX
padSetCompressX
padSetConnectTimeoutXX
padSetDebugX
padSetDefaultBaudRateX
padSetFlowControlX
padSetFontX
padSetInTimeoutXX
padSetInkingAreaX
padSetLcdClearTimeoutX
padSetLogoX
padSetLogoBmpFileX
padSetNumVarXX
padSetOutTimeoutXX
padSetPadOffsetXX
padSetPixelX
padSetPortXX
padSetPortAddrXX
padSetPortHandleXX
padSetPortIrqXX
padSetPortsXX
padSetScanRateX
padSetTimeX
padSetTypeXX
padStopXX
padSoundBell X
padSoundEnable X
padSoundSetFreq X
padSoundTone X
padToHIENGLISHXX
padToLOENGLISHXX
padToHIMETRICXX
2-4
FunctionTT1500TT3100 Series
padToLOMETRICXX
padTypeXX
padUpdateXX
padVertDPIXX
padWidthXX
Library Functions List by Category
The following lists the functions in groups of distinct functional categories. For a detailed description of the functions listed,
refer to "Library Functions" on page 3-1.
Basic Operations:
padConnectAttempts a connection to a pad (similar to padOn).
padConnectClearScreenConnect and clear pad screen.
padGetRetrieve the pen coordinate and status.
padIsaResetReset the extension card device
padOffTurn the pad off.
padOnTurn the pad on (similar to padConnect).
padRecordStart recording pad data.
padStopStop recording pad data.
padUpdateUpdate pad data.
padSetTypeSets a specific type of pad to be used.
padResetReset the pad.
Clipping Active Area:
padGetAreaGet the currently active clipping area.
padResetAreaReset clipping to the full pad surface.
padSetAreaSets the currently active clipping area.
padSetInkingAreaSets the currently active inking area.
Data Collection Operations:
padBinaryGetTableGet data from a table row.
padEraseTableErase all data in a binary table
padGetTableItemTransfer data from a table row to a variable
padIsKeyCheck if the DUPKT key is set.
padSetCompressSet the compression number for storing the captured signature data.
2-5
Error Handling:
padErrorGet the most recent error status.
padFlushFlush any data waiting to be processed.
padIsErrorCheck if an error has occurred.
padIsPadErrorCheck if an error has occurred.
padGetPadErrorGet the error code.
padSetDebugSet the debug mode On or Off.
LCD Screen Operations:
padBox Draws a box onto the LCD screen.
padClearClears the LCD screen.
padClearPixelClears a pixel on the LCD screen.
padFrame Draws a frame onto the LCD screen.
padGetBkColor Gets the current background color.
padDisplayObjectDraw a stored memory object.
padGetColor Gets the current foreground color.
padGetColors Gets the number of colors available.
padInvert Inverts an area on the LCD screen.
padLine Draws a line on the LCD screen.
padPutTextDraws text on the LCD screen.
padPutBitsDraws a bitmap on the LCD screen.
padPutBmpFileDraws a Windows BMP file on the LCD screen.
padPutLogohDraws the logo image on the LCD screen.
padSetBkColor Sets the current background color.
padSetColor Sets the current foreground color.
padSetLcdClearTimeoutSets the automatic clearing time out for the LCD.
padSetLogoSets the logo image.
padSetLogoBmpFileSets the logo image to a Windows BMP file.
padSetPixel Sets a pixel on the LCD screen.
padSetFontSet the current text font.
padGetFontGet the current text font.
padSetAutoInkingSet the Auto-inking mode.
padGetFontSizeGet the dimensions of a font size.
LCD Display Specifications:
padIsLcdCheck if an LCD screen is available.
padLcdHeightGet height of LCD screen area in pixels.
2-6
padLcdHorzDPIGet horizontal resolution of the LCD screen.
padLcdVertDPIGet vertical resolution of the LCD screen.
padLcdWidthGet width of LCD screen area in pixels.
Memory Operations:
padMemAvailableCheck if memory is available.
padMemResetReset memory.
padMemGetFreeGet amount of free memory.
padMemGetChecksumPerform a checksum of memory.
padMemClearClear memory content.
padMemDeleteDelete a memory item.
padMemFindFind an item in memory.
padMemLoadTextLoad a string into memory.
padMemLoadBitmapLoad bitmap into memory.
padMemLoadBitmapFileLoads a bitmap file into memory.
Miscellaneous:
padLightOnTurn on the light.
padLightOffTurn off the light.
Model and Version Operations:
padComDateGet the build date of the PadCom library
padComVersionGet the version number of the PadCom library
padGetCmdSetIDGet the current command set ID.
padGetModelGet the model number of the attached pad
padGetVersionGet the model revision number
Pad Specifications:
padGetPageGet pad dimension information.
padHeightGet height of pad area in pixels.
padHorzDPIGet horizontal resolution of the pad.
padVertDPIGet vertical resolution of the pad.
padWidthGet width of pad area in pixels.
Port Configuration for DOS:
padGetPortAddrGets a COM port’s address.
padGetPortIrqGets a COM port’s interrupt number.
padSetPortAddrSets a COM port’s address.
2-7
padSetPortIrqSets a COM port’s interrupt number.
Port Operations:
padGetPortGets the current communications port.
padGetPortsGets the current number of ports available.
padSetPortsSets the amount of ports available on the PC.
POS Services:
padGetMagTrackGets a track of data from a magnetic card.
padGetMaxCardTracksGet the amount of tracks supported.
padGetMaxCardTrackSize Get the maximum card track size in bytes.
padGetAllMagCardTracks Read all tracks on a magnetic card.
padGetDUKPTbinaryPINGets a PIN number from the user.
padGetDUKPTtextPINGets a PIN number from the user.
padGetMasterSessionBinaryPINGets a PIN number from the user.
padGetMasterSessionTextPINGets a PIN number from the user.
padResetMagCardResets the magnetic card reader and clears the track buffer
Prompt Operations:
padPromptResetReset all prompts.
padPromptHexNumberDisplay a hexadecimal number entry prompt.
padPromptNumDisplay an integer number entry prompt.
padPromptNumberDisplay a decimal number entry prompt.
padPromptSignatrueDisplay a signature capture prompt.
padPromptStringDisplay an alphanumeric data entry prompt.
padPromptTimeoutSets the timeout value for the prompt commands.
Scaling of Coordinates Received:
padScaleScale an arbitrary value to a given fraction.
padScaleDPIScale to a desired DPI resolution.
padScaleToScale to a desired rectangle.
padScaleXScale a horizontal coordinate to given DPI.
padScaleYScale a vertical coordinate to given DPI.
padToHIENGLISHScale to units based on 1000ths of inch.
padToLOENGLISHScale to units based on 100ths of inch.
2-8
padToHIMETRICScale to units based on 100ths of a millimeter.
padToLOMETRICScale to units based on 10ths of a millimeter.
Scan Rate Operations:
padSetConstantSet a constant scan rate On or Off.
padGetConstantCheck if constant scan rate is On or Off.
padSetScanRateSet a scan rate.
padGetScanRateGet the current scan rate.
Sound Operations:
padSoundBellType of sound action to make.
padSoundEnableEnable or disable the sound.
padSoundSetFreqThe frequency for the sound.
padSoundToneSound with a frequency and duration.
State Information:
padIsOnCheck if pad has been turned on.
padIsNewStrokeCheck if beginning a new stroke.
padIsPenDownCheck if the pen is down.
padIsRecordCheck if currently recording pad data.
padOldXReturns the previous horizontal pen coordinate.
padOldYReturns the previous vertical pen coordinate.
padNewXReturns the current horizontal pen.
padNewYReturns the current vertical pen coordinate.
padNameGet the name of the attached pad.
padTypeGet the type of the attached pad.
System and Communication Operations:
padSysIsAvailableCheck if the system is available.
padSysResetReset the system.
padCommIsAvailableCheck if the communication port available.
padCommResetReset the communications port.
padCanConfigCommCheck if the communications can be configured.
padConfigCommConfigure commincations as specified.
padTestCommTest communications.
padSetCommTimeoutSet time-out for communication operation.
padEchoCommEcho data back to the host.
padGetBaudRateReturns the current baud rate.
2-9
padGetConnectTimeoutGets the initial connection intput/output timeout value.
padGetDefaultBaudRateReturns the current default baud rate.
padGetInTimeoutGets the timeout value for input.
padGetOutTimeoutGets the timeout value for output.
padPassThroughOffTurns off passthorugh mode
padPassThroughOnTurns on passthorugh mode
padPassThroughResetCodesResets the passthrough codes
padPassThroughSetOffCodeSets the passthrough “ON” code
padPassThroughSetOnCodeSets the passthrough “OFF” code
padReadByteReads a single byte of from the pad.
padResetBaudRateResets the baud rate to the default (9600).
padResetConnectTimeoutResets the initial connection intput/output timeout value.
padResetDefaultBaudRateResets the default baud rate to PadCom’s initial value (9600).
padResetInTimeoutResets the timeout value for input.
padResetOutTimeoutResets the timeout value for output.
padSendByteSends a single byte to the pad.
padSetBaudRateSets the baud rate to a specified rate.
padSetConnectTimeoutSets the initial connection intput/output timeout value.
padSetDefaultBaudRateSets the default baud rate to open a connection at.
padSetFlowControlEnables/disables flow control.
padSetInTimeoutSets the timeout value for input.
padSetOutTimeoutSets the timeout value for output.
padSetPadOffsetSet’s the pad’s touch surface offset.
Time and Date Operations:
padTimeAvailableCheck if the time function is available.
padDisplayTimeDisplays the time.
padHideTimeHide the time display.
padSetTimeSet the current time.
padGetTimeGet the current time.
2-10
3
Library Functions
This section provides detailed information about each library function, arranged in alphabetic order. "Library Reference" on
page 2-1 presents a brief overview of these functions based on functional category.
padBinaryGetTable
Gets data from a table row.
Syntax
WORD padBinaryGetTable(
char FAR * lpszDatabaseName,
BYTE FAR * lpuBuffer,
WORD wBufSize,
WORD wIndex
)
ParameterDescription
lpszDatabaseNamePointer to a buffer containing raw signature data
lpuBufferPointer to the buffer
wBufSizeSize of the buffer
wIndexThe index of the row transferred
Returns
Receive a row data from the binary table.
padBinaryGetVar
Retrieves binary data from the specified memory location.
Syntax
BOOL padBinaryGetVar(
char FAR * pcName,
WORD wNameLength,
char FAR * pcBinData,
WORD FAR * pwDataLength
)
ParameterDescription
pcNameVariable name containing binary data
wNameLengthName length
pcBinDataPointer to a buffer to get binary data
pwDataLengthBuffer length
Returns
Returns TRUE if successful, FALSE otherwise.
3-1
padBox
Draws a solid box on the LCD screen starting at the coordinates specified by X and
Y using the size specified by Width and Height. The box is drawn using the current
foreground color. The illustration depicts the placement of an arbitrary box at location
x,y with width of W and height H.
Syntax
BOOL padBox(
int X,
int Y,
int Width,
int Height
)
ParameterDescription
XHorizontal coordinate to draw the box from
YVertical coordinate to draw the box from
WidthHorizontal size of the box in pixels
HeightVertical size of the box in pixels
Clears a pixel on the LCD screen by setting a pixel on the LCD screen at the location specified by X and Y to the current
background color.
Syntax
BOOL padClearPixel(
intX,intY
)
ParameterDescription
XHorizontal coordinate of the pixel to set
YVertical coordinate of the pixel to set
Returns
Returns TRUE if successful, FALSE otherwise.
3-2
See Also
padBox, padFrame, padInvert, padLine, padSetPixel
PadComDate
Returns a pointer to a string containing the date of the build of the PadCom library. The format of the returned string is in
ASCII text format including the month, day, and year of the build. For example, “July 16, 1998.”
Syntax
char * PadComDate()
See Also
PadComVersion
PadComVersion
Returns a pointer to a string containing the version number of the build of the PadCom library. The format of the returned
string is in ASCII text format and includes the major version, minor version, and revision number of the build. For example,
“04.00.0008.”
Syntax
char * PadComVersion()
See Also
PadComDate
padConnect
Connects to the attached Transaction Team unit by checking for the existence of a pad and initializing communications.
Normally this command searches all valid com ports for the existence of all supported Transaction Team pad types. This
command must be executed before using any other commands in the library; the only exceptions to this are the commands
padSetPort, padSetPortAddr, padSetPortIrq,andpadSetType, which modify the behavior of padConnect and must be
called prior to calling padConnect. This function is similar to padOn except that it will always attempt to connect to a pad
even if a connection was already established.
padConnectClearScreen allows you to specify whether or not the screen will be cleared upon connection. The default is
padConnectClearScreen set to TRUE. When set to TRUE, the LCD is cleared whenever a connection is made to the
Transaction Team POS device using padConnect or padOn. If set to FALSE, the LCD is not cleared when a connection is
made to a Transaction Team POS device. This command affects all subsequent calls to padOn and padConnect and does
not itself make a connection to the Transaction Team POS device. To make a connection you must call padConnect or
padOn.
3-3
Syntax
BOOL padConnectClearScreen (
BOOL enable
)
ParameterDescription
enableFlag to enable/disable screen clear on Connect.
Returns
Returns TRUE if successful, FALSE otherwise.
See Also
padOn, padOff, padConnect
padDisplayObject
Draws a memory object onto the position specified by pptAt on the screen, if applicable. An object can be stored in nonvolatile memory using padMemLoadText, padMemLoadBitmap or similar commands. Every memory object is associated
with an ObjectId that identifies the object. The created memory object may be deleted or overwritten.
Non-volatile memory is typically used to store large and often used bitmaps and texts. Since the data resides on the unit,
the data transfer between the COM-port and the unit is reduced resulting in much faster display times.
Note: All memory objects may be displayed, even empty ones. To check if a specified memory object contains data, use
padMemFind.
Syntax
BOOL padDisplayObject(
WORD ObjectId,
padPOINT *pptAt
)
ParameterDescription
ObjectIdID of the memory item to store
pptAtPointer to padPOINT specifying screen location
Returns
Returns TRUE if the function succeeds, FALSE otherwise.
See Also
padMemLoadText, padMemLoadBitmap, padMemDelete
padDisplayTime
This function displays the time on a Transaction Team 3100 Series or compatible terminal.
Syntax
BOOL padDisplayTime(
WORD wHorz,
WORD wVert,
BYTE nFontId
)
ParameterDescription
wHorzThe horizontal position for displaying the time
wVertThe vertical position for displaying the time
nFontIdThe font used for displaying the time
3-4
Returns
Returns TRUE if the function succeeds, FALSE otherwise.
See Also
padHideTime, padSetTime, padGetTime, padSetFont
padEchoComm
Echoes data back to the host (the PC). The user sends a block of data specified by SendDataBlock (with the length of the
data specified by DataLength) to the pad and the pad sends the data back to the host which is then placed in
RecvDataBlock. This command can be used to verify the communication link between the host and the pad.
This command can optionally be used to synchronize the software with the state of the unit by waiting for the echo to return
before continuing.
Syntax
int padEchoComm(
char *SendDataBlock,
char *RecvDataBlock,
WORD DataLength
)
ParameterDescription
SendDataBlockPointer to the block of data to send
RecvDataBlockPointer to the received data block
DataLengthLength of the sent data bytes
Returns
Returns TRUE if the function call succeeds, FALSE otherwise.
padEraseTable
Erases all data in a binary table.
Syntax
BOOL padEraseTable(
char FAR * lpszDatabaseName
)
ParameterDescription
lpszDatabaseNameName of the database variable that stores the transactions
Returns
Returns TRUE if the function call succeeds, FALSE otherwise.
3-5
padFieldButton
Creates a button and displays it on the pad screen. Commands can be executed when the button is pressed and released.
Syntax
BOOL padFieldButton(
WORD wId,
WORD wStyle,
WORD wLeft,
WORD wTop,
WORD wWidth,
WORD wHeight,
BYTE uFont,
char FAR *pcText,
WORD wTextLen,
WORD wCmdPress,
char FAR * pcPressArgData,
WORD wPressArgDataLen,
WORD wCmdRelease,
char FAR * pcReleaseArgData,
WORD wReleaseArgDataLen
)
ParameterDescription
wIdField identification number
wStyleField style attributes; 0 for defaults
wLeftX-coordinate of upper point
wTopY-coordinate of upper point
wWidthWidth of the signature field
wHeightHeight of the signature field
uFontFont to be used
pcTextButton text to be displayed
wTextLenText length
wCmdPressCommand to be executed when the button is pressed
pcPressArgDataCommand data for press command
wPressArgDataLenData length for press command
wCmdReleaseCommand to be executed when the button is released
pcReleaseArgDataCommand data for release command
wReleaseArgDataLenData length for release command
Returns
3-6
Returns TRUE if the function call succeeds, FALSE otherwise.
padFieldSignature
Creates a signature field.
Syntax
BOOL padFieldSignature (
WORD wId,
WORD wStyle,
WORD wLeft,
WORD wTop,
WORD wWidth,
WORD wHeight,
WORD wMaxPoints,
WORD wEnterTime,
WORD wEnterCmd,
char FAR * pcData,
int nDataLen
)
ParameterDescription
wIdField identification number
wStyleField style attributes. 0 for defaults
wLeftX-coordinate of upper point
wTopY-coordinate of upper point
wWidthWidth of the signature field
wHeightHeight of the signature field
wMaxPointsMax points that are allowed to be entered to the signature field
wEnterTimePenup time out in seconds, which is used for AUTO ENTER
wEnterCmdThe command to be executed when ENTER button is pressed
pcDataCommand data buffer
nDataLenLength of the command data
Returns
Returns TRUE if the function call succeeds, FALSE otherwise.
padFlush
Removes any pending pad data from the input queue. This is not normally needed, however it may be useful in some
situations.
Syntax
void padFlush(
void
)
padFormDeleteFld
Deletes the field given by wId.
Syntax
BOOL padFormDeleteFld(
WORD wId
)
3-7
ParameterDescription
wIdField identification number
See Also
padFormSaveFld
padFormSaveFld
Saves the current signature data to the specified variable.
Syntax
BOOL padFormSaveFld(
WORD wId,
char FAR * pcName,
WORD wNameLen
)
ParameterDescription
wIdField identification number
pcNameVariable name
wNameLenName length
Draws a frame (outline/empty box) on the LCD screen starting at the coordinates specified by X and Y using the size
specified by Width and Height. The frame is drawn using the current foreground color. This function draws an empty frame
as opposed to padBox, which draws a filled frame.
The illustration depicts the placement of an arbitrary frame at location X, Y with width
of W and height H.
Syntax
BOOL padFrame(
int X,
int Y,
int Width,
int Height
)
ParameterDescription
XHorizontal coordinate from which the frame is drawn
YVertical coordinate from which the frame is drawn
WidthHorizontal size of the frame in pixels
HeightVertical size of the frame in pixels
Receives new data from the pad by checking for and returning the last horizontal/vertical coordinates and pen status. A pen
status of 1 indicates the continuation of a line (lineto(x,y )), whereas a 0 represents the beginning of a stroke (moveto(x,y)).
NULL pointers may be passed as any of the parameters to suppress gathering of the associated data. Note that if no pen
activity occurred since the last padUpdate, the function returns FALSE and does not alter the values pointed to.
Syntax
BOOL padGet (
int *XPosition,
int *YPosition,
int *Pen
)
ParameterDescription
XPositionPointer to an integer to hold the new horizontal coordinate of the pen
YPositionPointer to an integer to hold the new vertical coordinate of the pen
PenPointer to an integer to hold the new pen status (0 = moveto, 1 = lineto)
Returns
Returns TRUE if new pen data was received, FALSE otherwise.
See Also
padUpdate, padRecord, padStop
padGetAllMagCardTracks
Returns data captured from all tracks on a magnetic card, if available. A card must have been swiped prior to executing this
command, otherwise it returns zero. The TrackXSize parameters should contain the maximum buffer sizes for each track
before the call, and after will contain actual track sizes after the call. The card reader must be reset using padResetMagCard
before calling this command. Refer to page 5-1 for sample code that describes how to read the MSR.
Syntax
BOOL padGetAllMagCardTracks(
BYTE *Tracks,
char *Track1,
WORD *Track1Size,
char *Track2,
WORD *Track2Size,
char *Track3,
WORD *Track3Size
)
ParameterDescription
TracksTotal tracks
Track1Pointer to the track1
Track1SizePointer to the track1 size
Track2Pointer to the track2
Track2SizePointer to the track2 size
Track3Pointer to the track3
Track3SizePointer to the track3 size
Returns
Returns TRUE if the function call succeeds, FALSE otherwise.
Finds the minimum and maximum coordinates of the active pad area by retrieving the current clipping area into the variables
provided. NULL pointers may be passed as any or all parameters.
Syntax
BOOL padGetArea(
int *xLeft,
int *yTop,
int *xRight,
int *yBottom
)
ParameterDescription
xLeftPointer to an integer to hold the minimum horizontal coordinate
yTopPointer to an integer to hold the minimum vertical coordinate
xRightPointer to an integer to hold the maximum horizontal coordinate
yBottomPointer to an integer to hold the maximum vertical coordinate
Returns
Returns TRUE if area retrieved represents the full pad surface, FALSE otherwise.
See Also
padSetArea, padWidth, padHeight
padGetBaudRate
Used to find the current communications baud rate.
Syntax
DWORD padGetBaudRate(
void
)
Returns
Returns the current baud rate.
See Also
padResetBaudRate, padSetBaudRate
padGetBkColor
Gets the current background color.
Syntax
int padGetBkColor(
void
)
Returns
Returns the current background.
See Also
padGetColor, padSetBkColor, padSetColor
3-10
Loading...
+ 102 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.