ACR89U-A1 – Reference Manual
Version 1.04
www.acs.com.hk
Page 53 of 57
Parameters:
nDevId
[in] Handle returned by a previous call to
AS_Open
.
pKeypadInput
[in] Pointer to a
KEYPADINPUT
structure that specifies the options to use when
ACR89 captures key input. See also section 2.2.3 for more information about the
KEYPADINPUT
structure.
pDataBlock
[out] Pointer to a
DATABLOCK
structure that contains the pressed keys (if any).
See also
Section 4.1.3.5
for more information about the
DATABLOCK
structure.
Return Values:
AS_STATUS
This functions returns different values depending on whether it succeeds or fails.
AS_STATUS.DllError
contains the status as returned by the DLL.
AS_STATUS.W32Error
contains the Win32 error code associated with the DLL
error, if any. See also
Appendix A
for the possible return codes.
Example:
4.2.6.
Real-time Clock Functions
The Real-time Clock Functions allow reading and setting of the built-in Run Time Clock of the ACR89.
4.2.6.1. AS_ReadRTC
This function reads the current real time clock value from the built-in real-time clock. The real-time
clock increments the value every half second.
AS_STATUS AS_DECL
AS_ReadRTC
(
IN INT nDevId,
OUT PTIMESTAMP pTimeStamp);
Parameters:
nDevId
[in] Handle returned by a previous call to
AS_Open
.
pTimeStamp
[out] Pointer to
TIMESTAMP
structure that contains current time returned by the
built-in real time clock of the ACR89. See also
Section 4.1.4.1
information about the
TIMESTAMP
structure.
BYTE aKeys[16];
KEYPADINPUT kpInput;
DATABLOCK dataBlk;
AS_STATUS status;
//let the user input a string
//assumed is that a connection has already been established
dataBlk.pDataBlock = aKeys;
kpInput.bEnableKeyString = TRUE;
//input a string
kpInput.bEnableAlphanumeric = TRUE;
//string is alphanumeric
kpInput.bEnableKeyDisplay = TRUE;
//display the keys on the LCD
kpInput.bEnableMaskedDisplay = FALSE;
//no masking of the keys
kpInput.bEnableControlKeys = FALSE;
//control keys disabled
kpInput.bDisableTimeout = 1;
//no timeout
kpInput.bEnableKeyEncryption = 0;
//no encryption of returned keys
status = AS_GetKeyInput(nDid,&kpInput,&data);