Hand Held Products PadCom TT1500, PadCom TT3100 User Manual

PadCom
Point-of-Sale Terminal Control Library
User’s Guide
Disclaimer
Welch AllynData 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
Installation ...........................................................................................................................................1-2
Transaction Team Device Overview ...................................................................................................1-2
Aspect Ratio Considerations.........................................................................................................1-2
Representing Pen Strokes..............................................................................................................1-2
Using PadCom ..............................................................................................................................1-3
Implementation....................................................................................................................................1-3
Compiling and Linking .................................................................................................................1-3
Troubleshooting...................................................................................................................................1-4
Help Desk......................................................................................................................................1-4
Chapter 2 - Library Reference
Library Functions List by Transaction Team Pad Compatibility........................................................2-1
Library Functions List by Category.....................................................................................................2-5
Chapter 3 - Library Functions
padBinaryGetTable .............................................................................................................................3-1
padBinaryGetVar ................................................................................................................................3-1
padBox ................................................................................................................................................3-2
padClear ..............................................................................................................................................3-2
padClearPixel ......................................................................................................................................3-2
PadComDate .......................................................................................................................................3-3
PadComVersion ..................................................................................................................................3-3
padConnect .........................................................................................................................................3-3
padConnectClearScreen ......................................................................................................................3-3
padDisplayObject ...............................................................................................................................3-4
padDisplayTime ..................................................................................................................................3-4
padEchoComm ...................................................................................................................................3-5
padEraseTable ....................................................................................................................................3-5
padFieldButton ...................................................................................................................................3-6
padFieldSignature ...............................................................................................................................3-7
padFlush ..............................................................................................................................................3-7
padFormDeleteFld ..............................................................................................................................3-7
padFormSaveFld .................................................................................................................................3-8
padFrame ............................................................................................................................................3-8
padGet .................................................................................................................................................3-9
padGetAllMagCardTracks ..................................................................................................................3-9
padGetArea .......................................................................................................................................3-10
padGetBaudRate ...............................................................................................................................3-10
padGetBkColor .................................................................................................................................3-10
padGetCmdSetID ..............................................................................................................................3-11
padGetColor ......................................................................................................................................3-11
padGetColors ....................................................................................................................................3-11
padGetConnectTimeout ....................................................................................................................3-11
padGetDefaultBaudRate ...................................................................................................................3-12
padGetDUKPTbinaryPIN .................................................................................................................3-12
padGetDUKPTtextPIN .....................................................................................................................3-13
padGetFont .......................................................................................................................................3-14
i
padGetFontSize ................................................................................................................................3-14
padGetInTimeout ..............................................................................................................................3-15
padGetMagTrack ..............................................................................................................................3-15
padGetMasterSessionBinaryPIN ......................................................................................................3-16
padGetMasterSessionTextPIN ..........................................................................................................3-16
padGetMaxCardTracks .....................................................................................................................3-17
padGetMaxCardTrackSize ...............................................................................................................3-17
padGetModel ....................................................................................................................................3-18
padGetNumVar .................................................................................................................................3-18
padGetOutTimeout ...........................................................................................................................3-18
padGetPage .......................................................................................................................................3-19
padGetPort ........................................................................................................................................3-19
padGetPortAddr ................................................................................................................................3-20
padGetPortIrq ...................................................................................................................................3-20
padGetPorts ......................................................................................................................................3-20
padGetScanRate ................................................................................................................................3-21
padGetTableItem ..............................................................................................................................3-21
padGetTime ......................................................................................................................................3-21
padGetVersion ..................................................................................................................................3-22
padHeight ..........................................................................................................................................3-22
padHideTime ....................................................................................................................................3-22
padHorzDPI ......................................................................................................................................3-23
padInkExport ....................................................................................................................................3-23
padInvert ...........................................................................................................................................3-24
padIsaReset .......................................................................................................................................3-24
padIsKey ...........................................................................................................................................3-24
padIsLcd ...........................................................................................................................................3-25
padIsNewStroke ................................................................................................................................3-25
padIsOn .............................................................................................................................................3-25
padIsPenDown ..................................................................................................................................3-25
padIsRecord ......................................................................................................................................3-26
padLcdHeight ...................................................................................................................................3-26
padLcdHorzDPI ................................................................................................................................3-26
padLcdVertDPI .................................................................................................................................3-27
padLcdWidth ....................................................................................................................................3-27
padLightOff ......................................................................................................................................3-27
padLightOn .......................................................................................................................................3-27
padLine .............................................................................................................................................3-28
padMemClear ...................................................................................................................................3-28
padMemDelete ..................................................................................................................................3-29
padMemDeleteVar ............................................................................................................................3-29
padMemFind .....................................................................................................................................3-29
padMemGetChecksum .....................................................................................................................3-30
padMemGetFree ...............................................................................................................................3-30
padMemGetVar ................................................................................................................................3-30
padMemLoadBitmap ........................................................................................................................3-31
padMemLoadBitmapFile ..................................................................................................................3-31
padMemLoadText ............................................................................................................................3-32
padMemReset ...................................................................................................................................3-32
padMemSetVar .................................................................................................................................3-33
padName ...........................................................................................................................................3-33
padNewX ..........................................................................................................................................3-33
padNewY ..........................................................................................................................................3-34
padOff ...............................................................................................................................................3-34
padOldX ............................................................................................................................................3-34
padOldY ............................................................................................................................................3-34
padOn ................................................................................................................................................3-35
ii
padPassThroughHandshaking ..........................................................................................................3-35
padPassThroughOff ..........................................................................................................................3-35
padPassThroughOn ...........................................................................................................................3-36
padPassThroughResetCodes .............................................................................................................3-37
padPassThroughSetOffCode ............................................................................................................3-37
padPassThroughSetOnCode .............................................................................................................3-37
padPortReclaim ................................................................................................................................3-38
padPortRelease .................................................................................................................................3-38
padPromptHexNumber .....................................................................................................................3-39
padPromptNum .................................................................................................................................3-39
padPromptNumber ............................................................................................................................3-40
padPromptReset ................................................................................................................................3-40
padPromptSignature .........................................................................................................................3-41
padPromptString ...............................................................................................................................3-41
padPromptTimeout ...........................................................................................................................3-42
padPutBits .........................................................................................................................................3-42
padPutBmpFile .................................................................................................................................3-42
padPutLogo .......................................................................................................................................3-43
padPutText ........................................................................................................................................3-43
padReadByte .....................................................................................................................................3-44
padRecord .........................................................................................................................................3-44
padReset ............................................................................................................................................3-44
padResetArea ....................................................................................................................................3-45
padResetBaudRate ............................................................................................................................3-45
padResetConnectTimeout .................................................................................................................3-45
padResetDefaultBaudRate ................................................................................................................3-46
padResetInTimeout ...........................................................................................................................3-46
padResetMagCard ............................................................................................................................3-46
padResetOutTimeout ........................................................................................................................3-47
padScale ............................................................................................................................................3-47
padScaleDPI .....................................................................................................................................3-47
padScaleTo .......................................................................................................................................3-48
padScaleX .........................................................................................................................................3-48
padScaleY .........................................................................................................................................3-49
padSendByte .....................................................................................................................................3-49
padSetArea ........................................................................................................................................3-49
padSetAutoInking .............................................................................................................................3-50
padSetBaudRate ................................................................................................................................3-50
padSetBkColor ..................................................................................................................................3-51
padSetColor ......................................................................................................................................3-51
padSetCompress ...............................................................................................................................3-51
padSetConnectTimeout ....................................................................................................................3-52
padSetDebug .....................................................................................................................................3-52
padSetDefaultBaudRate ....................................................................................................................3-52
padSetFlowControl ...........................................................................................................................3-53
padSetFont ........................................................................................................................................3-53
padSetInkingArea .............................................................................................................................3-54
padSetInTimeout ..............................................................................................................................3-55
padSetOutTimeout ............................................................................................................................3-55
padSetLcdClearTimeout ...................................................................................................................3-55
padSetLogo .......................................................................................................................................3-56
padSetLogoBmpFile .........................................................................................................................3-56
padSetNumVar .................................................................................................................................3-57
padSetPadMode ................................................................................................................................3-57
padSetPadOffset ...............................................................................................................................3-58
padSetPixel .......................................................................................................................................3-58
padSetPort .........................................................................................................................................3-59
iii
padSetPortAddr ................................................................................................................................3-59
padSetPortHandle .............................................................................................................................3-60
padSetPortIrq ....................................................................................................................................3-60
padSetPorts .......................................................................................................................................3-60
padSetScanRate ................................................................................................................................3-61
padSetTime .......................................................................................................................................3-61
padSetType .......................................................................................................................................3-61
padSoundBell ....................................................................................................................................3-62
padSoundEnable ...............................................................................................................................3-62
padSoundSetFreq ..............................................................................................................................3-63
padSoundTone ..................................................................................................................................3-63
padStop .............................................................................................................................................3-64
padToHIENGLISH ...........................................................................................................................3-64
padToLOENGLISH ..........................................................................................................................3-64
padToHIMETRIC .............................................................................................................................3-65
padToLOMETRIC ............................................................................................................................3-65
padType ............................................................................................................................................3-65
padUpdate .........................................................................................................................................3-66
padVertDPI .......................................................................................................................................3-66
padWidth ..........................................................................................................................................3-66
Chapter 4 - Supported Bitmap Format
Chapter 5 - Sample Source Code
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,y0 x100,y0
x0,y100 x100,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:
North America:
Telephone: (315) 685-2476 (8 a.m. to 6 p.m. EST) Fax number: (315) 685-4960
E-mail: support@handheld.com
Europe:
Telephone­European Ofc: Int+31 40 242 4486 U.K. Ofc: Int+44 1925 240055
E-mail: support@handheld.com
Asia:
Telephone: Int+852-2511-3050or2511-3132
E-mail: support@handheld.com
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.
Function TT1500 TT3100 Series
padBinaryGetTable X X
padBinaryGetVar X X
padBox X X
padClear X X
padClearPixel X
padComDate X X
padComVersion X X
padConnect X X
padConnectClearScreen X X
padDisplayObject X
padDisplayTime X
padEchoComm X
padEraseTable X X
padFieldButton X
padFieldSignature X X
padFlush X X
padFormDeleteFld X
padFormSaveFld X
padFrame X X
padGet X X
padGetAllMagCardTracks X
padGetBaudRate X X
padGetArea X X
padGetBkColor X
padGetCmdSetID X
padGetColor X
padGetColors X
padGetConnectTimeout X X
padGetDefaultBaudRate X
padGetDUKPTbinaryPIN X
padGetDUKPTtextPIN X
padGetFont X X
padGetFontSize X
padGetInTimeout X X
padGetMagTrack X
padGetMasterSessionBinaryPIN X
2-1
Function TT1500 TT3100 Series
padGetMasterSessionTextPIN X
padGetMaxCardTracks X
padGetMaxCardTrackSize X
padGetModel X X
padGetNumVar X X
padGetOutTimeout X X
padGetPage X X
padGetPort X X
padGetPortAddr X X
padGetPortIrq X X
padGetPorts X X
padGetScanRate X
padGetTableItem X X
padGetVersion X X
padHeight X X
padHideTime X
padHorzDPI X X
padInkExport X X
padInvert X
padIsKey X
padIsLcd X X
padIsNewStroke X X
padIsaReset X X
padIsOn X X
padIsPenDown X X
padIsRecord X X
padLcdHeight X X
padLcdHorzDPI X X
padLcdVertDPI X X
padLcdWidth X X
padLightOff X
padLightOn X
padLine X X
padMemClear X
padMemDelete X
padMemDeleteVar X X
padMemFind X
padMemGetChecksum X
padMemGetFree X
padMemGetVar X X
padMemLoadBitmap X
2-2
Function TT1500 TT3100 Series
padMemLoadBitmapFile X
padMemLoadText X
padMemReset X
padMemSetVar X X
padName X X
padNewX X X
padNewY X X
padOff X X
padOldX X X
padOldY X X
padOn X X
padPassThroughHandshaking X X
padPassThroughOff X
padPassThroughOn X
padPassThroughResetCodes X
padPassThroughSetOffCode X
padPassThroughSetOnCode X
padPortReclaim X X
padPortRelease X X
padPromptHexNumber X
padPromptNum X
padPromptNumber X
padPromptReset X
padPromptSignature X
padPromptString X
padPromptTimeout X
padPutBits X
padPutBmpFile X
padPutLogo X
padPutText X X
padReadByte X X
padRecord X X
padReset X
padResetArea X X
padResetBaudRate X
padResetConnectTimeout X X
padResetDefaultBaudRate X
padResetInTimeout X X
padResetMagCard X
padResetOutTimeout X X
padScale X X
2-3
Function TT1500 TT3100 Series
padScaleDPI X X
padScaleTo X X
padScaleX X X
padScaleY X X
padSendByte X X
padSetArea X X
padSetAutoInking X
padSetBaudRate X
padSetBkColor X
padSetColor X
padSetCompress X
padSetConnectTimeout X X
padSetDebug X
padSetDefaultBaudRate X
padSetFlowControl X
padSetFont X
padSetInTimeout X X
padSetInkingArea X
padSetLcdClearTimeout X
padSetLogo X
padSetLogoBmpFile X
padSetNumVar X X
padSetOutTimeout X X
padSetPadOffset X X
padSetPixel X
padSetPort X X
padSetPortAddr X X
padSetPortHandle X X
padSetPortIrq X X
padSetPorts X X
padSetScanRate X
padSetTime X
padSetType X X
padStop X X
padSoundBell X
padSoundEnable X
padSoundSetFreq X
padSoundTone X
padToHIENGLISH X X
padToLOENGLISH X X
padToHIMETRIC X X
2-4
Function TT1500 TT3100 Series
padToLOMETRIC X X
padType X X
padUpdate X X
padVertDPI X X
padWidth X X

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:
padConnect Attempts a connection to a pad (similar to padOn).
padConnectClearScreen Connect and clear pad screen.
padGet Retrieve the pen coordinate and status.
padIsaReset Reset the extension card device
padOff Turn the pad off.
padOn Turn the pad on (similar to padConnect).
padRecord Start recording pad data.
padStop Stop recording pad data.
padUpdate Update pad data.
padSetType Sets a specific type of pad to be used.
padReset Reset the pad.
Clipping Active Area:
padGetArea Get the currently active clipping area.
padResetArea Reset clipping to the full pad surface.
padSetArea Sets the currently active clipping area.
padSetInkingArea Sets the currently active inking area.
Data Collection Operations:
padBinaryGetTable Get data from a table row.
padEraseTable Erase all data in a binary table
padGetTableItem Transfer data from a table row to a variable
padIsKey Check if the DUPKT key is set.
padSetCompress Set the compression number for storing the captured signature data.
2-5
Error Handling:
padError Get the most recent error status.
padFlush Flush any data waiting to be processed.
padIsError Check if an error has occurred.
padIsPadError Check if an error has occurred.
padGetPadError Get the error code.
padSetDebug Set the debug mode On or Off.
LCD Screen Operations:
padBox Draws a box onto the LCD screen.
padClear Clears the LCD screen.
padClearPixel Clears a pixel on the LCD screen.
padFrame Draws a frame onto the LCD screen.
padGetBkColor Gets the current background color.
padDisplayObject Draw 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.
padPutText Draws text on the LCD screen.
padPutBits Draws a bitmap on the LCD screen.
padPutBmpFile Draws a Windows BMP file on the LCD screen.
padPutLogoh Draws the logo image on the LCD screen.
padSetBkColor Sets the current background color.
padSetColor Sets the current foreground color.
padSetLcdClearTimeout Sets the automatic clearing time out for the LCD.
padSetLogo Sets the logo image.
padSetLogoBmpFile Sets the logo image to a Windows BMP file.
padSetPixel Sets a pixel on the LCD screen.
padSetFont Set the current text font.
padGetFont Get the current text font.
padSetAutoInking Set the Auto-inking mode.
padGetFontSize Get the dimensions of a font size.
LCD Display Specifications:
padIsLcd Check if an LCD screen is available.
padLcdHeight Get height of LCD screen area in pixels.
2-6
padLcdHorzDPI Get horizontal resolution of the LCD screen.
padLcdVertDPI Get vertical resolution of the LCD screen.
padLcdWidth Get width of LCD screen area in pixels.
Memory Operations:
padMemAvailable Check if memory is available.
padMemReset Reset memory.
padMemGetFree Get amount of free memory.
padMemGetChecksum Perform a checksum of memory.
padMemClear Clear memory content.
padMemDelete Delete a memory item.
padMemFind Find an item in memory.
padMemLoadText Load a string into memory.
padMemLoadBitmap Load bitmap into memory.
padMemLoadBitmapFile Loads a bitmap file into memory.
Miscellaneous:
padLightOn Turn on the light.
padLightOff Turn off the light.
Model and Version Operations:
padComDate Get the build date of the PadCom library
padComVersion Get the version number of the PadCom library
padGetCmdSetID Get the current command set ID.
padGetModel Get the model number of the attached pad
padGetVersion Get the model revision number
Pad Specifications:
padGetPage Get pad dimension information.
padHeight Get height of pad area in pixels.
padHorzDPI Get horizontal resolution of the pad.
padVertDPI Get vertical resolution of the pad.
padWidth Get width of pad area in pixels.
Port Configuration for DOS:
padGetPortAddr Gets a COM port’s address.
padGetPortIrq Gets a COM port’s interrupt number.
padSetPortAddr Sets a COM port’s address.
2-7
padSetPortIrq Sets a COM port’s interrupt number.
Port Operations:
padGetPort Gets the current communications port.
padGetPorts Gets the current number of ports available.
padPassThroughHandshaking Enables/disables hardware handshaking (pass through).
padSetPort Sets the preferred communications port.
padSetPortHandle Sets the port handle.
padSetPorts Sets the amount of ports available on the PC.
POS Services:
padGetMagTrack Gets a track of data from a magnetic card.
padGetMaxCardTracks Get the amount of tracks supported.
padGetMaxCardTrackSize Get the maximum card track size in bytes.
padGetAllMagCardTracks Read all tracks on a magnetic card.
padGetDUKPTbinaryPIN Gets a PIN number from the user.
padGetDUKPTtextPIN Gets a PIN number from the user.
padGetMasterSessionBinaryPIN Gets a PIN number from the user.
padGetMasterSessionTextPIN Gets a PIN number from the user.
padResetMagCard Resets the magnetic card reader and clears the track buffer
Prompt Operations:
padPromptReset Reset all prompts.
padPromptHexNumber Display a hexadecimal number entry prompt.
padPromptNum Display an integer number entry prompt.
padPromptNumber Display a decimal number entry prompt.
padPromptSignatrue Display a signature capture prompt.
padPromptString Display an alphanumeric data entry prompt.
padPromptTimeout Sets the timeout value for the prompt commands.
Scaling of Coordinates Received:
padScale Scale an arbitrary value to a given fraction.
padScaleDPI Scale to a desired DPI resolution.
padScaleTo Scale to a desired rectangle.
padScaleX Scale a horizontal coordinate to given DPI.
padScaleY Scale a vertical coordinate to given DPI.
padToHIENGLISH Scale to units based on 1000ths of inch.
padToLOENGLISH Scale to units based on 100ths of inch.
2-8
padToHIMETRIC Scale to units based on 100ths of a millimeter.
padToLOMETRIC Scale to units based on 10ths of a millimeter.
Scan Rate Operations:
padSetConstant Set a constant scan rate On or Off.
padGetConstant Check if constant scan rate is On or Off.
padSetScanRate Set a scan rate.
padGetScanRate Get the current scan rate.
Sound Operations:
padSoundBell Type of sound action to make.
padSoundEnable Enable or disable the sound.
padSoundSetFreq The frequency for the sound.
padSoundTone Sound with a frequency and duration.
State Information:
padIsOn Check if pad has been turned on.
padIsNewStroke Check if beginning a new stroke.
padIsPenDown Check if the pen is down.
padIsRecord Check if currently recording pad data.
padOldX Returns the previous horizontal pen coordinate.
padOldY Returns the previous vertical pen coordinate.
padNewX Returns the current horizontal pen.
padNewY Returns the current vertical pen coordinate.
padName Get the name of the attached pad.
padType Get the type of the attached pad.
System and Communication Operations:
padSysIsAvailable Check if the system is available.
padSysReset Reset the system.
padCommIsAvailable Check if the communication port available.
padCommReset Reset the communications port.
padCanConfigComm Check if the communications can be configured.
padConfigComm Configure commincations as specified.
padTestComm Test communications.
padSetCommTimeout Set time-out for communication operation.
padEchoComm Echo data back to the host.
padGetBaudRate Returns the current baud rate.
2-9
padGetConnectTimeout Gets the initial connection intput/output timeout value.
padGetDefaultBaudRate Returns the current default baud rate.
padGetInTimeout Gets the timeout value for input.
padGetOutTimeout Gets the timeout value for output.
padPassThroughOff Turns off passthorugh mode
padPassThroughOn Turns on passthorugh mode
padPassThroughResetCodes Resets the passthrough codes
padPassThroughSetOffCode Sets the passthrough “ON” code
padPassThroughSetOnCode Sets the passthrough “OFF” code
padReadByte Reads a single byte of from the pad.
padResetBaudRate Resets the baud rate to the default (9600).
padResetConnectTimeout Resets the initial connection intput/output timeout value.
padResetDefaultBaudRate Resets the default baud rate to PadCom’s initial value (9600).
padResetInTimeout Resets the timeout value for input.
padResetOutTimeout Resets the timeout value for output.
padSendByte Sends a single byte to the pad.
padSetBaudRate Sets the baud rate to a specified rate.
padSetConnectTimeout Sets the initial connection intput/output timeout value.
padSetDefaultBaudRate Sets the default baud rate to open a connection at.
padSetFlowControl Enables/disables flow control.
padSetInTimeout Sets the timeout value for input.
padSetOutTimeout Sets the timeout value for output.
padSetPadOffset Set’s the pad’s touch surface offset.
Time and Date Operations:
padTimeAvailable Check if the time function is available.
padDisplayTime Displays the time.
padHideTime Hide the time display.
padSetTime Set the current time.
padGetTime Get 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 )
Parameter Description
lpszDatabaseName Pointer to a buffer containing raw signature data lpuBuffer Pointer to the buffer wBufSize Size of the buffer wIndex The 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 )
Parameter Description
pcName Variable name containing binary data wNameLength Name length pcBinData Pointer to a buffer to get binary data pwDataLength Buffer 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 )
Parameter Description
X Horizontal coordinate to draw the box from Y Vertical coordinate to draw the box from Width Horizontal size of the box in pixels Height Vertical size of the box in pixels
Returns
Returns TRUE if successful, FALSE otherwise.
See Also
padClearPixel, padFrame, padInvert, padLine, padSetPixel

padClear

0,0
x,y
H
W
Clears the entire LCD screen if one is attached.
Syntax
void padClear( void
)
See Also
padIsLcd, padPutText, padPutBits, padPutLogo

padClearPixel

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 )
Parameter Description
X Horizontal coordinate of the pixel to set Y Vertical 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.
Syntax
BOOL padConnect ( void )
Returns
Returns TRUE if successful, FALSE otherwise.
See Also
padConnectClearScreen, padOn, padOff, padRecord, padSetPort, padSetPortAddr, padSetPortIrq, padSetType, padSetBaudRate, padGetBaudRate, padSetDefaultBaudRate, padGetDefaultBaudRate, padResetDefaultBaudRate, padResetBaudRate

padConnectClearScreen

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 )
Parameter Description
enable Flag 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 non­volatile 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 )
Parameter Description
ObjectId ID of the memory item to store pptAt Pointer 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 )
Parameter Description
wHorz The horizontal position for displaying the time wVert The vertical position for displaying the time nFontId The 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 )
Parameter Description
SendDataBlock Pointer to the block of data to send RecvDataBlock Pointer to the received data block DataLength Length 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 )
Parameter Description
lpszDatabaseName Name 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 )
Parameter Description
wId Field identification number wStyle Field style attributes; 0 for defaults wLeft X-coordinate of upper point wTop Y-coordinate of upper point wWidth Width of the signature field wHeight Height of the signature field uFont Font to be used pcText Button text to be displayed wTextLen Text length wCmdPress Command to be executed when the button is pressed pcPressArgData Command data for press command wPressArgDataLen Data length for press command wCmdRelease Command to be executed when the button is released pcReleaseArgData Command data for release command wReleaseArgDataLen Data 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 )
Parameter Description
wId Field identification number wStyle Field style attributes. 0 for defaults wLeft X-coordinate of upper point wTop Y-coordinate of upper point wWidth Width of the signature field wHeight Height of the signature field wMaxPoints Max points that are allowed to be entered to the signature field wEnterTime Penup time out in seconds, which is used for AUTO ENTER wEnterCmd The command to be executed when ENTER button is pressed pcData Command data buffer nDataLen Length 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
Parameter Description
wId Field 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 )
Parameter Description
wId Field identification number pcName Variable name wNameLen Name length
See Also
padBox, padClearPixel, padInvert, padLine, padSetPixel

padFrame

Draws a frame on the LCD screen.
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 )
Parameter Description
X Horizontal coordinate from which the frame is drawn Y Vertical coordinate from which the frame is drawn Width Horizontal size of the frame in pixels Height Vertical size of the frame in pixels
Returns
Returns TRUE if successful, FALSE otherwise.
0,0
x,y
H
W
See Also
3-8
padBox, padClearPixel, padInvert, padLine, padSetPixel

padGet

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 )
Parameter Description
XPosition Pointer to an integer to hold the new horizontal coordinate of the pen YPosition Pointer to an integer to hold the new vertical coordinate of the pen Pen Pointer 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 )
Parameter Description
Tracks Total tracks Track1 Pointer to the track1 Track1Size Pointer to the track1 size Track2 Pointer to the track2 Track2Size Pointer to the track2 size Track3 Pointer to the track3 Track3Size Pointer to the track3 size
Returns
Returns TRUE if the function call succeeds, FALSE otherwise.
See Also
padGetMaxCardTrackSize, padGetMaxCardTracks, padResetMagCard, padGetMagTrack
3-9

padGetArea

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 )
Parameter Description
xLeft Pointer to an integer to hold the minimum horizontal coordinate yTop Pointer to an integer to hold the minimum vertical coordinate xRight Pointer to an integer to hold the maximum horizontal coordinate yBottom Pointer 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