0% found this document useful (0 votes)
338 views267 pages

UCS SDK v4.0 Programmer's Manual - Eng

Uploaded by

God's_Servant
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
338 views267 pages

UCS SDK v4.0 Programmer's Manual - Eng

Uploaded by

God's_Servant
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 267

UNION COMMUNITY

Server SDK For Windows

Programmer’s Guide
Version 4.0

October, 2009

Software Development Department

UNION COMMUNITY Co., Ltd.

Copyright © 2008, UNION COMMUNITY Co., Ltd.


All rights reserved.

Union Community Co., LTD.


Hyundai Topics Bldg., 44-3, Bangi-dong, Songpa-gu, Seoul 138-050 Korea
Tel : +82-6488-3000, Fax : +82-6488-3099 http://www.unioncomm.co.kr
USER License Agreement for Software Developer's Kit
Designed by Union Community Co., Ltd

This agreement is a legal usage license agreement between Union Community Co.,
Ltd. and the user.
If you do not agree with the terms and condition of the agreement, please return the product promptly. If
you return the product, you will receive a refund.

1. Usage License
UNION COMMUNITY Co., Ltd. Grants licensee to use this SDK a personal, Limited, non-transferable, non-
exclusive right to install and use one copy of the SDK on a single computer exclusively.
The software is considered 'being used' if it is stored in a computer's main or other storage device. The
number of software copies will be determined by taking the greater number of the number of computers
'used' by the software and the number of computers where the software is stored.
Licensee may use the SDK solely for developing, designing, and testing UNION software applications for use
with UNION products ("Applications").

2. Right to Upgrade
If you have purchased the software by upgrading an older version, the usage license of the old version is
transferred to the new version. However, you may only use the old version under the condition that the old
and new versions are not running simultaneously. Therefore, you are prohibited from transferring, renting or
selling the old version. You maintain the usage license for the program and ancillary files that are in the old
version but not in the new version.

3. Assignment of License
If you wish to transfer the usage license of this software to a third party, you must first obtain a written
statement indicating that the recipient agrees with this agreement. You must then transfer the original disk
and all other program components, and all copies of the program must be destroyed. After the transfer is
completed, you must notify UNION COMMUNITY Co., Ltd. to update the customer registration.
Licensee shall not rent, lease, sell or lend the software application developed using the SDK to a third party
without UNION's prior written consent.
Licensee shall not copy and redistribute the SDK without UNION's prior written consent.

Copyright 2009 UNIONCOMMUNITY Co., LTD. 2


No other uses and/or distribution of the SDK or Sample Code are permitted without UNION's prior written
consent. UNION reserves all rights not expressly granted to Licensee.

4. Copyright
All copyrights and intellectual properties of the software and its components belong to UNION COMMUNITY
Co., Ltd., and these rights are protected under Korean and international copyright laws. Therefore, you may
not make copies of the software other than for your personal backup purposes. In addition, you may not
modify the software other than for reverse-engineering purposes to secure compatibility. Finally, you may not
modify, transform or copy any part of the documentation without written permission from UNION
COMMUNITY. (If you're using a network product, you may copy the documentation in the amount of the
number of users)

5. Installation
An individual user can install this software in his/her PCs at home and office, as well as in a mobile PC.
However, the software must not be running from two computers simultaneously. A single product can be
installed in two or more computers in one location, but one of those computers must have a usage rate of at
least 70%. If another computer has a usage rate of 31% or higher, another copy of the software must be
purchased.

6. Limitation of Warranty
UNION COMMUNITY Co., Ltd. guarantees that the CD-ROM and all components are free of physical damage
for a year after purchase.
UNION DISCLAIMS ALL WARRANTIES NOT EXPRESSLY PROVIDED IN THIS AGREEMENT INCLUDING,
WITHOUT LIMITATION ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE. If you find any manufacture defect within the warranty period, we will replace the product. You
must be able to prove that the product has been purchased within a year to receive a replacement. However,
we will not replace a product damaged due to your mishandling or negligence. UNION COMMUNITY Co.,
Ltd. does not guarantee that the software and its features will satisfy your specific needs, and is not liable for
any consequential damages arising out of the use of this product.

7. Liabilities
UNION COMMUNITY Co., Ltd. is not liable for any verbal, written or other agreements made by third parties,
including product suppliers and dealers.

8. Termination

Copyright 2009 UNIONCOMMUNITY Co., LTD. 3


This agreement is valid until the date of termination. However, the agreement shall terminate automatically if
you damaged the program or its components, or failed to comply with the terms described in this
agreement.

9. Customer Service
UNION COMMUNITY Co., Ltd. makes every effort to provide registered customers with technical assistance
and solutions to problems regarding software applications under certain system environments. When a
customer submits a suggestion about any inconvenience or anomaly experienced during product usage,
UNION COMMUNITY Co., Ltd. will take corrective action and notify the customer of the result.

10. General Terms


You acknowledge that you have read, understood and agree with the terms of this agreement. You also
recognize the fact that this agreement has precedence over user agreements of older versions, past order
agreements, advertisement notifications and/or other written agreements.

11. Contact
If you have any questions about this agreement, please contact UNION COMMUNITY Co.,
Ltd. via telephone, fax or e-mail.

Copyright 2009 UNIONCOMMUNITY Co., LTD. 4


Table of Contents

1. Overview.......................................................................................................................................................18
1.1 Application..........................................................................................................................................18
1.2 Special Features...................................................................................................................................18
1.3 Development Environment..................................................................................................................19
1.4 Module Organization...........................................................................................................................19
1.5 Development Model............................................................................................................................21
1.6 Terminology Description......................................................................................................................22
2. Installation....................................................................................................................................................30
2.1 System Requirements..........................................................................................................................30
2.2 Installation...........................................................................................................................................31
2.3 Files to be installed..............................................................................................................................35
2.3.1 Windows System Directory........................................................................................................35
2.3.2 GAC (Global Assembly Cache) Folder.........................................................................................35
2.3.3 (Installation Folder)\Bin............................................................................................................35
2.3.4 (Installation Folder)\dotNET.....................................................................................................35
2.3.5 (Installation Folder)\dotNET\Setup.........................................................................................36
2.3.6 (Installation Folder)\Inc............................................................................................................36
2.3.7 (Installation Folder)\Lib............................................................................................................36
2.3.8 (Installation Folder)\Samples....................................................................................................36
2.3.9 (Installation Folder)\Skins.........................................................................................................37
3. API Reference for DLL...................................................................................................................................38
3.1 Type definitions...................................................................................................................................38
3.1.1 Basic types.................................................................................................................................38
UCSAPI_SINT8 / UCSAPI_SINT16 / UCBioAPI_SINT32...................................................................38
UCSAPI_UINT8 / UCSAPI_UINT16 / UCBioAPI_UINT32.................................................................38
UCSAPI_SINT / UCSAPI_UINT.......................................................................................................38
UCSAPI_VOID_PTR.......................................................................................................................38
UCSAPI_BOOL..............................................................................................................................38
UCSAPI_CHAR / UCSAPI_CHAR_PTR.............................................................................................38
UCSAPI_NULL...............................................................................................................................38
UCSAPI_HWND............................................................................................................................39

Copyright 2009 UNIONCOMMUNITY Co., LTD. 5


3.1.2 General types.............................................................................................................................39
UCSAPI_RETURN..........................................................................................................................39
UCSAPI_DATE_TIME_INFO............................................................................................................39
UCSAPI_MESSAGE........................................................................................................................39
3.1.3 User information related types...................................................................................................40
UCSAPI_ACCESS_DATE_TYPE........................................................................................................40
UCSAPI_ACCESS_AUTHORITY.......................................................................................................40
UCSAPI_CARD_DATA....................................................................................................................41
UCSAPI_FINGER_DATA.................................................................................................................41
UCSAPI_FACE_INFO......................................................................................................................42
UCSAPI_FACE_DATA.....................................................................................................................43
UCSAPI_AUTH_DATA....................................................................................................................43
UCSAPI_PICTURE_HEADER...........................................................................................................44
UCSAPI_PICTURE_DATA...............................................................................................................44
UCSAPI_USER_COUNT..................................................................................................................45
UCSAPI_USER_INFO.....................................................................................................................46
UCSAPI_USER_DATA....................................................................................................................46
UCSAPI_ERROR_TYPE...................................................................................................................47
3.1.4 Log related types.......................................................................................................................47
UCSAPI_GET_LOG_TYPE................................................................................................................48
UCSAPI_ACCESS_LOG_DATA........................................................................................................48
3.1.5 Callback related types................................................................................................................49
UCSAPI_CALLBACK_EVENT_HANDLER..........................................................................................49
UCSAPI_CALLBACK_PARAM_0......................................................................................................50
UCSAPI_PROGRESS_INFO.............................................................................................................51
UCSAPI_CALLBACK_PARAM_1......................................................................................................51
UCSAPI_CALLBACK_DATA_TYPE...................................................................................................52
3.1.6 Access control setting related types...........................................................................................52
UCSAPI_TIMEZONE......................................................................................................................52
UCSAPI_ACCESS_TIMEZONE........................................................................................................53
UCSAPI_ACCESS_TIMEZONE_DATA..............................................................................................53
UCSAPI_ACCESS_HOLIDAY...........................................................................................................54
UCSAPI_ACCESS_HOLIDAY_DATA.................................................................................................54
UCSAPI_ACCESS_TIMEZONE_CODE..............................................................................................55
UCSAPI_ACCESS_TIME..................................................................................................................56

Copyright 2009 UNIONCOMMUNITY Co., LTD. 6


UCSAPI_ACCESS_TIME_DATA.......................................................................................................56
UCSAPI_ACCESS_GROUP..............................................................................................................57
UCSAPI_ACCESS_GROUP_DATA...................................................................................................58
UCSAPI_ACCESS_CONTROL_DATA_TYPE......................................................................................58
UCSAPI_ACCESS_CONTROL_DATA...............................................................................................59
3.1.7 Authentication related types......................................................................................................59
UCSAPI_AUTH_TYPE.....................................................................................................................59
UCSAPI_AUTH_MODE..................................................................................................................60
UCSAPI_INPUT_DATA_CARD........................................................................................................60
UCSAPI_INPUT_DATA_PASSWORD...............................................................................................61
UCSAPI_INPUT_DATA_FINGER_1_TO_1.........................................................................................61
UCSAPI_INPUT_DATA_FINGER_1_TO_N........................................................................................62
UCSAPI_INPUT_DATA_TYPE..........................................................................................................63
UCSAPI_INPUT_DATA...................................................................................................................63
UCSAPI_INPUT_ID_TYPE...............................................................................................................64
UCSAPI_INPUT_ID_DATA..............................................................................................................65
UCSAPI_AUTH_INFO....................................................................................................................65
UCSAPI_AUTH_NOTIFY.................................................................................................................66
3.1.8 Terminal option setting related types........................................................................................67
UCSAPI_TERMINAL_TIMEZONE....................................................................................................67
UCSAPI_TERMINAL_DAY_SCHEDULE............................................................................................68
UCSAPI_HOLIDAY_TYPE................................................................................................................69
UCSAPI_TERMINAL_HOLIDAY_INFO.............................................................................................69
UCSAPI_TERMINAL_SCHEDULE....................................................................................................70
UCSAPI_SECURITY_LEVEL.............................................................................................................71
UCSAPI_ANTIPASSBACK_LEVEL....................................................................................................71
UCSAPI_NETWORK_INFO.............................................................................................................72
UCSAPI_SERVER_INFO..................................................................................................................73
UCSAPI_TERMINAL_OPTION_FLAG...............................................................................................73
UCSAPI_TERMINAL_OPTION........................................................................................................74
UCSAPI_ACU_OPTION..................................................................................................................76
UCSAPI_ACU_LOCKSCHEDULE.....................................................................................................77
3.1.9 Monitoring related types............................................................................................................78
UCSAPI_TERMINAL_STATUS.........................................................................................................78
UCSAPI_ACU_STATUS_INFO.........................................................................................................79

Copyright 2009 UNIONCOMMUNITY Co., LTD. 7


UCSAPI_TERMINAL_CONTROL.....................................................................................................80
3.2 API References.....................................................................................................................................82
3.2.1 General API................................................................................................................................82
UCSAPI_ServerStart......................................................................................................................82
UCSAPI_ServerStop......................................................................................................................84
UCSAPI_SetTerminalTimezone......................................................................................................85
UCSAPI_SetError...........................................................................................................................87
UCSAPI_SetWiegandFormatToTerminal........................................................................................88
3.2.2 Terminal User Management API.................................................................................................90
UCSAPI_AddUserToTerminal........................................................................................................90
UCSAPI_DeleteUserFromTerminal................................................................................................92
UCSAPI_DeleteAllUserFromTerminal.............................................................................................94
UCSAPI_GetUserCountFromTerminal............................................................................................95
UCSAPI_GetUserInfoListFromTerminal..........................................................................................96
UCSAPI_GetUserDataFromTerminal..............................................................................................97
UCSAPI_RegistFaceFromTerminal.................................................................................................98
3.2.3 Log related API..........................................................................................................................99
UCSAPI_GetAccessLogCountFromTerminal..................................................................................99
UCSAPI_GetAccessLogCountFromTerminalEx.............................................................................100
UCSAPI_GetAccessLogFromTerminal..........................................................................................102
UCSAPI_GetAccessLogFromTerminalEx......................................................................................104
3.2.4 Authentication related API.......................................................................................................106
UCSAPI_SendAuthInfoToTerminal..............................................................................................106
UCSAPI_SendAntipassbackResultToTerminal..............................................................................108
UCSAPI_SendAuthResultToTerminal...........................................................................................110
3.2.5 Terminal Management API.......................................................................................................112
UCSAPI_GetTerminalCount.........................................................................................................112
UCSAPI_GetFirmwareVersionFromTerminal................................................................................113
UCSAPI_UpgradeFirmwareToTerminal........................................................................................114
UCSAPI_SendUserFileToTerminal................................................................................................115
UCSAPI_GetOptionFromTerminal...............................................................................................116
UCSAPI_SetOptionToTerminal....................................................................................................118
UCSAPI_OpenDoorToTerminal...................................................................................................118
UCSAPI_SetDoorStatusToTerminal.............................................................................................119
UCSAPI_SendTerminalControl....................................................................................................120

Copyright 2009 UNIONCOMMUNITY Co., LTD. 8


UCSAPI_SetAccessControlDataToTerminal.................................................................................122
UCSAPI_GetTerminalInfo............................................................................................................123
UCSAPI_SendPrivateMessageToTerminal....................................................................................124
UCSAPI_SendPublicMessageToTerminal.....................................................................................125
UCSAPI_SendSirenToTerminal....................................................................................................126
UCSAPI_SetSmartCardLayoutToTerminal....................................................................................128
3.2.6 ACU Management API.............................................................................................................130
UCSAPI_GetOptionFromACU......................................................................................................130
UCSAPI_SetOptionToACU..........................................................................................................130
UCSAPI_GetLockScheduleFromACU...........................................................................................131
UCSAPI_SetLockScheduleToACU................................................................................................132
UCSAPI_SetDoorStatusToACU....................................................................................................133
3.3 Callback Event References.................................................................................................................135
3.3.1 Events for request from terminal.............................................................................................135
UCSAPI_CALLBACK_EVENT_CONNECTED...................................................................................135
UCSAPI_CALLBACK_EVENT_DISCONNECTED..............................................................................135
UCSAPI_CALLBACK_EVENT_TERMINAL_STATUS.........................................................................135
UCSAPI_CALLBACK_EVENT_ACU_STATUS...................................................................................135
3.3.2 Events of Response for server command.................................................................................136
UCSAPI_CALLBACK_EVENT_REALTIME_ACCESS_LOG..................................................................136
UCSAPI_CALLBACK_EVENT_GET_ACCESS_LOG............................................................................136
UCSAPI_CALLBACK_EVENT_GET_ACCESS_LOG_COUNT..............................................................136
UCSAPI_CALLBACK_EVENT_ADD_USER.......................................................................................136
UCSAPI_CALLBACK_EVENT_DELETE_USER..................................................................................136
UCSAPI_CALLBACK_EVENT_DELETE_ALL_USER...........................................................................137
UCSAPI_CALLBACK_EVENT_GET_USER_COUNT...........................................................................137
UCSAPI_CALLBACK_EVENT_GET_USER_INFO_LIST.......................................................................137
UCSAPI_CALLBACK_EVENT_GET_USER_DATA.............................................................................137
UCSAPI_CALLBACK_EVENT_VERIFY_USER_AUTH_INFO...............................................................137
UCSAPI_CALLBACK_EVENT_VERIFY_FINGER_1_TO_1...................................................................137
UCSAPI_CALLBACK_EVENT_VERIFY_FINGER_1_TO_N..................................................................138
UCSAPI_CALLBACK_EVENT_VERIFY_CARD..................................................................................138
UCSAPI_CALLBACK_EVENT_VERIFY_PASSWORD.........................................................................138
UCSAPI_CALLBACK_EVENT_GET_TERMINAL_OPTION.................................................................138
UCSAPI_CALLBACK_EVENT_SET_TERMINAL_OPTION..................................................................138

Copyright 2009 UNIONCOMMUNITY Co., LTD. 9


UCSAPI_CALLBACK_EVENT_FW_UPGRADING.............................................................................138
UCSAPI_CALLBACK_EVENT_FW_UPGRADED...............................................................................139
UCSAPI_CALLBACK_EVENT_FW_VERSION...................................................................................139
UCSAPI_CALLBACK_EVENT_USERFILE_UPGRADING....................................................................139
UCSAPI_CALLBACK_EVENT_USERFILE_UPGRADED......................................................................139
UCSAPI_CALLBACK_EVENT_OPEN_DOOR...................................................................................139
UCSAPI_CALLBACK_EVENT_TERMINAL_CONTROL......................................................................139
UCSAPI_CALLBACK_EVENT_PICTURE_LOG..................................................................................139
UCSAPI_CALLBACK_EVENT_ANTIPASSBACK...............................................................................140
UCSAPI_CALLBACK_EVENT_SET_ACCESS_CONTROL_DATA.........................................................140
UCSAPI_CALLBACK_EVENT_REGIST_FACE...................................................................................140
UCSAPI_CALLBACK_EVENT_GET_TERMINAL_OPTION.................................................................141
UCSAPI_CALLBACK_EVENT_SET_TERMINAL_OPTION..................................................................141
UCSAPI_CALLBACK_EVENT_GET_ACU_OPTION...........................................................................141
UCSAPI_CALLBACK_EVENT_SET_ACU_OPTION...........................................................................141
UCSAPI_CALLBACK_EVENT_GET_ACU_LOCKSCHEDULE..............................................................141
UCSAPI_CALLBACK_EVENT_SET_ACU_LOCKSCHEDULE...............................................................142
UCSAPI_CALLBACK_EVENT_GET_SIREN.......................................................................................142
UCSAPI_CALLBACK_EVENT_SET_SIREN.......................................................................................142
UCSAPI_CALLBACK_EVENT_SET_SMARTCARD_LAYOUT..............................................................142
3.4 Error definitions.................................................................................................................................143
3.4.1 Success.....................................................................................................................................143
UCSAPIERR_NONE.....................................................................................................................143
3.4.2 General error definitions..........................................................................................................143
UCSAPIERR_INVALID_POINTER..................................................................................................143
UCSAPIERR_INVALID_TYPE.........................................................................................................143
UCSAPIERR_INVALID_PARAMETER.............................................................................................144
UCSAPIERR_INVALID_DATA.......................................................................................................144
UCSAPIERR_FUNCTION_FAIL......................................................................................................144
UCSAPIERR_NOT_SERVER_ACTIVE..............................................................................................144
UCSAPIERR_INVALID_TERMINAL................................................................................................144
UCSAPIERR_PROCESS_FAIL........................................................................................................145
UCSAPIERR_USER_CANCEL.........................................................................................................145
UCSAPIERR_UNKNOWN_REASON..............................................................................................145
3.4.3 Data size related error definitions............................................................................................145

Copyright 2009 UNIONCOMMUNITY Co., LTD. 10


UCSAPIERR_CODE_SIZE..............................................................................................................145
UCSAPIERR_USER_ID_SIZE..........................................................................................................146
UCSAPIERR_USER_NAME_SIZE...................................................................................................146
UCSAPIERR_UNIQUE_ID_SIZE.....................................................................................................146
UCSAPIERR_INVALID_SECURITY_LEVEL.......................................................................................146
UCSAPIERR_PASSWORD_SIZE....................................................................................................146
UCSAPIERR_PICTURE_SIZE..........................................................................................................147
UCSAPIERR_INVALID_PICTURE_TYPE..........................................................................................147
UCSAPIERR_RFID_SIZE................................................................................................................147
UCSAPIERR_MAX_CARD_NUMBER.............................................................................................147
UCSAPIERR_MAX_FINGER_NUMBER...........................................................................................147
3.4.4 Authentication related error definitions...................................................................................148
UCSAPIERR_INVALID_USER........................................................................................................148
UCSAPIERR_UNAUTHORIZED.....................................................................................................148
UCSAPIERR_PERMISSION...........................................................................................................148
UCSAPIERR_FINGER_CAPTURE_FAIL...........................................................................................148
UCSAPIERR_DUP_AUTHENTICATION..........................................................................................149
UCSAPIERR_ANTIPASSBACK.......................................................................................................149
UCSAPIERR_NETWORK...............................................................................................................149
UCSAPIERR_SERVER_BUSY.........................................................................................................149
UCSAPIERR_FACE_DETECTION...................................................................................................149
4. API Reference for COM..............................................................................................................................150
4.1 UCSAPI Object...................................................................................................................................150
4.1.1 Properties.................................................................................................................................150
ErrorCode..................................................................................................................................150
ConnectionsOfTerminal..............................................................................................................150
TerminalUserData......................................................................................................................151
ServerUserData..........................................................................................................................151
AccessLogData...........................................................................................................................151
AccessControlData.....................................................................................................................152
TerminalMacAddr......................................................................................................................152
4.1.2 Methods...................................................................................................................................152
ServerStart.................................................................................................................................152
ServerStop.................................................................................................................................154
SetTerminalTimezone.................................................................................................................155

Copyright 2009 UNIONCOMMUNITY Co., LTD. 11


SetError......................................................................................................................................157
GetTerminalCount......................................................................................................................158
GetFirmwareVersionFromTerminal.............................................................................................159
UpgradeFirmwareToTerminal.....................................................................................................160
SendUserFileToTerminal.............................................................................................................161
OpenDoorToTerminal................................................................................................................162
SetDoorStatusToTerminal..........................................................................................................163
SendTerminalControl.................................................................................................................164
SendPrivateMessageToTerminal.................................................................................................165
SendPublicMessageToTerminal..................................................................................................165
SetWiegandFormatToTerminal...................................................................................................166
SetDoorStatusToACU.................................................................................................................167
4.2 IServerUserData Interface..................................................................................................................168
4.2.1 Properties.................................................................................................................................168
UserID........................................................................................................................................168
UniqueID...................................................................................................................................168
UserName..................................................................................................................................168
AccessGroup..............................................................................................................................169
SecurityLevel..............................................................................................................................169
IsCheckSimilarFinger..................................................................................................................169
IsAdmin.....................................................................................................................................170
IsIdentify....................................................................................................................................170
Password...................................................................................................................................170
FaceNumber..............................................................................................................................170
FaceData....................................................................................................................................171
IsFace1toN.................................................................................................................................171
IsBlacklist...................................................................................................................................171
4.2.2 Methods...................................................................................................................................172
InitUserData...............................................................................................................................172
SetAuthType..............................................................................................................................172
SetFPSampleData.......................................................................................................................174
AddFingerData...........................................................................................................................174
SetDuressFinger.........................................................................................................................175
SetCardData...............................................................................................................................176
SetPictureData...........................................................................................................................177

Copyright 2009 UNIONCOMMUNITY Co., LTD. 12


SetAccessDate...........................................................................................................................178
AddUserToTerminal...................................................................................................................179
4.3 ITerminalUserData Interface...............................................................................................................180
4.3.1 Properties.................................................................................................................................180
CurrentIndex / TotalNumber......................................................................................................180
UserID........................................................................................................................................180
UniqueID...................................................................................................................................181
UserName..................................................................................................................................181
AccessGroup..............................................................................................................................181
IsAdmin.....................................................................................................................................182
IsIdentify....................................................................................................................................182
AccessDateType.........................................................................................................................182
StartAccessDate/EndAccessDate................................................................................................183
SecurityLevel..............................................................................................................................183
IsAndOperation..........................................................................................................................184
IsFinger......................................................................................................................................185
IsFPCard.....................................................................................................................................185
IsCard........................................................................................................................................186
IsCardID.....................................................................................................................................186
IsPassword.................................................................................................................................187
Password...................................................................................................................................187
CardNumber..............................................................................................................................187
RFID...........................................................................................................................................188
PictureDataLength.....................................................................................................................188
PictureData................................................................................................................................189
TotalFingerCount.......................................................................................................................189
FingerID.....................................................................................................................................190
SampleNumber..........................................................................................................................190
FPSampleData............................................................................................................................191
FaceNumber..............................................................................................................................191
FaceData....................................................................................................................................191
IsBlacklist...................................................................................................................................192
4.3.2 Methods...................................................................................................................................193
GetUserCountFromTerminal.......................................................................................................193
GetUserDataFromTerminal.........................................................................................................195

Copyright 2009 UNIONCOMMUNITY Co., LTD. 13


DeleteUserFromTerminal............................................................................................................196
DeleteAllUserFromTerminal........................................................................................................197
RegistFaceFromTerminal............................................................................................................197
4.4 IAccessLogData Interface...................................................................................................................199
4.4.1 Properties.................................................................................................................................199
CurrentIndex / TotalNumber......................................................................................................199
UserID........................................................................................................................................199
AuthType...................................................................................................................................200
AuthMode.................................................................................................................................200
DateTime...................................................................................................................................201
IsAuthorized..............................................................................................................................201
RFID...........................................................................................................................................201
PictureDataLength.....................................................................................................................202
PictureData................................................................................................................................202
4.4.2 Methods...................................................................................................................................203
SetPeriod...................................................................................................................................203
GetAccessLogCountFromTerminal..............................................................................................204
GetAccessLogFromTerminal.......................................................................................................206
4.5 IAccessControlData Interface.............................................................................................................208
4.5.1 Properties.................................................................................................................................208
4.5.2 Methods...................................................................................................................................209
InitData......................................................................................................................................209
SetTimeZone..............................................................................................................................210
SetAccessTime...........................................................................................................................212
SetHoliday.................................................................................................................................214
SetAccessGroup.........................................................................................................................215
SetAccessControlDataToTerminal...............................................................................................216
4.6 IServerAuthentication Interface..........................................................................................................218
4.6.1 Properties.................................................................................................................................218
DeviceID....................................................................................................................................218
4.6.2 Methods...................................................................................................................................219
SetAuthType..............................................................................................................................219
SendAuthInfoToTerminal...........................................................................................................221
SendAuthResultToTerminal........................................................................................................222
SendAntipassbackResultToTerminal...........................................................................................224

Copyright 2009 UNIONCOMMUNITY Co., LTD. 14


4.7 ITerminalOption Interface..................................................................................................................225
4.7.1 Properties.................................................................................................................................225
f l a g S e c u L e v e l / f l a g I n p u t I D L e n g t h / f l a g A u t o E n t e r K e y / f
f l a g A p p l i c a t i o n / f l a g A n t i p a s s b a c k / f l a g N e t w o r k /
flagPrintText / flagSchedule.......................................................................................................225
SecurityLevel_1To1 / SecurityLevel_1ToN...................................................................................225
InputIDLength............................................................................................................................226
AutoEnterKey.............................................................................................................................226
Sound........................................................................................................................................227
Authentication...........................................................................................................................227
Application................................................................................................................................228
Antipassback..............................................................................................................................228
NetworkType / TerminalIP / Subnet / Gateway / ServerIP / Port...............................................229
InputIDType...............................................................................................................................230
AccessLevel................................................................................................................................230
PrintText....................................................................................................................................231
IsUse / StartHour / StartMinute / EndHour / EndMinute...........................................................231
Month / Day..............................................................................................................................232
4.7.2 Methods...................................................................................................................................234
SetOptionToTerminal.................................................................................................................234
GetOptionFromTerminal............................................................................................................235
SetDaySchedule.........................................................................................................................237
GetDaySchedule........................................................................................................................239
SetHoliday.................................................................................................................................240
GetHoliday.................................................................................................................................241
Clear..........................................................................................................................................242
get_ACUStatusValue..................................................................................................................243
ACUGetReaderVersion...............................................................................................................243
GetOptionFromACU...................................................................................................................244
SetOptionToACU.......................................................................................................................245
GetLockScheduleFromACU........................................................................................................245
SetLockScheduleToACU.............................................................................................................246
ClearSirenConfig........................................................................................................................247
SetSirenConfig...........................................................................................................................247
SetSirenToTerminal....................................................................................................................247

Copyright 2009 UNIONCOMMUNITY Co., LTD. 15


GetSirenFromTerminal...............................................................................................................248
GetSirenConfig...........................................................................................................................248
4.8 ISmartCardLayout Interface................................................................................................................249
4.8.1 Properties.................................................................................................................................249
SectorNumber...........................................................................................................................249
4.8.2 Methods...................................................................................................................................249
ClearSectorLayout......................................................................................................................249
SetSectorLayout.........................................................................................................................250
SetSmartCardLayoutToTerminal.................................................................................................251
4.9 Events of COM..................................................................................................................................252
EventUserFileUpgrading.............................................................................................................252
EventUserFileUpgraded..............................................................................................................253
EventRegistFace.........................................................................................................................253
EventACUStatus.........................................................................................................................254
EventGetLockScheduleFromACU................................................................................................255
EventSetLockScheduleToACU.....................................................................................................255
EventSetSirenToTerminal............................................................................................................256
EventGetSirenFromTerminal.......................................................................................................256
EventSetSmartCardLayout..........................................................................................................256
5. Error definitions..........................................................................................................................................257
5.1 Success..............................................................................................................................................257
UCSAPIERR_NONE.....................................................................................................................257
5.2 General error definitions....................................................................................................................257
UCSAPIERR_INVALID_POINTER..................................................................................................257
UCSAPIERR_INVALID_TYPE.........................................................................................................258
UCSAPIERR_INVALID_PARAMETER.............................................................................................258
UCSAPIERR_INVALID_DATA.......................................................................................................258
UCSAPIERR_FUNCTION_FAIL......................................................................................................258
UCSAPIERR_NOT_SERVER_ACTIVE..............................................................................................258
UCSAPIERR_INVALID_TERMINAL................................................................................................259
UCSAPIERR_PROCESS_FAIL........................................................................................................259
UCSAPIERR_USER_CANCEL.........................................................................................................259
UCSAPIERR_UNKNOWN_REASON..............................................................................................259
5.3 Data szie related error definitions.....................................................................................................259
UCSAPIERR_CODE_SIZE..............................................................................................................259

Copyright 2009 UNIONCOMMUNITY Co., LTD. 16


UCSAPIERR_USER_ID_SIZE..........................................................................................................260
UCSAPIERR_USER_NAME_SIZE...................................................................................................260
UCSAPIERR_UNIQUE_ID_SIZE.....................................................................................................260
UCSAPIERR_INVALID_SECURITY_LEVEL.......................................................................................260
UCSAPIERR_PASSWORD_SIZE....................................................................................................260
UCSAPIERR_PICTURE_SIZE..........................................................................................................261
UCSAPIERR_INVALID_PICTURE_TYPE..........................................................................................261
UCSAPIERR_RFID_SIZE................................................................................................................261
UCSAPIERR_MAX_CARD_NUMBER.............................................................................................261
UCSAPIERR_MAX_FINGER_NUMBER...........................................................................................261
5.4 Authentication related error definitions.............................................................................................262
UCSAPIERR_INVALID_USER........................................................................................................262
UCSAPIERR_UNAUTHORIZED.....................................................................................................262
UCSAPIERR_PERMISSION...........................................................................................................262
UCSAPIERR_FINGER_CAPTURE_FAIL...........................................................................................262
UCSAPIERR_DUP_AUTHENTICATION..........................................................................................262
UCSAPIERR_ANTIPASSBACK.......................................................................................................263
UCSAPIERR_NETWORK...............................................................................................................263
UCSAPIERR_SERVER_BUSY.........................................................................................................263
UCSAPIERR_FACE_DETECTION...................................................................................................263

Copyright 2009 UNIONCOMMUNITY Co., LTD. 17


1. Overview

UCS (UNION C OMMUNITY


S S w created
erver)
int he
f DK
o orm
a h as f S t igh-level
facilitate t he DK
development o a pf pplication
t c w w rograms
t n f hat an
r ork d oith he
UNION COMMUNITY.

UCS S DK
provides t he i nterface
( application
P I rogramming
A r i nter
the d evelopment
o fingerprint r f ecognition
s a p erver
s. I tc b
anpplication
u ew Used Srogram
ith CBio
for fingerprint registration and authentication.

1.1 Application

UCS S dDK t efines


s a he p erver i pplication
t c w w n rogram t nterface
p hat
provided b U yC NION I i t OMMUNITY.
a i application
t as herefore
s uch areasa s c ccess
pplied onn
time/attendance, d w a rinking
s r m
ater, nd
t facilitate
choole asy a ecord
s nd p tableanagement
ro
development.

1.2 Special Features

■ Centralized Management Type


As a m ethod
t c hat
t t onnects
t U S a he
t erminal
c b m o c CS T DK,
t o ll erm
connection is very useful in configuring a network using public networks.
If p ublic
n uetworks
t m sing
r s he( systemt
easured
c hat according
ate
harges
t t ystem
d o ohel uration
usage) a re u sed,
t m he t cethod d hatt t onnects
t w irectly
i o he
SDK’s server function can be used.

■ Provides various APIs for terminal management


Various APIs are provided for user management, log management and access control management.

■ Provides various development modules and sample sources


UCS S DK
p rovides
C m OM-based
t f d odules w t o s acilitate
a

Copyright 2009 UNIONCOMMUNITY Co., LTD. 18


Visual Basic, Delphi and DotNET as well as C/C++. Sample sources required in SDK use are also provided.

■ Provides various authentication methods


Authentication m u ethods
t s a f sing p ools a uch
c a vs ingerprint,
c o asswor
these tools are provided for user identification.

1.3 Development Environment

Modules p brovided
U S w cy CSa V DK a pere ompiled
u t S ct b C2008,
d n
using most of 32bit compilers such as Visual C++.

For d evelopers
u V B sing
D a isual
D a w
asic, a C elphi
C -basednd
m otNET
odules
a . c s nd ell N
libraries a p re t f rovided d o u acilitate
t t R evelopment
t e o s s sing
o h t hese o
use the modules.

1.4 Module Organization

■ Basic Module : UCSAPI40.dll


As a c m
ore o odule
U S i i ft m
CS m DK, t it s hea f ain r odule
t h
communication with the terminal. This module must be included for development using UCS SDK.
APIs that can be used in C/C++ are provided.
Relevant sample codes can be found at the DLL folder of the Samples folder.

■ COM Module : UCSAPICOM.dll


It i as C ( OM Component
O M m d bject t s odule)u o R odule
( A eveloped
Development) tools such as Visual Basic and Delphi, DotNet.
As U CSAPICOM.dll
exists a t a h igherl c evel t UCSAPI40.dll,
ompared U o i CSAPI40.dll
r f
operation. A t mlso, d hisn p odulea f oes
p ot
b U rovide b i hll s unctions
functions that are not provided by UCSAPI40.dll.
Relevant sample codes can be found at the COM folder of the Samples folder.

Because C OM c b an
u a e registration
sed a tfter
t he
s rystem a p egistry,
o r t rocess
C f
module a t s t he
i r ystem
b e s t equired
following l ine a ty t c ntering
he l ommand
a he a ine
pressing [Windows key + R] button.

Copyright 2009 UNIONCOMMUNITY Co., LTD. 19


Regsvr32 UCSAPICOM.dll

After this process, the COM module can be used.

■ Winsock Engine Module : WSEngine.dll


I i t t s m he t odule
h s hatI ( andles W ocket e /Oa a lInput/Output).
l
compared to UCSAPI40.dll

Copyright 2009 UNIONCOMMUNITY Co., LTD. 20


1.5 Development Model

The structure of the development model is shown in the following figure.

Application C, C++, VC++,


Layer …

VB,Delphi,DotNet

UCSAPI
API Layer
UCSAPICOM.dll

Skin Resource UCSAPI40.dll


dll
Device Driver
Layer

Copyright 2009 UNIONCOMMUNITY Co., LTD. 21


1.6 Terminology Description

■ Terminal
It is the network-type fingerprint recognition terminal provided by UNION COMMUNITY.

■ Terminal ID(TerminalID)
Terminal connected to the system to distinguish between them is the value for the Key.
How to set, refer to the manual of the terminal

■ Client
It i ts ahe pplication
p t c rogram w t phat nommunicates
-type fingerprint r ecognition
ith he
terminal.

■ Client ID (ClientID)
The client ID is used to develop an application program with the client/server model.
The s erver
m r odule
t k t equires
i e che t sey hat
t m dentifies
e ach
a lient
this key is called ClientID.

■ 1:1 인증Authentication (1 to 1, Verification)


It i ts 1he p :1 t crocess t s hat sompares
w t f he t ubmitted( c p ample it
corresponding to the user ID for user identification.

■ 1:N Authentication (1 to N, Identification)


It i ts 1he p :N t crocess t s hat s ompares
w ap o he
o a f ubmitted t f ample
u it
identification.

■ Authentication Type
The authentication types used during user authentication are defined.
In c ase
t f he r ingerprint t u ecognition
t s a erminal
m a tses t he e erver
UserID o U r f niqueID
u i or t terminal
ser r equestst
dentification,a he uthentication
t he t t s t ype
obtain the authentication type of the user registered in the server.
Type Value Contents
1:N Fingerprint 0 1:N fingerprint authentication

Copyright 2009 UNIONCOMMUNITY Co., LTD. 22


1:1 Fingerprint 1 1:1 fingerprint authentication
Card & Fingerprint 2 By s toringfingerprints a t t he
s cmart t t ard, his
implements 1 authentication
:1 b etweenthe input f ingerprint
a nd
stored fingerprint.
Card 3 Card authentication
Password 4 Password authentication

■ Registration Authentication Type


The authentication types that are available during user registration are defined.
Authentication m u ing t ethods
ools
f u i or s ser s dentification
a f p a uchc a s ingerp
various combinations of these tools are provided.

Type Contents
Fingerprint The fingerprint is used as authentication tool.
Fingerprint Card The Fingerprint card is used as authentication tool.
By s toring
u ’s f ingerprintt
ser a emplates
t s c t t he mar
fingerprint c i ard 1 mplements
a b :1 uthenticati
the sample entered during authentication and stored template.
Password The password is used as authentication tool.
The p asswordi a c s s haracter
v w tring
a maximum of 8 digits.
Card The card is used as authentication tool.
Card or Fingerprint The card or fingerprint is used as authentication tool.
Card and Fingerprint The c ombination
o c a f f iard
u a and ingerprint s
tool.
Card or Password The card or password is used as authentication tool.
Card and Password The c ombination
o c a fingerprint
f iard
su sed
a and s uthentication
tool.
(ID and Fingerprint) or The c ombination
o I a f f o Dt c nd ingerprint
o c r
(Card and Fingerprint) and fingerprint is used as authentication tool.
(ID and Password) or The c ombination
o I a p f o tD c nd assword
o c r h
(Card and Password) and password is used as authentication tool.
Fingerprint and Password The c ombination
o f a f p ingerprint
i u a nd assw
authentication tool.
Fingerprint or Password After f ingerprint
a f uthentication
t p i u a ails, he

Copyright 2009 UNIONCOMMUNITY Co., LTD. 23


authentication tool.
Card and Password and The c ombination
o c p fa ard,
f assword
i u a nd
Fingerprint authentication tool.

■ Fingerprint Security Level


The s ecurity
l t bevel u do ef sed a uring i d ingerprint
T v uthenti
ranges f 1~9.
romU S CS r DK d ecommends
t u t f evelopers
l v I t ol vse i he ollo
high, t fhe r alse r ( eject i i ate a FRR)t f s a ncreased r ( nd i he
decreased. U CSS r DK ecommends
l 4f 1 a evel ( or a l:1 5 futhentication
1 a ver
(identification). I F i h cf AR t st r igh ompared
d l a o
a he p ecommended
c
increase t a he uthentication
l O t o h evel.
i F i hn t hea ther l and,
c b f RR
decreased.

■ Terminal Authentication Mode


The operation modes for user’s authentication and log record are defined.
Mode Value Contents
N/S 0 User a uthentication
i i a ts s mplemented
w t n i t he erve
online a a tnd t t w he t erminal
n i o hen
T a he etwork s
record i s s a ttored
s d t s he a erver I uring
t n erver uthe
is d isconnected,
t t s he t aerminal r tores
a s he uthenticati
the s tored
a uthentication
r t t s w ecordt s oi he erver
connected.
S/N 1 When t n he i o
etwork u a s nline, i i ser a uthentication
t
terminal. F t u or a he serrequest uthentication
t hat i n s s ot a t tored t
terminal, the terminal requests authentication to the server.
The a uthentication
r i a s ecord a t ts lways
W t tored t
network i o so the
nline,
authentication
nly r i s t esult
t s t s b ent o he
stored.
N/O 2 User a uthentication
i implemented o nlys a t ts he I t erver.
n i f he etw
offline, user authentication cannot be implemented.
S/O 3 User a uthentication
i i o s a mplemented
t t W t nly t
network is online, only the authentication log is sent to the server.
S/S 4 The t erminal
d n a oes c ot t tttempt
s b i oonnection
w o
for t he
c onnection
o a a fp n A pplication i rogram.

Copyright 2009 UNIONCOMMUNITY Co., LTD. 24


implemented at the terminal.

■ Terminal Application Mode


Program operation modes provided by the terminal are defined.

Mode Value Contents


Access Control 0 The terminal is operated for access control.
Time/Attendance 1 The terminal is operated for time/attendance management.
Drinking Water 2 The terminal is operated for drinking water management.

■ User Authentication Mode


The a uthentication
p d u urposes
a a uring
d T ser
e uthentication
a m re
can b u e b sed
s u yt e etting m p
o he
o t txpanded T a ode m ption
c b f h
used w hen
t p he i o rogram f t s perateda d or w ime/attendance
m
purpose.

Mode Value Contents


Office Start 0 Authenticates with office start mode
Office Leave 1 Authenticates with office leave mode
General 2 Authenticates with general mode
Work Outside 3 Authenticates with work outside mode
Return to Office 4 Authenticates with return to office mode

■ Log Get Type


UCS SDK defines three types of log to obtain log data from the terminal.
The n umber
o l t cf b ogs
s i hat van a e tored
t t t nternally
m I t m aries ccordi
capacity is exceeded, new logs are stored by deleting some of the existing records.
Type Value Contents
New Log 0 New log that was not sent to the server
Old Log 1 Log that was already sent to the server
All Logs 2 All logs stored at the terminal

■ User Property
It i st 1he -sized
byted ata f t ield d hata efines t a uthentication
indicates whether t u ype
he
i a ser
nd
administrator or not.

Copyright 2009 UNIONCOMMUNITY Co., LTD. 25


The v alue
o 1o 0c f b d r t an
e f e T u
esignated
t p v oo t ach
c ield. f to se h
value of 1 is designated.

7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Bit


Admin Identify Operation Card Card Password Reserved Fingerprint
(AND) or (OR) ID
-Admin:
The user can be designated as terminal administrator.

-Identify:
The user can be designated to use 1:N fingerprint authentication.

-Operation:
Each of authentication types can be designated to be used with AND or OR combination.
1 is set for AND combination while 0 is set for OR combination.

-CardID:
RFID c ban d e tesignated
b u l Uo oe U sed C ike d serID
n u r
card’s RFID as
authentication tool but instead, the card’s RFID is simply used as an identifier like UserID.
It must be designated using AND combination with other authentication type.

-Card:
The user can be designated to use card authentication.

-Password:
The user can be designated to use password authentication.

-Fingerprint:
The user can be designated to use fingerprint authentication.

The user property can be represented by the following 12 values.

① Fingerprint

Copyright 2009 UNIONCOMMUNITY Co., LTD. 26


7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Bit
Admin Identify 0 0 0 0 0 1

② Fingerprint-Card
7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Bit
Admin Identify 0 0 0 0 1 0

③ Password
7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Bit
Admin Identify 0 0 0 1 0 0

④ Card
7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Bit
Admin Identify 0 0 1 0 0 0

⑤ Card or Fingerprint
7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Bit
Admin Identify 0 0 1 0 0 1

⑥ Card and Fingerprint


7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Bit
Admin Identify 1 0 1 0 0 1

⑦ Card or Password
7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Bit
Admin Identify 0 0 1 1 0 0

⑧ Card and Password


7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Bit
Admin Identify 1 0 1 1 0 0

⑨ (ID and Fingerprint) or (Card and Fingerprint)


7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Bit

Copyright 2009 UNIONCOMMUNITY Co., LTD. 27


Admin Identify 0 1 0 0 0 1

⑩ (ID and Password) or (Card and Password)


7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Bit
Admin Identify 0 1 0 1 0 0

⑪ Fingerprint and Password


7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Bit
Admin Identify 1 0 0 1 0 1

⑫ Fingerprint or Password : Password authentication in case of fingerprint authentication failure


7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Bit
Admin Identify 0 0 0 1 0 1

⑬ Card and Password and Fingerprint


7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Bit
Admin 0 1 0 1 1 0 1

■ Terminal Admin
The terminal a dministrator i a u w s h r ser t c ho t as ’s s ights
ettingi o nformation
a hange
register/delete u I m sers.
t 1 t f ore
a han i d erminal
a t t dministrator
t
administrator l oginp rocess
i r w s e equired
t s s hen o t tntering F t she u etup
o t creen
terminal, the registration of the terminal administrator is recommended.

■ Terminal Status
The t erminal
periodically o i r sends
mmediately
to t he
s the
erver
s tatus
o the terminal
f a d ndconnected
evices
to the terminal when the status is changed.

Terminal Lock Status:


This value represents the operability status value of the terminal.
SDK c s anu t et ’s op peration
erminal
s a l tatus I l s s ock/unlock.
t l a n n c ock otate, h
the t erminal
a m re, b utt aintained
o he peration
a a o t t nd a ccess
n a fT he
t erminal
i
lock state does not even allow keypad operation.

Copyright 2009 UNIONCOMMUNITY Co., LTD. 28


Locking Device Control Status:
This value represents the status value of the locking device connected to the terminal.
SDK c s an et/unset
t s o t l he d tatus c f t he
t t ockinga o s eviceI o sonnected
access is allowed without user authentication.

Locking Device Monitoring Status:


This v alue
r epresents
o s pen/closed
v o t l tatus
d r alue f tf he
locking device with monitoring support.

Terminal Cover Status:


This value represents the open/closed status value of the terminal cover.

Status Value Content


Terminal Status 0 Normal
1 Lock state
Locking Device Control 0 Closed state
Status 1 Open state
Locking Device 0 Closed state
Monitoring Status 1 Open state
2 State that is not monitoring
Terminal Cover Open 0 Closed state
Status 1 Open state
< Terminal Status Information Summary >

Copyright 2009 UNIONCOMMUNITY Co., LTD. 29


2. Installation

2.1 System Requirements

■ CPU
Intel Pentium 133MHz or higher
■ Memory
16MB or higher
■ USB Port
USB 1.1
■ OS
Windows 98/ME or 2000/XP/2003/Vista/Windows 7

Copyright 2009 UNIONCOMMUNITY Co., LTD. 30


2.2 Installation

If the installation CD is inserted, Setup.exe is executed automatically.

Copyright 2009 UNIONCOMMUNITY Co., LTD. 31


Follow the step-by-step procedures for installation.

Enter the user information and product serial number.

Copyright 2009 UNIONCOMMUNITY Co., LTD. 32


Copyright 2009 UNIONCOMMUNITY Co., LTD. 33
Copyright 2009 UNIONCOMMUNITY Co., LTD. 34
2.3 Files to be installed

When S i DK installation
completed normally, st f he f ollowing
a i a t iles
d re i nstalled
folders.

2.3.1 Windows System Directory


Core modules for the use of SDK are installed. The following files are installed.

UCSAPI40.dll
Core module of UCS SDK. It is in charge of performing all functions of SDK.

UCSAPICOM.dll
COM module for RAD tool developer.

WSEngine.dll
Communication module for Windows socket I/O handling.

2.3.2 GAC (Global Assembly Cache) Folder


The following f ile i i s nstalled
a t G f t w he c ACl folder
. f here e lass i ibrary
installed. It is installed when installing the library for .NET during SDK installation.

2.3.3 (Installation Folder)\Bin


Core files and sample execution files required in SDK execution are included.

UCSAPI40.dll / UCSAPICOM.dll / WSEngine.dll


Files identical to the ones installed at the Windows system32 folder.

Demo application
Several n umbers
o d p ft emo
c be u sed
rograms
t test theo functionshat
o U San f a iCS DK re
All demo program sources are provided at the Samples folder.

2.3.4 (Installation Folder)\dotNET


Class library files for .NET required in SDK execution are included.

Copyright 2009 UNIONCOMMUNITY Co., LTD. 35


UNIONCOMM.SDK.UCSAPI40.dll
The class library module for .NET. File identical to the one installed at GAC.

2.3.5 (Installation Folder)\dotNET\Setup


Files to install class library for .NET at GAC are included.

Setup.exe (UCSAPI40.NET_Setup.msi)
Class library installation file for .NET

2.3.6 (Installation Folder)\Inc

UCSAPI.h
In c ase
t f ihisi ile a t s m ncluded
h f o Us S he U ain eader
U ile
a f CS
UCSAPI_Type.h files are included internally and automatically.

UCSAPI_Basic.h
The default data types used in UCS SDK are defined.

UCSAPI_Error.h
Error values used in UCSAPI40 module are defined.

UCSAPI_Type.h
Data type and structure information used in UCS SDK are defined.

2.3.7 (Installation Folder)\Lib


The link library file for development at VC++ using SDK is included.

UCSAPI40.lib
The link library file created for VC++. It is used to link UCBioBSP.dll statically at VC++.

2.3.8 (Installation Folder)\Samples


Sample source codes for each of the language are included in separate folders.

DLL
The sample code that can be developed using UCSAPI40.dll is included.

Copyright 2009 UNIONCOMMUNITY Co., LTD. 36


1) VC6: The sample created for Visual C++ 6.0 is included.

COM
The sample code that can be developed using UCSAPICOM.dll is included.
1) VB6: The sample created for Visual Basic 6.0 is included.

dotNET
The s ample
c t ode
c b dhat an
u Me eveloped
. e under ic
UNIONCOMM.SDK.UCSAPI40dll is included.
1) C#: The sample created for VisualStudio.NET 2005 and C# is included.

2.3.9 (Installation Folder)\Skins


The s rkin fesource
f e o theile
languages
or i i ach sCurrently,
f ncluded.
o t English
nly a he
K nd v orean
are included.

Copyright 2009 UNIONCOMMUNITY Co., LTD. 37


3. API Reference for DLL

Types and APIs to use a DLL module, UCSAPI40.dll, are described in the chapter.

3.1 Type definitions

3.1.1 Basic types


Basic t d
ypes a U
eclared a dt CSAPI_Basic
B t a r ref O efined.
o C i asic ypes
development. The following descriptions are based on the development with C++ under Windows.

UCSAPI_SINT8 / UCSAPI_SINT16 / UCBioAPI_SINT32


Signed 1byte / 2bytes / 4bytes value

UCSAPI_UINT8 / UCSAPI_UINT16 / UCBioAPI_UINT32


Unsigned 1byte / 2bytes / 4bytes value

UCSAPI_SINT / UCSAPI_UINT
Int/Unsigned i v t ntv alue
a hat
t O I oaries w ccording
4 f 3 O oa wS. 8 t f perates
64bit OS.

UCSAPI_VOID_PTR
This type represents void*.

UCSAPI_BOOL
This type can have UCSAPI_FALSE(0) / UCBioAPI_TRUE(1) value. It is handled in the same way as int.

UCSAPI_CHAR / UCSAPI_CHAR_PTR
This type represents char and char*. 1byte character and character string value.

UCSAPI_NULL
This type represents NULL. It is defined with the value of ((void*)0).

Copyright 2009 UNIONCOMMUNITY Co., LTD. 38


UCSAPI_HWND
This type is the HWND value that represents Windows handle.

3.1.2 General types


Declaration is made at UCAPI_Type.h, and general types are defined.

UCSAPI_RETURN
Prototype:
typedef UCSAPI_UINT32 UCSAPI_RETURN;

Description:
Values r eturned
b f o Uy unctions
S a d Ifg CSAPI
e v DK
o U Sre a efined.
included. Refer to the error definition for more information on error values.

UCSAPI_DATE_TIME_INFO
Prototype:
typedef struct ucsapi_datetime_info
{
UCSAPI_UINT16 Year;
UCSAPI_UINT8 Month;
UCSAPI_UINT8 Day;
UCSAPI_UINT8 Hour;
UCSAPI_UINT8 Min;
UCSAPI_UINT8 Sec;
UCSAPI_UINT8 Reserved;
} UCSAPI_DATE_TIME_INFO, *UCSAPI_DATE_TIME_INFO_PTR;

Description:
The structure that contains the date and time information

UCSAPI_MESSAGE
#define UCSAPI_MESSAGE 128

Copyright 2009 UNIONCOMMUNITY Co., LTD. 39


3.1.3 User information related types
Declaration is made at UCAPI_Type.h, and user information related types are defined.

UCSAPI_ACCESS_DATE_TYPE
Prototype:
typedef UCSAPI_UINT32 UCSAPI_ACCESS_DATE_TYPE;

Description:
Data t ypes
o t U f he CSAPI_ACCESS_DATE
s a d 3 d t c tructure
b d f re
access p deriodnot u ,ata;
sed
allowed a p ccess, and access
eriod
r estriction
p T he f ollowing
eriod.
values are available.

#define UCSAPI_DATE_TYPE_NOT_USE 0
#define UCSAPI_DATE_TYPE_ALLOW 1
#define UCSAPI_DATE_TYPE_RESTRICTION 2

UCSAPI_ACCESS_AUTHORITY
Prototype:
typedef struct ucsapi_access_authority
{
UCSAPI_DATA_PTR AccessGroup;
UCSAPI_ACCESS_DATE_TYPE AccessDateType;
UCSAPI_ACCESS_DATE_PTR AccessDate
} UCSAPI_ACCESS_AUTHORITY, UCSAPI_ACCESS_AUTHORITY_PTR;

Description:
The s tructuret c hatt a ontains
r i he o tccess
u E ights
o v i nformation
d
below.

AccessGroup:
The pointer on the structure that contains access rights group code information

AccessDateType:
The type of data that the UCSAPI_ACCESS_DATE structure has is designated.

Copyright 2009 UNIONCOMMUNITY Co., LTD. 40


AccessDate:
The pointer on the structure that contains access period information

UCSAPI_CARD_DATA
Prototype:
typedef struct ucsapi_card_data
{
UCSAPI_UINT32 CardNum;
UCSAPI_DATA_PTR RFID[UCSAPI_CARD_NUMBER_MAX];
} UCSAPI_CARD_DATA, UCSAPI_CARD_DATA_PTR;

Description:
The structure that contains code information. Each of values is described below.

CardNum:
It d esignates
t t n he o Rotal R i umber corresponding
f FID. t the nFID umber
d
o nformation esignated
here are included as array.

RFID:
The pointer array of the structure that contains RFID information

UCSAPI_FINGER_DATA
Prototype:
typedef struct ucsapi_finger_data
{
UCSAPI_UINT32 SecurityLevel;
UCSAPI_UINT8 TemplateFormat;
UCSAPI_UINT8 DuressFinger[10];
UCSAPI_BOOL IsCheckSimilarFinger;
UCSAPI_EXPORT_DATA_PTR ExportData;
} UCSAPI_FINGER_DATA, UCSAPI_FINGER_DATA_PTR;

Description:
The structure that contains fingerprint information. Each of values is described below.

Copyright 2009 UNIONCOMMUNITY Co., LTD. 41


SecurityLevel :
It designates the security level used during authentication.
Refer to the UCBioAPI_FIR_SECURITY_LEVEL definition of UCBioBSP SDK for available values.
TemplateFoarmat:
It is type of Template. One of below value.
#define UCBioAPI_TEMPLATE_FORMAT_UNION400 (0)
#define UCBioAPI_TEMPLATE_FORMAT_ISO500 (1)
#define UCBioAPI_TEMPLATE_FORMAT_ISO600 (2)
Default value is 0.(ref. UCBioAPI_Type.h)
DuressFinger:
This is contains duress finger information, and consis of 10 bytes.
Byte position is mean finger position. (0:Right Thumb, ... 5:Left Thumb, ... 9: Left little)
Each value mean normal finger or duress finger.
If duress finger input terminal, terminal work normal status.
But terminal trans result to server with error code 0x21(33)
IsCheckSimilarFinger :
When a dding
u f serd t ingerprint
t t I d ata w o the c erminal,
a s t
fingerprint or not.
If t his
v i alue
designateds a st rue,
t t he c erminal
i as f hecks e bf c imilarw ingerp
the fingerprints o a r f ull egistered
If a s imilar
f sers.
ingerprint
i d r s f etected,
As t hisf c lags d an u low
a j own
b t t ser p ddition m b ob
d y i the erminal,
are a large number of registered users. It is used during UCSAPI_AddUserToTerminal call.

ExportData:
The pointer of the structure that contains converted template data
Refer to UCBioAPI_EXPORT_DATA structure of UCBioBSP SDK.

UCSAPI_FACE_INFO
Prototype:
typedef struct ucsapi_face_info
{
long Length;
BYTE* Data;
} UCSAPI_FACE_INFO, *UCSAPI_FACE_INFO_PTR;

Copyright 2009 UNIONCOMMUNITY Co., LTD. 42


Description:
The structure that contains face data information

length :
the size value of data
Data :
Face data

UCSAPI_FACE_DATA
Prototype:
typedef struct ucsapi_face_data
{
long FaceNumber;
UCSAPI_FACE_INFO_PTR FaceInfo[UCSAPI_MAX_FACE_NUMBER];
} UCSAPI_FACE_DATA, *UCSAPI_FACE_DATA_PTR;
Description:
Whole face data for 1 user. 1 user can have 10 face info.
FaceNumber :
Registed face number. Max is 10.
FaceInfo :
Real f dace 1 t ata.
y c r ime,
3 o 5 f oui an :5
egist
Q :3 A ry c ace
r f nfo.(Normal
2 times. So Face number is from 3 to 10

UCSAPI_AUTH_DATA
Prototype:
typedef struct ucsapi_auth_data
{
UCSAPI_DATA_PTR Password;
UCSAPI_CARD_DATA_PTR Card;
UCSAPI_FINGER_DATA_PTR Finger;
UCSAPI_FACE_DATA_PTR Face;
} UCSAPI_AUTH_DATA, UCSAPI_AUTH_DATA_PTR;

Description:

Copyright 2009 UNIONCOMMUNITY Co., LTD. 43


The structure that contains authentication information. Each of values is described below.

Password:
The pointer of the structure that contains password information

Card :
The pointer of the structure that contains card information

Finger:
The pointer of the structure that contains fingerprint information

UCSAPI_PICTURE_HEADER
Prototype:
typedef struct ucsapi_picture_header
{
UCSAPI_UINT8 Format[4]; /* must be “jpg” */
UCSAPI_UINT32 Length; /* max length is 7 kbytes */
} UCSAPI_PICTURE_HEADER, UCSAPI_ PICTURE_HEADER_PTR;

Description:
The s tructure
t c hat t h ontains i he o p eader d E nformation
o
the values is described below.

Format :
It contains the format information of picture data. (Currently, only “JPG” format is supported.)
It designates the file extension value with the character string.

Length:
It h ast s he v izeo p alue d T f m icture d t ata. c b hed aximum
i
7KB.

UCSAPI_PICTURE_DATA
Prototype:
typedef struct ucsapi_picture_data

Copyright 2009 UNIONCOMMUNITY Co., LTD. 44


{
UCSAPI_PICTURE_HEADER Header;
UCSAPI_UINT8* Data;
} UCSAPI_PICTURE_DATA, UCSAPI_ PICTURE_DATA_PTR;

Description:
The structure that contains picture data information

Header :
It contains the header information of picture data.

Data :
The p ointer
o t b ft he
c uffer
i d hat
i UCSAPI_PICTURE_HEADER
ontains mage
f ( ata ormat
n
stream). The resolution of “JPG” data is 320*240.

UCSAPI_USER_COUNT
Prototype:
typedef struct ucsapi_user_count
{
UCSAPI_UINT32 AdminNumber;
UCSAPI_UINT32 UserNumber;
} UCSAPI_USER_COUNT, *UCSAPI_USER_COUNT_PTR;

Description:
The structure that contains the number of users registered in the terminal.
There are two types of users; administrator and general user.
After t Uhe CSAPI_GetUserCountFromTerminal
f c i c b o f unction
UCSAPI_CALLBACK_EVENT_GET_USER_COUNT event. Each of the values is described below.

AdminNumber:
It has the value of the number of registered administrators.

UserNumber :
It has the value of the number of registered general users.

Copyright 2009 UNIONCOMMUNITY Co., LTD. 45


UCSAPI_USER_INFO
Prototype:
typedef struct ucsapi_user_info
{
UCSAPI_UINT32 UserID;
UCSAPI_DATA_PTR UserName;
UCSAPI_DATA_PTR UniqueID;
UCSAPI_USER_PROPERTY Property;
UCSAPI_UINT8 AuthType;
UCSAPI_UINT8 Reserved[2];
UCSAPI_ACCESS_AUTHORITY_PTR AccessAuthority;
} UCSAPI_USER_INFO, UCSAPI_ USER_INFO_PTR;

Description:
The structure that contains user information. Each of the values is described below.
UserID :
It contains user ID information. This value can use only numeric data up to 8 digits.
UserName :
The p ointer
o t s f t hec tructure
u n i hat T ontains
v c b d ser ame
u t nform
the size of UCSAPI_DATA_SIZE_USER_NAME.
UniqueID:
The p ointer
o t s f t he c tructure
u I ( hat I ontains
i T nique
v c b D emp
used i p n o lace
U f fu serID
i or
I c ser
b d dentification.
u t t s o t an
UCSAPI_DATA_SIZE_UNIQUE_ID.
Property:
The s tructure
t c uhat p ontains
( ser
t a roperty
whether a u ser
i authentication
an administrator
s
or not) information
AuthType:
This is value of cerification method.(1:FP,..., 26: Card & FP & FA & PW)
* refer UCSAPI_Type.h file for each value
AccessAuthority:
The pointer of the structure that contains access rights information

UCSAPI_USER_DATA
Prototype:

Copyright 2009 UNIONCOMMUNITY Co., LTD. 46


typedef struct ucsapi_user_data
{
UCSAPI_USER_INFO UserInfo;
UCSAPI_AUTH_DATA_PTR AuthData;
UCSAPI_PICTURE_DATA_PTR PictureData;
} UCSAPI_USER_DATA, UCSAPI_ USER_DATA_PTR;

Description:
The s tructure
t c u
hat d ontains
I i u d ser
U ata. t s c sed E o uring
the values is described below.

UserInfo :
The structure that contains user information

AuthData :
The pointer of the structure that contains access rights data

PictureData :
The pointer of the structure that contains picture data

UCSAPI_ERROR_TYPE
Prototype:
typedef UCSAPI_UINT32 UCSAPI_ERROR_TYPE
#define UCSAPI_ERROR_TYPE_NONE 0
#define UCSAPI_ERROR_TYPE_ACCESS_LOG 1

Description:
Define Error Type for returning back to terminal with received Callback Event.

3.1.4 Log related types


Declaration is made at UCAPI_Type.h, and authentication log related types are defined.

Copyright 2009 UNIONCOMMUNITY Co., LTD. 47


UCSAPI_GET_LOG_TYPE
Prototype:
typedef UCSAPI_UINT32 UCSAPI_GET_LOG_TYPE;

Description:
To obtain log data from the terminal, three log types are to be defined.
The n umber
o l t c f b ogs
s i hat v an a e tored
t t mnternally
I t m aries
storage c apacity
i e sn xceeded,
l a s ew
b d ogs s re o tored
the existing records.
It is used during UCSAPI_GetAccessLogCountFromTerminal /
UCSAPI_GetAccessLogFromTerminal call.

#define UCSAPI_GET_LOG_TYPE_NEW 0
#define UCSAPI_GET_LOG_TYPE_OLD 1
#define UCSAPI_GET_LOG_TYPE_ALL 2
#define UCSAPI_GET_LOG_TYPE_PEROID 3

UCSAPI_ACCESS_LOG_DATA
Prototype:
typedef struct ucsapi_access_log_data
{
UCSAPI_UINT32 UserID;
UCSAPI_DATE_TIME_INFO DataTime;
UCSAPI_UINT8 AuthMode;
UCSAPI_UINT8 AuthType;
UCSAPI_UINT8 Reserved[2];
UCSAPI_BOOL IsAuthorized;
UCSAPI_DATA_PTR RFID;
UCSAPI_PICTURE_DATA_PTR PictureData;
} UCSAPI_ACCESS_LOG_DATA, UCSAPI_ACCESS_LOG_DATA_PTR;

Description:
The structure that contains authentication log data
It c an b o e btained
f t U rom he CSAPI_CALLBACK_EVENT_GET_ACCESS_LOG
e a
UCSAPI_GetAccessLogFromTerminal is called. Each of the values is described below.

Copyright 2009 UNIONCOMMUNITY Co., LTD. 48


UserID :
It has the user ID value.

DateTime :
The structure that contains authentication time information

AuthMode:
It has the authentication mode value. Refer to UCSAPI_AUTH_MODE definition.

AuthType:
It has the authentication type value. Refer to UCSAPI_AUTH_TYPE definition.

IsAuthorized:
It has the authentication result value. It has the value of 1 for success and the value of 0 for failure.

RFID:
The pointer of the structure that contains RFID data used during card authentication

PictureData:
The p ointer
o t s f t he c tructure
p d t hat d ontains
a Ticturev i ata
available only for terminals that can take picture.

3.1.5 Callback related types


Declaration is made at UCAPI_Type.h, and callback event types are defined.
To n otify
d received
ata f rom t t he t erminal
t a po he S u
pplication
t c f rogram,
T
callback e c vent o t onsists
p response f t o a wo pplication
arts;
p ’s r equesta
rogram r nd f tequest
terminal.

UCSAPI_CALLBACK_EVENT_HANDLER
Prototype:
typedef UCSAPI_RETURN (UCSAPI * UCSAPI_CALLBACK_EVENT_HANDLER) (
UCSAPI_UINT32 TerminalID, UCSAPI_UINT32 EventType,
UCSAPI_UINT32 wParam, UCSAPI_UINT32 lParam);

Copyright 2009 UNIONCOMMUNITY Co., LTD. 49


Description:
This type defines the callback function to receive the event generated from the terminal.
EventType :
This type defines Event.
wParam :
Point of UCSAPI_CALLBACK_PARAM_0
lParam :
Point of UCSAPI_CALLBACK_PARAM_1

UCSAPI_CALLBACK_PARAM_0
Prototype:
typedef struct ucsapi_callback_param_0
{
UCSAPI_UINT32 ClientID;
UCSAPI_UINT32 ErrorCode;
UCSAPI_PROGRESS_INFO Progress;
} UCSAPI_CALLBACK_PARAM_0, *UCSAPI_CALLBACK_PARAM_0_PTR;

Description:
The structure passed as the third element of UCSAPI_CALLBACK_EVENT_HANDLER.
Each of the values is described below.

ClientID :
ID of the client that requested the job. (It is used in client/server model development.)

ErrorCode :
It contains the value on errors generated from the executed job.
The value of 0 represents success, while all other values represent failure.

Progress :
The structure that contains the progress information of the executed job.
It can be obtained after below functions are called.
- UCSAPI_GetUserInfoListFromTerminal
- UCSAPI_GetAccessLogFromTerminal

Copyright 2009 UNIONCOMMUNITY Co., LTD. 50


- USCAPI_UpgradeFirmwareToTerminal

UCSAPI_PROGRESS_INFO
Prototype:
typedef struct ucsapi_progress_info
{
UCSAPI_UINT32 CurrentIndex;
UCSAPI_UINT32 TotalNumber;
} UCSAPI_PROGRESS_INFO, *UCSAPI_PROGRESS_INFO_PTR;

Description:
The s tructure
t c that p ontains
i o he
t e rogressj W n
nformation
s f
records t t ao he p pplication
U S i rogram,
p i CS i t DK
s ncludes
a
notifies it to the application program along with the UCSAPI_CALLBACK_PARAM_0 structure.
It c an
b o e a btained
U fter CSAPI_GetUserInfoListFromTerminal
/U /
USCAPI_UpgradeFirmwareToTerminal functions are called. Each of the values is described below.

CurrentIndex:
The index of the record currently in transmission

TotalNumber :
The total number of records to be sent

UCSAPI_CALLBACK_PARAM_1
Prototype:
typedef struct ucsapi_callback_param_1
{
UCSAPI_CALLBACK_DATA_TYPE DataType;
Union {
UCSAPI_USER_INFO_PTR UserInfo;
UCSAPI_USER_DATA_PTR UserData;
UCSAPI_ACCESS_LOG_DATA_PTR AccessLog;
UCSAPI_FACE_INFO_PTR FaceInfo;
} Data;
} UCSAPI_CALLBACK_PARAM_1, *UCSAPI_CALLBACK_PARAM_1_PTR;

Copyright 2009 UNIONCOMMUNITY Co., LTD. 51


Description:
The s tructure
p a t assed
f e s o he
UCSAPI_CALLBACK_EVENT_HANDLER.
ourth lement E f o
the values is described below.

DataType:
The type of data that this structure has is designated.
Refer to UCSAPI_CALLBACK_DATA_TYPE.

Data:
The u nion
s t tructure
d r d
hat V esignates
o U U eal a Aata. c alues
b f
used by storing them with a single identical address pointer.

UCSAPI_CALLBACK_DATA_TYPE
Prototype:
typedef UCSAPI_UINT32 UCSAPI_CALLBACK_DATA_TYPE;

Description:
Data types of the UCSAPI_CALLBACK_PARAM_1 structure are defined.

#define UCSAPI_CALLBACK_DATA_TYPE_USER_INFO 0
#define UCSAPI_CALLBACK_DATA_TYPE_USER_DATA 1
#define UCSAPI_CALLBACK_DATA_TYPE_ACCESS_LOG 2
#define UCSAPI_CALLBACK_DATA_TYPE_FACE_INFO 3

3.1.6 Access control setting related types


Declaration is made at UCAPI_Type.h, and terminal access control related types are defined.

UCSAPI_TIMEZONE
Prototype:
typedef struct ucsapi_timezone
{
UCSAPI_TIME_HH_MM StartTime;
UCSAPI_TIME_HH_MM EndTime;
} UCSAPI_TIMEZONE, * UCSAPI_TIMEZONE_PTR;

Copyright 2009 UNIONCOMMUNITY Co., LTD. 52


Description:
The structure that contains time zone information

StartTime/ EndTime:
The structure that contains time information from start to end

UCSAPI_ACCESS_TIMEZONE
Prototype:
typedef struct ucsapi_access_timezone
{
UCSAPI_CHAR Code[UCSAPI_DATA_SIZE_CODE4];
UCSAPI_TIMEZONE Zone[12];
UCSAPI_UINT8 Reserved[4]
} UCSAPI_ACCESS_TIMEZONE, * UCSAPI_ACCESS_TIMEZONE_PTR;

Description:
The structure that contains information on the time zone allowed for access during a day
Up t 1o t 2z ime
c b dones into
an a s e ingle
t esignated
c Eime o theode.
values i dach s escribed
f
below.

Code:
As t hei dentifier
c v o ode
t t alue
z i if a character
he ime
s tring o one,
f f ixed
t
UCSAPI_DATA_SIZE_CODE size.

Zone:
The structure array that contains time zone information

UCSAPI_ACCESS_TIMEZONE_DATA
Prototype:
typedef struct ucsapi_access_timezone_data
{
UCSAPI_UINT32 TimezoneNum;
UCSAPI_ACCESS_TIMEZONE Timezone[UCSAPI_ACCESS_TIMEZONE_MAX];
} UCSAPI_ACCESS_TIMEZONE_DATA, * UCSAPI_ACCESS_TIMEZONE_DATA_PTR;

Copyright 2009 UNIONCOMMUNITY Co., LTD. 53


Description:
The s tructure
t c the
hatallowedontains
a t ccess
z d ime
U t 1 one
t z cata. i p o 28
can be designated.

TimezoneNum:
It d esignatest t n he o otal
allowed a umbert ime
ccessz fcone T odes.
z i ime one
corresponding to the number designated here are included in the form of an array.

Timezone:
The structure array that contains the allowed access time zone code information

UCSAPI_ACCESS_HOLIDAY
Prototype:
typedef struct ucsapi_access_holiday
{
UCSAPI_CHAR Code[UCSAPI_DATA_SIZE_CODE4];
UCSAPI_DATE_MM_DD Date[32];
} UCSAPI_ACCESS_HOLIDAY, * UCSAPI_ACCESS_HOLIDAY_PTR;

Description:
The structure that contains holiday information
Up to 32 holidays can be designated into the holiday code. Each of the values is described below.

Code:
As t he
i dentifier
c v o a holiday,
ode i i alue
a c t s fs haracter
o f U tring f ixed
size.

Date:
The structure array that contains holiday information

UCSAPI_ACCESS_HOLIDAY_DATA
Prototype:
typedef struct ucsapi_access_holiday_data
{

Copyright 2009 UNIONCOMMUNITY Co., LTD. 54


UCSAPI_UINT32 HolidayNum;
UCSAPI_ACCESS_TIMEZONE Holiday[UCSAPI_ACCESS_HOLIDAY_MAX];
} UCSAPI_ACCESS_HOLIDAY_DATA, * UCSAPI_ACCESS_HOLIDAY_DATA_PTR;

Description:
The structure that contains holiday data.
Up to 64 holiday code data can be designated. Each of the values is described below.

HolidayNum:
It d esignates
t t n he o hotal c umber
H i f oliday
corresponding odes.
t the n umber
oliday
o
designated here are included in the form of an array.

Holiday:
The structure array that contains holiday code information

UCSAPI_ACCESS_TIMEZONE_CODE
Prototype:
typedef struct ucsapi_access_timezone_code
{
UCSAPI_CHAR Sun[UCSAPI_DATA_SIZE_CODE4];
UCSAPI_CHAR Mon[UCSAPI_DATA_SIZE_CODE4];
UCSAPI_CHAR Tue[UCSAPI_DATA_SIZE_CODE4];
UCSAPI_CHAR Wed[UCSAPI_DATA_SIZE_CODE4];
UCSAPI_CHAR Thu[UCSAPI_DATA_SIZE_CODE4];
UCSAPI_CHAR Fri[UCSAPI_DATA_SIZE_CODE4];
UCSAPI_CHAR Sat[UCSAPI_DATA_SIZE_CODE4];
UCSAPI_CHAR Hol[UCSAPI_DATA_SIZE_CODE4];
} UCSAPI_ACCESS_TIMEZONE_CODE, * UCSAPI_ACCESS_TIMEZONE_CODE_PTR;

Description:
The s tructure
t c the
hatallowedontains
t a het z ccessc f eime d oone
t w ode
E o or ac
the values is described below.

Sun / Mon / Tue / Wed / Thu / Fri / Sat:


They h t avea he
a tllowed
z c vccess f e ime
d o t one
w t ode
b u d alue or

Copyright 2009 UNIONCOMMUNITY Co., LTD. 55


authentication.

Hol:
It has the allowed access time zone code value to be applied to the holiday during authentication.

UCSAPI_ACCESS_TIME
Prototype:
typedef struct ucsapi_access_time
{
UCSAPI_CHAR Code[UCSAPI_DATA_SIZE_CODE4];
UCSAPI_ACCESS_TIMEZONE_CODE Timezone;
UCSAPI_CHAR Holiday[UCSAPI_DATA_SIZE_CODE4];
} UCSAPI_ACCESS_TIME, * UCSAPI_ACCESS_TIME_PTR;

Description:
The s tructure
t c the
hat allowed
ontains
a t ccess
i ime
E o nformation.
t he v alues i d s escribed
ach
below.

Code:
As t he
i dentifier
c v o ode
a a alue t if i allowed
c s ccess
o f ime,
UCSAPI_DATA_SIZE_CODE size.

Timezone:
It has the allowed access time zone code for each day of the week.

Holiday:
It has the holiday code value to be used in the allowed access time code.
The t ime
z d one a H esignated
o t U t ol f hes CSAPI_ACCESS_TIMEZONE_COD
i a t t
holiday code designated here.

UCSAPI_ACCESS_TIME_DATA
Prototype:
typedef struct ucsapi_access_time_data
{
UCSAPI_UINT32 AccessTimeNum;

Copyright 2009 UNIONCOMMUNITY Co., LTD. 56


UCSAPI_ACCESS_TIME AccessTime[UCSAPI_ACCESS_TIME_MAX];
} UCSAPI_ACCESS_TIME_DATA, * UCSAPI_ACCESS_TIME_DATA_PTR;

Description:
The structure that contains the allowed access time data.
Up t o1 a 28 a llowed t c ccess
i ime
c b ode
d nformation
E o
the values is described below.

AccessTimeNum:
It d esignatest t n he o otal
a aumber t c f A llowed i ccess im
corresponding to the number designated here are included in the form of an array.

AccessTime:
The structure array that contains the allowed authentication time code information

UCSAPI_ACCESS_GROUP
Prototype:
typedef struct ucsapi_access_group
{
UCSAPI_CHAR Code[UCSAPI_DATA_SIZE_CODE4];
UCSAPI_CHAR AccessTime1[UCSAPI_DATA_SIZE_CODE4];
UCSAPI_CHAR AccessTime2[UCSAPI_DATA_SIZE_CODE4];
UCSAPI_CHAR AccessTime3[UCSAPI_DATA_SIZE_CODE4];
UCSAPI_CHAR AccessTime4[UCSAPI_DATA_SIZE_CODE4];
} UCSAPI_ACCESS_GROUP, * UCSAPI_ACCESS_GROUP_PTR;

Description:
The s tructure
t c the
hat accessontains
g c roup i ode E onformation.
the values i d s ach
escribed f
below.
Up to 4 allowed access time codes can be designated to the access group code.

Code:
As t hei dentifier
c v o ode
t a alue
g i fi a he
characterccess
s tring o f roup,
f ixed t
UCSAPI_DATA_SIZE_CODE size.

Copyright 2009 UNIONCOMMUNITY Co., LTD. 57


AccessTime1 / AccessTime2 / AccessTime3 / AccessTime4:
They contain the allowed access time code information to be used in the access group.

UCSAPI_ACCESS_GROUP_DATA
Prototype:
typedef struct ucsapi_access_group_data
{
UCSAPI_UINT32 AccessGroupNum;
UCSAPI_ACCESS_GROUP AccessGroup[UCSAPI_ACCESS_GROUP_MAX];
} UCSAPI_ACCESS_GROUP_DATA, * UCSAPI_ACCESS_GROUP_DATA_PTR;

Description:
The s tructure
t c ahat g ontains
d U t 1 ccess
a g roup
c i ata. c pb o 28
designated.
Each of the values is described below.

AccessGroupNum:
It d esignates t t nhe ootal a g
umber c Af ccess
g i roup o
corresponding to the number designated here are included in the form of an array.

AccessGroup:
The structure array that contains the access group code information

UCSAPI_ACCESS_CONTROL_DATA_TYPE
Prototype:
typedef UCSAPI_UINT32 UCSAPI_ACCESS_CONTROL_DATA_TYPE

#define UCSAPI_ACCESS_CONTROL_DATA_TYPE_TIMEZONE 0
#define UCSAPI_ACCESS_CONTROL_DATA_TYPE_HOLIDAY 1
#define UCSAPI_ACCESS_CONTROL_DATA_TYPE_TIME 2
#define UCSAPI_ACCESS_CONTROL_DATA_TYPE_GROUP 3

Description:
It designates the data type that the UCSAPI_ACCESS_CONTROL_DATA structure has.

Copyright 2009 UNIONCOMMUNITY Co., LTD. 58


UCSAPI_ACCESS_CONTROL_DATA
Prototype:
typedef struct ucsapi_access_control_data
{
UCSAPI_ACCESS_CONTROL_DATA_TYPE DataType;
union {
UCSAPI_ACCESS_TIMEZONE_DATA_PTR Timezone;
UCSAPI_ACCESS_HOLIDAY_DATA_PTR Holiday;
UCSAPI_ACCESS_TIME_DATA_PTR AccessTime;
UCSAPI_ACCESS_GROUP_DATA_PTR AccessGroup;
} Data;
} UCSAPI_ACCESS_CONTROL_DATA, * UCSAPI_ACCESS_CONTROL_DATA_PTR;

Description:
The s tructure
t c the
hataccess ontains
c iontrol V nformation.
o T H alues
A f imez
and AccesGroup can be used by storing them with a single identical address pointer.
It is used in the UCSAPI_SetAccessControlDataToTerminal function.
Each of the values is described below.

DataType:
The t ypeo d f t ata t s hat h his i dtructure R ast s
UCSAPI_ACCESS_CONTROL_DATA_TYPE.

3.1.7 Authentication related types


Declaration is made at UCAPI_Type.h, and user authentication related types are defined.

UCSAPI_AUTH_TYPE
Prototype:
typedef UCSAPI_UINT32 UCSAPI_AUTH_TYPE;

Description:
The authentication type is defined during authentication.

Copyright 2009 UNIONCOMMUNITY Co., LTD. 59


#define UCSAPI_AUTH_TYPE_FINGER_1_TO_N 0
#define UCSAPI_AUTH_TYPE_FINGER_1_TO_1 1
#define UCSAPI_AUTH_TYPE_FINGER_CARD 2
#define UCSAPI_AUTH_TYPE_CARD 3
#define UCSAPI_AUTH_TYPE_PASSWORD 4
#define UCSAPI_AUTH_TYPE_FACE_1_TO_N 5
#define UCSAPI_AUTH_TYPE_FACE_1_TO_1 6

UCSAPI_AUTH_MODE
Prototype:
typedef UCSAPI_UINT32 UCSAPI_AUTH_MODE;

Description:
The a uthentication
m i d during
odeu sera s uthentication.
efined T a m he d uthentication
i
purpose d a uring I uthentication.
g i c b a nw eneral,
t t i tu anf e p
time/attendance management.

#define UCSAPI_AUTH_MODE_ATTENDANCE 0
#define UCSAPI_AUTH_MODE_LEAVE 1
#define UCSAPI_AUTH_MODE_NORMAL 2
#define UCSAPI_AUTH_MODE_OUT 3
#define UCSAPI_AUTH_MODE_RETURN 4

UCSAPI_INPUT_DATA_CARD
Prototype:
typedef struct ucsapi_input_data_card
{
UCSAPI_UINT32 AuthMode;
UCSAPI_DATA RFID;
} UCSAPI_INPUT_DATA_CARD, *UCSAPI_INPUT_DATA_CARD_PTR;

Description:
The s tructure
t c the
hati nformation
ontains
entered d c uring
a ard a t tuthentication
E

Copyright 2009 UNIONCOMMUNITY Co., LTD. 60


of the values is described below.

AuthMode:
It has the authentication mode value entered at the terminal. Refer to UCSAPI_AUTH_MODE.

RFID:
The structure that contains the RFID information entered at the terminal.

UCSAPI_INPUT_DATA_PASSWORD
Prototype:
typedef struct ucsapi_input_data_password
{
UCSAPI_UINT32 UserID;
UCSAPI_UINT32 AuthMode;
UCSAPI_DATA Password;
} UCSAPI_INPUT_DATA_PASSWORD, *UCSAPI_INPUT_DATA_PASSWORD_PTR;

Description:
The s tructure
t c the
hat information
ontains
e d ntered
p a uring a t assword
t uth
Each of the values is described below.

UserID:
It has user ID information.

AuthMode:
It has the authentication mode value. Refer to UCSAPI_AUTH_MODE.

Password:
The structure that contains password information

UCSAPI_INPUT_DATA_FINGER_1_TO_1
Prototype:
typedef struct ucsapi_input_data_finger_1_to_n
{
UCSAPI_UINT32 UserID;

Copyright 2009 UNIONCOMMUNITY Co., LTD. 61


UCSAPI_UINT32 AuthMode;
UCSAPI_UINT32 SecurityLevel;
UCSAPI_DATA Finger;
} UCSAPI_INPUT_DATA_FINGER_1_TO_1, *UCSAPI_INPUT_DATA_FINGER_1_TO_1_PTR;

Description:
The s tructure
t c hat
the information
ontainse d ntered
1 f uring
a :1 a t ingerprint
terminal. Each of the values is described below.

UserID:
It has user ID information.

AuthMode:
It has the authentication mode value. Refer to UCSAPI_AUTH_MODE.

SecurityLevel:
It has the security level value to be used during authentication.
Refer to the UCBioAPI_FIR_SECURITY_LEVEL definition of UCBioBSP SDK for available values.

Finger:
The structure that contains fingerprint information

UCSAPI_INPUT_DATA_FINGER_1_TO_N
Prototype:
typedef struct ucsapi_input_data_finger_1_to_n
{
UCSAPI_UINT32 AuthMode;
UCSAPI_UINT32 SecurityLevel;
UCSAPI_UINT32 InputIDLength;
UCSAPI_DATA Finger;
} UCSAPI_INPUT_DATA_FINGER_1_TO_N, *UCSAPI_INPUT_DATA_FINGER_1_TO_N_PTR;

Description:
The s tructure
t c that
he i nformation
ontainse d ntered
1 f uring
a :Na t ingerprint

Copyright 2009 UNIONCOMMUNITY Co., LTD. 62


terminal. Each of the values is described below.

UserID:
It has user ID information.

AuthMode:
It has the authentication mode value. Refer to UCSAPI_AUTH_MODE.

SecurityLevel:
It has the security level value to be used during authentication.

InputIDLength:
It h ast l he v ength
o I entered
alue a t t he
tf D erminal.
T v c bhis u talue
i an e
the s peed
o 1:N f ingerprint
f a b uthentication
r t a ry educing
I t U v he uthe
is 5 a tnd I he nputIDLength
v i 3 i c t I range
alue o f t srhe egistered
n u ase i 0 he serD s
then the authentication ID range becomes 0500~1000.

Finger:
The structure that contains the fingerprint information entered at the terminal.

UCSAPI_INPUT_DATA_TYPE
Prototype:
typedef UCSAPI_UINT32 UCSAPI_INPUT_DATA_TYPE;

#define UCSAPI_INPUT_DATA_TYPE_FINGER_1_TO_N 0
#define UCSAPI_INPUT_DATA_TYPE_FINGER_1_TO_1 1
#define UCSAPI_INPUT_DATA_TYPE_PASSWORD 2
#define UCSAPI_INPUT_DATA_TYPE_CARD 3
#define UCSAPI_INPUT_DATA_TYPE_FINGER_CARD 4

Description:
The type of data that the UCSAPI_INPUT_DATA_TYPE structure has is designated.

UCSAPI_INPUT_DATA
Prototype:

Copyright 2009 UNIONCOMMUNITY Co., LTD. 63


typedef struct ucsapi_input_data
{
UCSAPI_ANTIPASSBACK_LEVEL AntipassbackLevel;
UCSAPI_INPUT_DATA_TYPE DataType;
Union {
UCSAPI_INPUT_DATA_FINGER_1_TO_1_PTR Finger1To1;
UCSAPI_INPUT_DATA_FINGER_1_TO_N_PTR Finger1ToN;
UCSAPI_INPUT_DATA_CARD_PTR Card;
UCSAPI_INPUT_DATA_PASSWORD_PTR Password;
} Data;
} UCSAPI_INPUT_DATA, *UCSAPI_INPUT_DATA_PTR;

Description:
The s tructure
t c hat
t he i nformation
ontainse a t ntered
t d t u hea erminal ur
Authentication r c equest
b m t ant a e ade
p o
b s he pplica
the input information at this structure. Each of the values is described below.

AntipassbackLevel:
It h as
t a he nti-passback
l s u a t t evelT a et pp t c he r erminal.
t t v he
when implementing the anti-passback function.

DataType:
The type of data that this structure has is designated. Refer to UCSAPI_INPUT_DATA_TYPE.

Data:
The u nion
s t tructure
designates r ealdhat Vata. o F alues F f inger1To1,
C a P inger1ToN
are used by storing them with a single identical address pointer.

UCSAPI_INPUT_ID_TYPE
Prototype:
typedef UCSAPI_UINT32 UCSAPI_INPUT_ID_TYPE;

#define UCSAPI_INPUT_ID_TYPE_USER_ID 0
#define UCSAPI_INPUT_ID_TYPE_UNIQUE_ID 1
#define UCSAPI_INPUT_ID_TYPE_RFID 2

Copyright 2009 UNIONCOMMUNITY Co., LTD. 64


Description:
The t ype
o I entered
f a Dtt the erminal
i d T s I tesignated.
e d 1 he
a D ype n
can b ec hanged
a t t t o he s erminal T d ptionv i ettings.
t
UCSAPI_INPUT_ID_TYPE_USER_ID t T m ype. s he
o t uaximum
I v i ize
8 f
digits. I t f m he number
aximum o digits
f is e xceeded, t u ohe t se
UCSAPI_INPUT_ID_TYPE_UNIQUE_ID type increases the maximum size to 20 digits.

UCSAPI_INPUT_ID_DATA
Prototype:
typedef struct ucsapi_input_id_data
{
UCSAPI_INPUT_ID_TYPE DataType;
Union {
UCSAPI_UINT32* UserID;
UCSAPI_DATA_PTR UniqueID
UCSAPI_DATA_PTR RFID;
} Data;
} UCSAPI_INPUT_ID_DATA, *UCSAPI_INPUT_ID_DATA_PTR;

Description:
The s tructure
t c the
hat ID i ontains e
nformation a t t ntered d ut a he erminal
a u
the server. Each of the values is described below.

DataType:
The type of data that this structure has is designated. Refer to UCSAPI_INPUT_ID_TYPE.

Data:
The u nion
s t tructure
d r dhat V esignates
o U U eal
a R ata.
c b u alues
b f
storing them with a single identical address pointer.

UCSAPI_AUTH_INFO
Prototype:
typedef struct ucsapi_auth_info

Copyright 2009 UNIONCOMMUNITY Co., LTD. 65


{
UCSAPI_UINT32 UserID;
UCSAPI_BOOL IsAccessibility;
UCSAPI_USER_PROPERTY Property;
UCSAPI_UINT32 ErrorCode;
} UCSAPI_AUTH_INFO, *UCSAPI_AUTH_INFO_PTR;

Description:
The s tructure
t c hatthe user’s
ontains
a uthentication i I nformation.
i u i t t
UCSAPI_SendAuthInfoToTerminal function.
Each of the values is described below.

UserID:
It has the user’s ID value.

IsAccessibility:
It has the value on whether the user has authentication rights or not.

Property:
The structure that contains user property (authentication type and administrator) information

ErrorCode:
In c aset u hed nser h aoes ot r aveit has t uthentication
corresponding
he error c ights,
ode
value. Refer to error code table.

UCSAPI_AUTH_NOTIFY
Prototype:
typedef struct ucsapi_auth_notify
{
UCSAPI_UINT32 UserID;
UCSAPI_BOOL IsAuthorized;
UCSAPI_BOOL IsVistor;
UCSAPI_DATE_TIME_INFO AuthorizedTime;
UCSAPI_UINT32 ErrorCode;
} UCSAPI_AUTH_NOTIFY, *UCSAPI_AUTH_NOTIFY_PTR;

Copyright 2009 UNIONCOMMUNITY Co., LTD. 66


Description:
The structure that contains the user’s authentication result information.
It is used in the UCSAPI_SendAuthResultToTerminal function.

UserID:
It has the ID value of the authenticated user or the user who attempted authentication.

IsAuthorized:
It has the authentication result value.

IsVisitor:
It has the value on whether the authenticated user is a visitor or not.

AuthorizedTime:
The structure that contains authentication time information

ErrorCode:
It has the error code value in case of authentication failure. Refer to the error code table.

3.1.8 Terminal option setting related types


Declaration is made at UCAPI_Type.h, and terminal option setting related types are defined.

UCSAPI_TERMINAL_TIMEZONE
Prototype:
typedef struct ucsapi_terminal_timezone
{
UCSAPI_UINT8 IsUsed;
UCSAPI_UINT8 StartHour;
UCSAPI_UINT8 StartMin;
UCSAPI_UINT8 EndHour;
UCSAPI_UINT8 EndMin;
} UCSAPI_TERMINAL_TIMEZONE, * UCSAPI_TERMINAL_TIMEZONE_PTR;

Copyright 2009 UNIONCOMMUNITY Co., LTD. 67


Description:
The s tructure
t c t hatt i ontains u a he
t lock/open
ime s nformation
chedule
o t t E fsed he te
of the values is described below.

IsUsed :
It h as
i nformation
o w t v n t thether
UCSAPI_TERMINAL_TIMEZONE
he alue s hat
tructureh he i v as s
or not.

StartHour / StartMin:
It contains the start time information.

EndHour / EndMin :
It contains the end time information.

UCSAPI_TERMINAL_DAY_SCHEDULE
Prototype:
typedef struct ucsapi_terminal_day_schedule
{
UCSAPI_TERMINAL_TIMEZONE Lock1;
UCSAPI_TERMINAL_TIMEZONE Lock2;
UCSAPI_TERMINAL_TIMEZONE Lock3;
UCSAPI_TERMINAL_TIMEZONE Open1;
UCSAPI_TERMINAL_TIMEZONE Open2;
UCSAPI_ TERMINAL_TIMEZONE Open3;
} UCSAPI_TERMINAL_DAY_SCHEDULE, * UCSAPI_TERMINAL_DAY_SCHEDULE_PTR;

Description:
The structure that contains terminal’s lock/open schedule information for each day of the week.
Regarding the schedule f e dor o t ach
w u ay
t t fl he t eek,z p pd co b hree o
designated. Each of the values is described below.

Lock1 / Lock2 / Lock3:


They have the time zone value to lock the terminal during a day.

Copyright 2009 UNIONCOMMUNITY Co., LTD. 68


Open1 / Open2 / Open3:
They have the time zone value to open the terminal during a day.

UCSAPI_HOLIDAY_TYPE
Prototype:
typedef UCSAPI_UINT8 UCSAPI_HOLIDAY_TYPE;

#define UCSAPI_HOLIDAY_TYPE_1 1
#define UCSAPI_HOLIDAY_TYPE_2 2
#define UCSAPI_HOLIDAY_TYPE_3 3

Description:
The h oliday
t t b u ypei t lo e s sed o tn t he iock/open
d U t 3chedule
h
types can be designated. Each of the values is described below.

UCSAPI_TERMINAL_HOLIDAY_INFO
Prototype:
typedef struct ucsapi_holiday_info
{
UCSAPI_UINT8 Month;
UCSAPI_UINT8 Day;
UCSAPI_UINT8 HolidayType;
} UCSAPI_TERMINAL_HOLIDAY_INFO, * UCSAPI_TERMINAL_HOLIDAY_INFO_PTR

Description:
The structure that contains holiday information

Month/Day:
These structures contain the holiday’s date information.

Holidaytype:
It has the holiday type value. Refer to UCSAPI_HOLIDAY_TYPE.

Copyright 2009 UNIONCOMMUNITY Co., LTD. 69


UCSAPI_TERMINAL_SCHEDULE
Prototype:
typedef struct ucsapi_terminal_schedule
{
UCSAPI_TERMINAL_DAY_SCHEDULE Sun;
UCSAPI_TERMINAL_DAY_SCHEDULE Mon;
UCSAPI_TERMINAL_DAY_SCHEDULE Tue;
UCSAPI_TERMINAL_DAY_SCHEDULE Wed;
UCSAPI_TERMINAL_DAY_SCHEDULE Thu;
UCSAPI_TERMINAL_DAY_SCHEDULE Fri;
UCSAPI_TERMINAL_DAY_SCHEDULE Sat;
UCSAPI_TERMINAL_DAY_SCHEDULE Holiday1;
UCSAPI_TERMINAL_DAY_SCHEDULE Holiday2;
UCSAPI_TERMINAL_DAY_SCHEDULE Holiday3;
UCSAPI_TERMINAL_HOLIDAY_INFO Holidays[100];
} UCSAPI_TERMINAL_SCHEDULE, * UCSAPI_TERMINAL_SCHEDULE_PTR;

Description:
The structure that contains the terminal’s lock/open schedule information for each day of the week.
Up t 1 o h 00 c olidays
b s u T han type
e c et b and p. e hea esignated
Holiday1,
oliday H a oliday2
t
Holiday3. Each of the values is described below.

Sun / Mon / Tue / Wed / Thu / Fri / Sat:


The structure that contains the lock/open schedule information for each day of the week

Holiday1 / Holiday2 / Holiday3:


The structure that contains the lock/open schedule information for each holiday type

Holidays:
The s tructure
t c hhat i ontains O s oliday f H nformation.
H a H ne chedu
is applied to each holiday.

Copyright 2009 UNIONCOMMUNITY Co., LTD. 70


UCSAPI_SECURITY_LEVEL
Prototype:
typedef struct ucsapi_security_level
{
UCSAPI_UINT8 Verify :4; /* 1:1 default level = 4*/
UCSAPI_UINT8 Identify :4; /* 1:N default level = 5*/
} UCSAPI_SECURITY_LEVEL, * UCSAPI_SECURITY_LEVEL_PTR;

Description:
The s tructure
t c hat
the security
ontains
l i evel tnformation
b u d f o e sed
authentication. It can have any of the following values.

1- LOWEST
2- LOWER
3- LOW
4- BELOW_NORMAL
5- NORMAL
6- ABOVE_NORMAL
7- HIGH
8- HIGHER
9- HIGHEST

Verify:
1:1 authentication level value. The default value is 4.

Identify
1:N authentication level value. The default value is 5.

UCSAPI_ANTIPASSBACK_LEVEL
Prototype:
typedef UCSAPI_UINT32 UCSAPI_ANTIPASSBACK_LEVEL;

#define UCSAPI_ANTIPASSBACK_LEVEL_NOT_USE 0
#define UCSAPI_ANTIPASSBACK_LEVEL_WHEN_DISCONNECTION_ALLOW 1
#define UCSAPI_ANTIPASSBACK_LEVEL_WHEN_DISCONNECTION_PROHIBIT 2

Copyright 2009 UNIONCOMMUNITY Co., LTD. 71


Description:
It h as
t a he nti-passback
l v s u a t evel
t Talue
u t aet p ft he t erminal.
terminal n t eeds
b s a o UCSAPI_ANTIPASSBACK_LEVEL_WHEN_DISCONNECTION_ALLOW
e et s
or
UCSAPI_ANTIPASSBACK_LEVEL_WHEN_DISCONNECTION_PROHIBIT.

UCSAPI_ANTIPASSBACK_LEVEL_NOT_USE:
Anti-passback not used

UCSAPI_ANTIPASSBACK_LEVEL_WHEN_DISCONNECTION_ALLOW:
Access allowed when connection to the server is disabled

UCSAPI_ANTIPASSBACK_LEVEL_WHEN_DISCONNECTION_PROHIBIT :
Access not allowed when connection to the server is disabled

UCSAPI_NETWORK_INFO
Prototype:
typedef struct ucsapi_network_info
{
UCSAPI_UINT8 NetworkType;
UCSAPI_UINT8 IP[4];
UCSAPI_UINT8 Subnet[4];
UCSAPI_UINT8 Gateway[4];
} UCSAPI_NETWORK_INFO;

Description:
The structure that contains the terminal’s network setting information

NetworkType :
It h ast t he v ypeo I aalue T f s P I iddress.
s f het v tatic o P
0, while the dynamic IP is supported for the value of 1.

IP :

Copyright 2009 UNIONCOMMUNITY Co., LTD. 72


The array of the buffer that contains the IP address value of the terminal

Subnet :
The array of the buffer that contains the subnet mask value

Gateway :
The array of the buffer that contains the gateway address value

UCSAPI_SERVER_INFO
Prototype:
typedef struct ucsapi_server_info
{
UCSAPI_UINT8 IP[4];
UCSAPI_UINT16 Port;
UCSAPI_UINT8 Reserved[2];
} UCSAPI_SERVER_INFO;

Description:
The s tructure
t c the
hat network
ontains
i nformation
f t t t c or thet s erminal
E o
of the values is described below.

IP :
The buffer array that contains the address value of server IP

Port :
It has the socket port value for connection to the server.

UCSAPI_TERMINAL_OPTION_FLAG
Prototype:
typedef struct ucsapi_terminal_option_flag
{
UCSAPI_UINT32 SecurityLevel :1;
UCSAPI_UINT32 InputIDLength :1;
UCSAPI_UINT32 AutoEnterKey :1;

Copyright 2009 UNIONCOMMUNITY Co., LTD. 73


UCSAPI_UINT32 Sound :1;
UCSAPI_UINT32 Authentication :1;
UCSAPI_UINT32 Application :1;
UCSAPI_UINT32 Antipassback :1;
UCSAPI_UINT32 Network :1;
UCSAPI_UINT32 Server :1;
UCSAPI_UINT32 InputIDType :1;
UCSAPI_UINT32 AccessLevel :1;
UCSAPI_UINT32 PrintText :1;
UCSAPI_UINT32 Schedule :1;
} UCSAPI_TERMINAL_OPTION_FLAG, *UCSAPI_TERMINAL_OPTION_FLAG_PTR;

Description:
It h as
t reference
he f o e lagi on t UCSAPI_TERMINAL_OPTION
ach tem f he
s O w t tructure
flag value of an item is true, the value of that item can be referenced.
Refer to the UCSAPI_TERMINAL_OPTION structure for description on each item.

UCSAPI_TERMINAL_OPTION
Prototype:
typedef struct ucsapi_terminal_option
{
UCSAPI_TERMINAL_OPTION_FLAG Flags;
UCSAPI_SECURITY_LEVEL SecurityLevel;
UCSAPI_UINT8 InputIDLength;
UCSAPI_UINT8 AutoEnterKey;
UCSAPI_UINT8 Sound;
UCSAPI_UINT8 Authentication;
UCSAPI_UINT8 Application;
UCSAPI_UINT8 Antipassback;
UCSAPI_NETWOARK_INFO Network;
UCSAPI_SERVER_INFO Server;
UCSAPI_UINT8 InputIDType;
UCSAPI_UINT8 AccessLevel;
UCSAPI_UINT8 PrintText[32];
UCSAPI_TERMINAL_SCHEDULE Schedule;

Copyright 2009 UNIONCOMMUNITY Co., LTD. 74


} UCSAPI_TERMINAL_OPTION, *UCSAPI_TERMINAL_OPTION_PTR;

Description:
The structure that contains the option setting value of the terminal.
It i su sed
i t U n he CSAPI_SetOptionToTerminal/UCSAPI_GetOptionFromTerminal
f E o
the values is described below.

Flags :
It has the reference flag value on each item of the structure.
To s uet the terminal’s
p o ptioni u tems
t U sing he CSAPI_SetOptionToTerminal
f d t
flag value of an item as true and designate the value of that item.

SecurityLevel :
It designates the security level to be used during authentication.
Refer to the UCBioAPI_FIR_SECURITY_LEVEL definition of UCBioBSP SDK for available values.

InputIDLength :
It h ast l he v ength
o I e aluea t t f D T ntered
m lengtht of 8
hedigits erminal.
can b e
designated i c o un U
ase while
f thesing
m aximum
oserID
length o 20f digits
f in c ase
o u f sing
UniqueID.

AutoEnterKey :
It h as
t v he o w alue t tn hether
c u t a he Eerminal
k f oan n Wse k he utom
input corresponds to InputIDLength, this function enters the “Enter” key automatically.

Sound :
It h as
t s he v ound
v o t olume
t T alue
r o t fv he v erminal.
t c b d he ange
is 0~20. To set the terminal’s sound to mute, 0 is designated.

Authentication :
It has the authentication type value of the terminal.
Refer to “Terminal Authentication Type” in Section 1.6 Terminology Description for available values.

Application:
It h ast m he v ode
o t t alue p f T he t erminal
c b u arogram.
a c he er

Copyright 2009 UNIONCOMMUNITY Co., LTD. 75


time/attendance a d w ndm rinking f R ater t “Terminal
anagement
P Mrogram
” i n unction. o
Section 1.6 Terminology Description for available values.

Antipassback:
It has the anti-passback level value of the terminal.
Refer to the UCSAPI_ANTIPASSBACK_LEVEL definition for available values.

Network:
The structure that contains terminal’s network information

Server:
The structure that contains network information for the terminal to connect to the server

InputIDType:
It h as
t t hev ype
o I e alue a t tf D d ntered
a t T hef erminal
v a uring
available.

0 – UserID
1 – UniqueID

AccessLevel:
It h ast a he l ccess
v T evel
i t f alue. t rhis ts a he unction
t hat
allowing only the designated t f authentication.
ypes or
T hef ollowing
v a a aluesT d re vailab
value is 0.

0 – No restriction
1 – Only fingerprint and password authentication allowed

PrintText:
It i st bhe a uffert c rray character
hat s tringsontains
t b po ae t rinted
d w tp he rinkin
connected to the terminal.
This value can be used when the drinking water printer is connected to the terminal.

Schedule : The structure that contains lock/open schedule information

Copyright 2009 UNIONCOMMUNITY Co., LTD. 76


UCSAPI_ACU_OPTION
Prototype:
#define MAX_CP040_READER 12
#define MAX_CP040_PARTITION 4
#define MAX_CP040_ZONE 8
#define MAX_CP040_PGM 8
#define MAX_CP040_DOOR 4
#define MAX_CP040_INPUT 4

typedef struct ucsapi_acu_option


{
ACU_NET_SETTING netSettings;
ACU_READER_OPTION reader[MAX_CP040_READER];
ACU_PARTITION_INFO part[MAX_CP040_PARTITION];
ACU_ZONE_CONFIG zone[MAX_CP040_ZONE];
ACU_PROGRAM_OPTION pgm[MAX_CP040_PGM];
ACU_DOOR_OPTION door[MAX_CP040_DOOR];
ACU_INPUT_OPTION inputs[MAX_CP040_INPUT];
ACU_SYSTEM_OPTION sysOpt;
ACU_UDP_SETTING udpset;
BYTE resv[11];
} UCSAPI_ACU_OPTION, *UCSAPI_ACU_OPTION_PTR;

Description:
The structure that contains the option setting value of the ACU.
It is used in the UCSAPI_SetOptionToACU / UCSAPI_GetOptionFromACU function.
Refer to sample source for detail struct destrption.

UCSAPI_ACU_LOCKSCHEDULE
Prototype:
#define MAX_ACU_LOCK 4

typedef struct ucsapi_acu_lockschedule


{

Copyright 2009 UNIONCOMMUNITY Co., LTD. 77


UCSAPI_UINT8 LockIndex; // 0 - 3
UCSAPI_TERMINAL_SCHEDULE Schedule;
} UCSAPI_ACU_LOCKSCHEDULE, *UCSAPI_ACU_LOCKSCHEDULE_PTR;

Description:
The structure that contains schedule for setted lock of ACU.
It is used in the UCSAPI_SetLockScheduleToACU / UCSAPI_GetLockScheduleFromACU
Refet to TerminalOption for UCSAPI_TERMINAL_SCHEDULE

3.1.9 Monitoring related types


Declaration is made at UCAPI_Type.h, and monitoring related types are defined.

UCSAPI_TERMINAL_STATUS
Prototype:
typedef struct ucsapi_terminal_status
{
UCSAPI_UINT32 Terminal;
UCSAPI_UINT32 Door;
UCSAPI_UINT32 Cover;
UCSAPI_UINT32 Lock;
UCSAPI_UINT32 Open;
UCSAPI_UINT32 Reserved1;
UCSAPI_UINT32 Reserved2;
UCSAPI_UINT32 Reserved3;
} UCSAPI_TERMINAL_STATUS, *UCSAPI_TERMINAL_STATUS_PTR;

Description:
The structure that contains terminal’s status value. Each of the values is described below.

Terminal:
It has the lock status value of the terminal. The following values are available.
0 – UnLock
1 – Lock
2 – Shutdown(Global Locking)

Copyright 2009 UNIONCOMMUNITY Co., LTD. 78


Door:
It h as
t l he d ocking
s v evice
o t t tatus
T v ialue
s fo he
f l erminal.
d his
with the monitoring function. The following values are available.
0 – Close
1 – Open
2 – Not used
3 – Forced Open
4 – Not Closed
. Cover:
It has the cover status value of the terminal. The following values are available.
0 – Close
1 – Open
Lock:
It has the lock status value of gate. The following values are available.
0 – Normal
1 – Error
Open:
It has the open type value of gate open. The following values are available.
0 – Normal Open
1 – Continuous Open
acuStatus:
If terminal is ACU(MCP-040), then this area set with acu status.
(Refer ACU_STATUS struct from UCSAPI_Type.h file and ACU manual)

UCSAPI_ACU_STATUS_INFO
Prototype:
#define MAX_ACU_PARTITION 4
#define MAX_ACU_ZONE 8
#define MAX_ACU_LOCK 4
#define MAX_ACU_READER 8

typedef struct acu_reader_ver


{
BYTE hw;
BYTE major;

Copyright 2009 UNIONCOMMUNITY Co., LTD. 79


BYTE minor;
BYTE custom1;
BYTE custom2;
BYTE order;
BYTE reserved[2];
} ACU_READER_VER;

typedef struct acu_reader


{
BYTE id;
BYTE reader_type;
ACU_READER_VER ver; // 8
} ACU_READER;

typedef struct acu_status


{
BYTE partition[MAX_ACU_PARTITION];
BYTE zone[MAX_ACU_ZONE];
BYTE lock[MAX_ACU_LOCK];
BYTE reader[MAX_ACU_READER];
ACU_READER reader_ver[MAX_ACU_READER];
BYTE Reserved[8];
} ACU_STATUS;

typedef struct ucsapi_acu_status_info


{
UCSAPI_UINT8 Notice;
ACU_STATUS Status;
} UCSAPI_ACU_STATUS_INFO, *UCSAPI_ACU_STATUS_INFO_PTR;

Description:
The structure that contains ACU terminal’s status value.
For each of the values, refer to the ACU manual.

Copyright 2009 UNIONCOMMUNITY Co., LTD. 80


UCSAPI_TERMINAL_CONTROL
Prototype:
typedef struct ucsapi_terminal_control
{
UCSAPI_UINT8 lockStatus;
UCSAPI_UINT8 lockType;
} UCSAPI_TERMINAL_CONTROL, *UCSAPI_TERMINAL_CONTROL_PTR;

Description:
The structure that contains for terminal control value. Each of the values is described below.

lockStatus:
It has the lock status value of the terminal. The following values are available.
0 – UnLock
1 – Lock

lockType:
It has the lock type value of the terminal locking. The following values are available.
0 – Normal
1 – Global(Shutdonw)

Copyright 2009 UNIONCOMMUNITY Co., LTD. 81


3.2 API References

Definitions o v n A arious
u i U PIs S ised no f CS u DK, a nstructio
elements are 7described.

3.2.1 General API

APIs to start/stop UCS SDK are described.

UCSAPI_ServerStart
Prototype:
UCSAPI_RETURN UCSAPI UCSAPI_ServerStart(
IN UCSAPI_UINT32 MaxTerminal,
IN UCSAPI_UINT32 Port,
IN UCSAPI_INT32 Reserved,
IN UCSAPI_CALLBACK_EVENT_HANDLER CallBackEventFunction);

Description:
This API initializes UCSAPI modules and implements server functions.

Parameters:
MaxTerminal::
This p arameter
d t m efinesn ohet aximum
t c b c umberS c i f erminals
speed b a y issigningm c nternali a emory
a t t apacity
m n n o dvance
terminals. I t n f ohec umber
t e f onnected
t m n erminals
m i i xceeds
automatically to increase the number of connections.

Port:
The c ommunication
p f t cort or T erminal
s i i s onnection.
m f he
terminal’s c onnectiont t d o phe T esignated
d v i 9 I ort.
t v he
i c efault
t alue
terminal’s port value also needs to be changed.

CallBackEventFunction:

Copyright 2009 UNIONCOMMUNITY Co., LTD. 82


The pointer on the callback function to notify an event to an application program

Returns:
UCSAPIERR_NONE
UCSAPIERR_FUNCTION_FAILED

Callback:
UCSAPI_CALLBACK_EVENT_CONNECTED

Callback Parameters:
wParam:
UCSAPI_CALLBACK_PARAM_0 CallBack0

lParam:
UCSAPI_UINT8 TerminalIP[4]:
The array of the buffer that has the terminal’s IP address

Copyright 2009 UNIONCOMMUNITY Co., LTD. 83


UCSAPI_ServerStop

Prototype:
UCSAPI_RETURN UCSAPI UCSAPI_ServerStop();

Description:
This API disconnects all connected terminals and stops server functions.

Parameters:
N/A

Returns:
UCSAPIERR_NONE

Callback:
N/A

Callback Parameters:
N/A

Copyright 2009 UNIONCOMMUNITY Co., LTD. 84


UCSAPI_SetTerminalTimezone

Prototype:
UCSAPI_RETURN UCSAPI UCSAPI_SetTerminalTimezone(
IN UCSAPI_UINT32 TerminalID,
IN UCSAPI_CHAR_PTR pTimezoneName);

Description:
Set Terminal time from connected terminal
Terminal i u l s sing
s ’s t ime
inked
b i t ut erver
af serminalt i d nd t erver n t ime
b s
set as local time.

Parameters:
TerminalID:
Terminal ID

pTimezoneName:
Set Terminal zone name
Time zone name can be checked from following list.
HKEY_LOCAL_MACHINE\SOFRWARE\Microsoft\Windows NT\CurrentVersion\TimeZones

Returns:
UCSAPIERR_NONE

Callback:
N/A

Callback Parameters:
N/A.

※ GMT
To check standard time, GMT can be a reference

Copyright 2009 UNIONCOMMUNITY Co., LTD. 85


. G MTs f tand
G orM reenwich
t t i G + ean
K m ime,i i 9 hhat e f t MT 9 or
Greewich time.

※ Time zone Name


Time zone Name can be checked from below Registry.
HKEY_LOCAL_MACHINE\SOFRWARE\Microsoft\Windows NT\CurrentVersion\TimeZones

Copyright 2009 UNIONCOMMUNITY Co., LTD. 86


UCSAPI_SetError

Prototype:
UCSAPI_RETURN UCSAPI UCSAPI_SetError(
IN UCSAPI_UINT32 TerminalID,
IN UCSAPI_ERROR_TYPE ErrorType);

Description:
Receive Callback Event from terminal and return back error code with setting.

Parameters:
TerminalID:
Terminal ID

ErrorType:
Have Error Type value for returning to the eart
.
For example, After call out UCSAPI_GetAccessLogFromTerminal, and fail to save received
Log Data. Set ErrorType as UCSAPI_ERROR_TYPE_ACCESS_LOG in Callback Event function.
After that call USCAPI_SetError then the terminal will refresh log with most recent log
status and sending new log.
.

Returns:
UCSAPIERR_NONE

Callback:
N/A

Callback Parameters:
N/A.

Copyright 2009 UNIONCOMMUNITY Co., LTD. 87


UCSAPI_SetWiegandFormatToTerminal

Prototype:
UCSAPI_RETURN UCSAPI UCSAPI_SetWiegandFormatToTerminal(
IN UCSAPI_UINT32 ClientID,
IN UCSAPI_UINT32 TerminalID,
IN UCSAPI_WIEGAND_DATA wgdType,
IN UCSAPI_CHAR_PTR FilePath);

Description:
To set terminal’s Wiegand In/Out Format.
Wiegand Format File cand be created by using Wiegand Tool fom SDK.

Parameters:
ClientID:
Use for Client/Server model development

TerminalID:
Terminal ID

wgdType:
Type value for defining Wiegand In or Out.
#define UCSAPI_WIEGAND_DATA_TYPE_OUT 1
#define UCSAPI_WIEGAND_DATA_TYPE_IN 2

FilePath:
Entire path for the file of Wiegand Format data

Returns:
UCSAPIERR_NONE

Callback:
UCSAPI_CALLBACK_EVENT_SET_WIEGAND_FORMAT

Copyright 2009 UNIONCOMMUNITY Co., LTD. 88


Callback Parameters:
wParam:
UCSAPI_CALLBACK_PARAM_0_PTR pCallback0;

lParam:
N/A

Copyright 2009 UNIONCOMMUNITY Co., LTD. 89


3.2.2 Terminal User Management API
APIs that can manage terminal users are described.
For command parameter of APIs,
- ClientID : ID of the client that requested a job. (It is used in client/server model development.)
- TerminalID : ID of the target terminal

UCSAPI_AddUserToTerminal

Prototype:
UCSAPI_RETURN UCSAPI UCSAPI_AddUserToTerminal(
IN UCSAPI_INT32 ClientID,
IN UCSAPI_INT32 TerminalID,
IN UCSAPI_BOOL IsOverwrite,
IN UCBioAPI_USER_DATA_PTR* pUserData);

Description:
This API sends the user information to a designated terminal.

Parameters:
ClientID:
ID of the client that requested a job. (It is used in client/server model development.)

TerminalID:
Terminal ID

IsOverwrite:
This p arameter
d whether
esignates
t oo verwrite
a a r n lready
u o n T egistered
d v ser
is 1.

pUserData:
The pointer of the structure that contains user data

Returns:
UCSAPIERR_NONE

Copyright 2009 UNIONCOMMUNITY Co., LTD. 90


UCSAPIERR_NOT_SERVER_ACTIVE
UCSAPIERR_INVALID_POINTER
UCSAPIERR_INVALID_TERMINAL
UCSAPIERR_USER_NAME_SIZE
UCSAPIERR_UNIQUE_ID_SIZE
UCSAPIERR_INVALID_SECURITY_LEVEL
UCSAPIERR_INVALID_PARAMETER
UCSAPIERR_CODE_SIZE
UCSAPIERR_PASSWORD_SIZE
UCSAPIERR_MAX_CARD_NUMBER
UCSAPIERR_MAX_FINGER_NUMBER
UCSAPIERR_PICTURE_SIZE

Callback:
UCSAPI_CALLBACK_EVENT_ADD_USER

Callback Parameters:
wParam:
UCSAPI_CALLBACK_PARAM_0_PTR pCallback0;

lParam:
UCSAPI_UINT32 UserID;

※ Note
In c aseo s f aending
m n s oultiple
f u serd tumber
atat t o uhe erminal
UCSAPI_AddUserToTerminal f unction, t U he CSAPI_CALLBACK_EVENT_ADD_USER
e m b
checked a UCSAPI_AddUserToTerminal
fter is c alled.
T n he
u d exti s ser
o a ata s en
transmission is processed normally.

Copyright 2009 UNIONCOMMUNITY Co., LTD. 91


UCSAPI_DeleteUserFromTerminal

Prototype:
UCSAPI_RETURN UCSAPI UCSAPI_DeleteUserFromTerminal(
IN UCSAPI_INT32 ClientID,
IN UCSAPI_INT32 TerminalID,
IN UCSAPI_INT32 UserID);

Description:
This API deletes the user data from the designated terminal.

Parameters:
ClientID:
ID of the client that requested a job. (It is used in client/server model development.)

TerminalID:
Terminal ID

UserID:
ID of a user to delete

Returns:
UCSAPIERR_NONE
UCSAPIERR_NOT_SERVER_ACTIVE
UCSAPIERR_INVALID_TERMINAL

Callback:
UCSAPI_CALLBACK_EVENT_DELETE_USER

Callback Parameters:
wParam:
UCSAPI_CALLBACK_PARAM_0_PTR pCallback0;

lParam :

Copyright 2009 UNIONCOMMUNITY Co., LTD. 92


UCSAPI_UINT32 UserID;

※ Note
In c ase
o d f s eleting
u o t everal
t u sers
UCSAPI_DeleteUserFromTerminal
f he erminal f sing un
the U CSAPI_CALLBACK_EVENT_DELETE_USER e m b c a vent u
UCSAPI_DeleteUserFromTerminal i c T n u i sd alled.
o a dhe iextp ser s eleted
normally.

Copyright 2009 UNIONCOMMUNITY Co., LTD. 93


UCSAPI_DeleteAllUserFromTerminal

Prototype:
UCSAPI_RETURN UCSAPI UCSAPI_DeleteAllUserFromTerminal(
IN UCSAPI_INT32 ClientID,
IN UCSAPI_INT32 TerminalID);

Description:
This API deletes all user data from the designated terminal.

Parameters:
ClientID:
ID of the client that requested a job. (It is used in client/server model development.)

TerminalID:
Terminal ID

Returns:
UCSAPIERR_NONE
UCSAPIERR_NOT_SERVER_ACTIVE
UCSAPIERR_INVALID_TERMINAL

Callback:
UCSAPI_CALLBACK_EVENT_DELETE_ALL_USER

Callback Parameters:
wParam:
UCSAPI_CALLBACK_PARAM_0_PTR pCallback0;

lParam:
N/A

Copyright 2009 UNIONCOMMUNITY Co., LTD. 94


UCSAPI_GetUserCountFromTerminal

Prototype:
UCSAPI_RETURN UCSAPI UCSAPI_GetUserCountFromTerminal(
IN UCSAPI_INT32 ClientID,
IN UCSAPI_INT32 TerminalID);

Description:
This API obtains the number of registered users from the designated terminal.

Parameters:
ClientID:
ID of the client that requested a job. (It is used in client/server model development.)

TerminalID:
Terminal ID

Returns:
UCSAPIERR_NONE
UCSAPIERR_NOT_SERVER_ACTIVE
UCSAPIERR_INVALID_TERMINAL

Callback:
UCSAPI_CALLBACK_EVENT_GET_USER_COUNT

Callback Parameters:
wParam:
UCSAPI_CALLBACK_PARAM_0_PTR pCallback0;

lParam:
UCSAPI_UINT32 nUserCount
This parameter contains the number of users.

Copyright 2009 UNIONCOMMUNITY Co., LTD. 95


UCSAPI_GetUserInfoListFromTerminal

Prototype:
UCSAPI_RETURN UCSAPI UCSAPI_GetUserInfoListFromTerminal(
IN UCSAPI_INT32 ClientID,
IN UCSAPI_INT32 TerminalID);

Description:
This API obtains the list of all registered user information from the designated terminal.

Parameters:
ClientID:
ID of the client that requested a job. (It is used in client/server model development.)

TerminalID:
Terminal ID

Returns:
UCSAPIERR_NONE
UCSAPIERR_NOT_SERVER_ACTIVE
UCSAPIERR_INVALID_TERMINAL

Callback:
UCSAPI_CALLBACK_EVENT_GET_USER_INFO_LIST

Callback Parameters:
wParam:
UCSAPI_CALLBACK_PARAM_0_PTR pCallback0;

lParam:
UCSAPI_CALLBACK_PARAM_1_PTR pCallback1
pCallback1.DataType = UCSAPI_CALLBACK_DATA_TYPE_USER_INFO

Copyright 2009 UNIONCOMMUNITY Co., LTD. 96


UCSAPI_GetUserDataFromTerminal

Prototype:
UCSAPI_RETURN UCSAPI UCSAPI_GetUserDataFromTerminal(
IN UCSAPI_INT32 ClientID,
IN UCSAPI_UINT32 TerminalID
IN UCSAPI_UINT32 UserID);

Description:
This API obtains the user data from the designated terminal.

Parameters:
ClientID:
ID of the client that requested a job. (It is used in client/server model development.)

TerminalID:
Terminal ID

UserID:
User ID

Returns:
UCSAPIERR_NONE
UCSAPIERR_NOT_SERVER_ACTIVE
UCSAPIERR_INVALID_TERMINAL

Callback:
UCSAPI_CALLBACK_EVENT_GET_USER_DATA

Callback Parameters:
wParam:
UCSAPI_CALLBACK_PARAM_0_PTR pCallback0;

lParam :

Copyright 2009 UNIONCOMMUNITY Co., LTD. 97


UCSAPI_CALLBACK_PARAM_1_PTR pCallback1;
pCallback1.DataType = UCSAPI_CALLBACK_DATA_TYPE_USER_DATA

UCSAPI_RegistFaceFromTerminal

Prototype:
UCSAPI_RETURN UCSAPI UCSAPI_RegistFaceFromTerminal (
IN UCSAPI_UINT16 ClientID,
IN UCSAPI_UINT32 TerminalID,
IN UCSAPI_UINT8 opt);

Description:
When receive this command, terminal start the face registration.
Terminal make a number of events until the ergistation is finished or canceled.
(Regular Registration : 5 events, Quick Registration : 3 events)

Parameters:
opt :
0 : Start registration , 1 : Cancel registration

Returns:
UCSAPIERR_NONE
UCSAPIERR_NOT_SERVER_ACTIVE
UCSAPIERR_INVALID_POINTER

Callback:
UCSAPI_CALLBACK_EVENT_REGIST_FACE

Callback Parameters:
wParam:
UCSAPI_CALLBACK_PARAM_0_PTR pCallback0;
 TotalNumber & CurrentIndex in Progress are zero when Cancel event
lParam:
Face Data at normal situation(UCSAPI_FACE_INFO_PTR)

Copyright 2009 UNIONCOMMUNITY Co., LTD. 98


3.2.3 Log related API

APIs to obtain log data stored at the terminal are described.

UCSAPI_GetAccessLogCountFromTerminal

Prototype:
UCSAPI_RETURN UCSAPI UCSAPI_GetAccessLogCountFromTerminal(
IN UCSAPI_INT32 ClientID,
IN UCSAPI_INT32 TerminalID,
IN UCSAPI_GET_LOG_TYPE LogType);

Description:
This API obtains the number of authentication logs from the designated terminal.

Parameters:
ClientID:
ID of the client that requested a job. (It is used in client/server model development.)

TerminalID:
Terminal ID

LogType:
This p arameter
d t l esignates
t t o R he t Uog ype o f btain.
a efer
values.

Returns:
UCSAPIERR_NONE
UCSAPIERR_NOT_SERVER_ACTIVE
UCSAPIERR_INVALID_PARAMETER
UCSAPIERR_INVALID_TERMINAL

Callback:
UCSAPI_CALLBACK_EVENT_GET_ACCESS_LOG_COUNT

Copyright 2009 UNIONCOMMUNITY Co., LTD. 99


Callback Parameters:
wParam:
UCSAPI_CALLBACK_PARAM_0_PTR pCallback0;

lParam :
UCSAPI_UINT32 nLogCount;
This parameter contains the number of logs.

UCSAPI_GetAccessLogCountFromTerminalEx

Prototype:
UCSAPI_RETURN UCSAPI UCSAPI_GetAccessLogCountFromTerminalEx(
IN UCSAPI_INT32 ClientID,
IN UCSAPI_INT32 TerminalID,
IN UCSAPI_GET_LOG_TYPE LogType,
IN UCSAPI_DATE_PERIOD_PTR Period);

Description:
GetAccessLogCountFromTerminal i a e A o f Tos g n
etp xtended
eriodic
l i ogPI nform
f
parameter for setting period is added.

Parameters:
ClientID:
ID of the client that requested a job. (It is used in client/server model development.)

TerminalID:
Terminal ID

LogType:
This p arameter
d t l esignates
t t o R he t Uog ype o f btain.
a efer
values.

Period:

Copyright 2009 UNIONCOMMUNITY Co., LTD. 100


It i s a p ointer
o s f c tructure d i ontaining o l d ate nfo
It is for getting the periodic log information.
This value is used as LogType is set LOG_TYPE_PERIOD.

Returns:
UCSAPIERR_NONE
UCSAPIERR_NOT_SERVER_ACTIVE
UCSAPIERR_INVALID_PARAMETER
UCSAPIERR_INVALID_TERMINAL

Callback:
UCSAPI_CALLBACK_EVENT_GET_ACCESS_LOG_COUNT

Callback Parameters:
wParam:
UCSAPI_CALLBACK_PARAM_0_PTR pCallback0;

lParam :
UCSAPI_UINT32 nLogCount;
This parameter contains the number of logs.

Copyright 2009 UNIONCOMMUNITY Co., LTD. 101


UCSAPI_GetAccessLogFromTerminal

Prototype:
UCSAPI_RETURN UCSAPI UCSAPI_GetAccessLogFromTerminal(
IN UCSAPI_INT32 ClientID,
IN UCSAPI_INT32 TerminalID,
IN UCSAPI_GET_LOG_TYPE LogType);

Description:
This API obtains the authentication log data from the designated terminal.

Parameters:
ClientID:
ID of the client that requested a job. (It is used in client/server model development.)

TerminalID:
Terminal ID

LogType:
This p arameter
d t l esignates
t t o R he t Uog ype o f btain.
a efer
values.

Returns:
UCSAPIERR_NONE
UCSAPIERR_NOT_SERVER_ACTIVE
UCSAPIERR_INVALID_PARAMETER
UCSAPIERR_INVALID_TERMINAL

Callback:
UCSAPI_CALLBACK_EVENT_GET_ACCESS_LOG

Callback Parameters:
wParam:
UCSAPI_CALLBACK_PARAM_0_PTR pCallback0;

Copyright 2009 UNIONCOMMUNITY Co., LTD. 102


In case several numbers of log records exist,
t heUCSAPI_CALLBACK_EVENT_GET_ACCESS_LOG e corresponding
vent t the n umber
oo r a f ecords
generated. R t t efer
p o he v Callback0->Progress
f t t n o l a t i alue or
information of the current log.

lParam:
UCSAPI_CALLBACK_PARAM_1_PTR pCallback1;
pCallback1->DataType = UCSAPI_CALLBACK_DATA_TYPE_ACCESS_LOG;

Copyright 2009 UNIONCOMMUNITY Co., LTD. 103


UCSAPI_GetAccessLogFromTerminalEx

Prototype:
UCSAPI_RETURN UCSAPI UCSAPI_GetAccessLogFromTerminalEx(
IN UCSAPI_INT32 ClientID,
IN UCSAPI_INT32 TerminalID,
IN UCSAPI_GET_LOG_TYPE LogType,
IN UCSAPI_DATE_PERIOD_PTR Period);

Description:
GetAccessLogFromTerminal i a e A o f s n To gxtended
etp eriodic
l i PI og
f unction
nform
parameter for setting period is added.

Parameters:
ClientID:
ID of the client that requested a job. (It is used in client/server model development.)

TerminalID:
Terminal ID

LogType:
This p arameter
d t l esignates
t t o R he t Uog ype o f btain.
a efer
values.

Period:
It i s a p ointer
o s f c tructure d i ontaining o l d ate nfo
It is for getting
the periodic log information.
This value is used as LogType is set LOG_TYPE_PERIOD.

Returns:
UCSAPIERR_NONE
UCSAPIERR_NOT_SERVER_ACTIVE
UCSAPIERR_INVALID_PARAMETER

Copyright 2009 UNIONCOMMUNITY Co., LTD. 104


UCSAPIERR_INVALID_TERMINAL

Callback:
UCSAPI_CALLBACK_EVENT_GET_ACCESS_LOG

Callback Parameters:
wParam:
UCSAPI_CALLBACK_PARAM_0_PTR pCallback0;
In c ase
s neveral o l rumbers e t UCSAPI_CALLBACK_EVENT_GET_ACCESS_LOG
f og ecords xist, he e ve
corresponding t the n umber
oo r a fg ecords R t tre p enerated. v efer
f o
the total number of logs and the index information of the current log.

lParam:
UCSAPI_CALLBACK_PARAM_1_PTR pCallback1;
pCallback1->DataType = UCSAPI_CALLBACK_DATA_TYPE_ACCESS_LOG;

Copyright 2009 UNIONCOMMUNITY Co., LTD. 105


3.2.4 Authentication related API

APIs to implement authentication at the server are described.


In case terminal’s authentication type is N/S, NO mode, the terminal requests authentication to the server.

UCSAPI_SendAuthInfoToTerminal

Prototype:
UCSAPI_RETURN UCSAPI UCSAPI_SendAuthInfoToTerminal(
IN UCSAPI_INT32 TerminalID,
IN UCSAPI_AUTH_INFO_PTR pUserAuthInfo);

Description:
During 1 :1 authentication, t he t erminal n otifies
t
UCSAPI_CALLBACK_EVENT_VERIFY_USER_AUTH_INFO e t t a p t o vent
user’s authentication information.
Then, t a he pplication
p n t i rogramthe user’s aeeds
uthenticationi
o nclude i t nformation
UCSAPI_AUTH_INFO structure and send it to the terminal immediately.
The U CSAPI_CALLBACK_EVENT_VERIFY_USER_AUTH_INFOe i always generated b t efore
following events.
UCSAPI_CALLBACK_EVENT_VERIFY_FINGER_1_TO_1,
UCSAPI_CALLBACK_EVENT_VERIFY_CARD,
CSAPI_CALLBACK_EVENT_VERIFY_PASSWORD

Parameters:
TerminalID:
Terminal ID

pUserAuthInfo:
The pointer of the structure that contains user’s authentication information

Returns:
UCSAPIERR_NONE

Copyright 2009 UNIONCOMMUNITY Co., LTD. 106


UCSAPIERR_NOT_SERVER_ACTIVE
UCSAPIERR_INVALID_POINTER
UCSAPIERR_INVALID_TERMINAL

Callback:
UCSAPI_CALLBACK_EVENT_VERIFY_USER_AUTH_INFO

Callback Parameters:
wParam:
UCSAPI_CALLBACK_PARAM_0_PTR pCallback0;

lParam:
UCSAPI_INPUT_ID_DATA_PTR pInputID;
The structure that contains the ID information entered from the terminal

Copyright 2009 UNIONCOMMUNITY Co., LTD. 107


UCSAPI_SendAntipassbackResultToTerminal

Prototype:
UCSAPI_RETURN UCSAPI UCSAPI_SendAntipassbackResultToTerminal(
IN UCSAPI_INT32 TerminalID,
IN UCSAPI_INT32 UserID,
IN UCSAPI_BOOL bResult);

Description:
If T erminal i s s w etted
A ith o ntipassback
w s a T ption
application i su sed
f c or o hecking
s o c Aut tatus T a f urrent
w c t ntipassback.
status o A f ntipassback
i b t s snto f Result t t t hen T end
e w atraight orw
only at the terminal to terminal verification.

Parameters:
TerminalID:
Terminal ID

UserID:
User ID

bResult:
Status of weather enter by Antipassback. Value 1 if for access granted

Returns:
UCSAPIERR_NONE
UCSAPIERR_NOT_SERVER_ACTIVE
UCSAPIERR_INVALID_POINTER
UCSAPIERR_INVALID_TERMINAL

Callback:
UCSAPI_CALLBACK_EVENT_ANTIPASSBACK

Copyright 2009 UNIONCOMMUNITY Co., LTD. 108


Callback Parameters:
wParam:
UCSAPI_CALLBACK_PARAM_0_PTR pCallback0;

lParam :
UCSAPI_UINT32 UserID;

Copyright 2009 UNIONCOMMUNITY Co., LTD. 109


UCSAPI_SendAuthResultToTerminal

Prototype:
UCSAPI_RETURN UCSAPI UCSAPI_SendAuthResultToTerminal(
IN UCSAPI_INT32 TerminalID,
IN UCSAPI_AUTH_NOTIFY_PTR pResult);

Description:
The terminal notifies the following events to an application program for user authentication.
UCSAPI_CALLBACK_EVENT_VERIFY_FINGER_1_TO_N (1:N fingerprint authentication request)
UCSAPI_CALLBACK_EVENT_VERIFY_FINGER_1_TO_1 (1:1 fingerprint authentication request)
UCSAPI_CALLBACK_EVENT_VERIFY_CARD (Card authentication request)
UCSAPI_CALLBACK_EVENT_VERIFY_PASSWORD (Password authentication request)
Then, t a he pplication
p n t irogram the user’s eeds
a uthentication
o r nclude
i t esult
UCSAPI_AUTH_NOTIFY structure and send it to the terminal immediately.

Parameters:
TerminalID:
Terminal ID

pResult:
The pointer of the structure that contains authentication results

Returns:
UCSAPIERR_NONE
UCSAPIERR_NOT_SERVER_ACTIVE
UCSAPIERR_INVALID_POINTER
UCSAPIERR_INVALID_TERMINAL

Callback:
UCSAPI_CALLBACK_EVENT_VERIFY_FINGER_1_TO_N
UCSAPI_CALLBACK_EVENT_VERIFY_FINGER_1_TO_1
UCSAPI_CALLBACK_EVENT_VERIFY_CARD
UCSAPI_CALLBACK_EVENT_VERIFY_PASSWORD

Copyright 2009 UNIONCOMMUNITY Co., LTD. 110


Callback Parameters:
wParam:
UCSAPI_CALLBACK_PARAM_0_PTR pCallback0;

lParam :
UCSAPI_INPUT_DATA_PTR pInputData;
The pointer of the structure that contains the sample data entered from the terminal

Copyright 2009 UNIONCOMMUNITY Co., LTD. 111


3.2.5 Terminal Management API

APIs to manage the terminal are described.

UCSAPI_GetTerminalCount

Prototype:
UCSAPI_RETURN UCSAPI UCSAPI_GetTerminalCount(
IN UCSAPI_UINT32* pTerminalCount);

Description:
This API obtains the number of terminals connected to the server.

Parameters:
pTerminalCount:
The pointer of the value to contain the number of terminals

Returns:
UCSAPIERR_NONE
UCSAPIERR_NOT_SERVER_ACTIVE
UCSAPIERR_INVALID_POINTER

Callback:
N/A

Callback Parameters:
N/A

Copyright 2009 UNIONCOMMUNITY Co., LTD. 112


UCSAPI_GetFirmwareVersionFromTerminal

Prototype:
UCSAPI_RETURN UCSAPI UCSAPI_GetFirmwareVersionFromTerminal(
IN UCSAPI_UINT32 ClientID,
IN UCSAPI_UINT32 TerminalID);

Description:
This API obtains the firmware version of the designated terminal.

Parameters:
ClientID:
ID of the client that requested a job. (It is used in client/server model development.)

TerminalID:
Terminal ID

Returns:
UCSAPIERR_NONE
UCSAPIERR_NOT_SERVER_ACTIVE
UCSAPIERR_INVALID_POINTER
UCSAPIERR_INVALID_TERMINAL

Callback:
UCSAPI_CALLBACK_EVENT_FW_VERSION

Callback Parameters:
wParam:
UCSAPI_CALLBACK_PARAM_0_PTR pCallback0;

lParam:
UCSAPI_DATA_PTR pVersion;
The pointer of the structure that contains version information

Copyright 2009 UNIONCOMMUNITY Co., LTD. 113


UCSAPI_UpgradeFirmwareToTerminal

Prototype:
UCSAPI_RETURN UCSAPI UCSAPI_UpgradeFirmwareToTerminal(
IN UCSAPI_UINT32 ClientID,
IN UCSAPI_UINT32 TerminalID,
IN UCSAPI_CHAR_PTR pFilePath);

Parameters:
This A u PI pgrades
t f o t he
d irmware
t U f phe iesignated i n erminal.
with the following event.
UCSAPI_CALLBACK_EVENT_FW_UPGRADING / UCSAPI_CALLBACK_EVENT_FW_UPGRADED

Parameters:
ClientID:
ID of the client that requested a job. (It is used in client/server model development.)

TerminalID:
Terminal ID

pFilePath:
The pointer of the value that contains the path of the firmware file

Returns:
UCSAPIERR_NONE
UCSAPIERR_NOT_SERVER_ACTIVE
UCSAPIERR_INVALID_POINTER
UCSAPIERR_INVALID_TERMINAL

Callback:
UCSAPI_CALLBACK_EVENT_FW_UPGRADING
UCSAPI_CALLBACK_EVENT_FW_UPGRADED

Callback Parameters:

Copyright 2009 UNIONCOMMUNITY Co., LTD. 114


wParam:
UCSAPI_CALLBACK_PARAM_0 pCallback0;
For upgrade progress information, refer to the pCallback0->Progress structure.

lParam:
N/A

UCSAPI_SendUserFileToTerminal
Prototype:
UCSAPI_RETURN UCSAPI UCSAPI_SendUserFileToTerminal (
IN UCSAPI_UINT32 ClientID,
IN UCSAPI_UINT32 TerminalID,
IN UCSAPI_UINT32 FileType,
IN UCSAPI_CHAR_PTR FilePath);

Parameters:
This API downloads the user file to terminal.

Parameters:
ClientID: See 1.6 Terminology Description
TerminalID: See 1.6 Terminology Description
FileType
1:String file(.csv),
2:Background image file(.jpg),
3:Voice file to success(.wav),
4:Voice file to fail(.wav),
5:Video file(.mp4)
FilePath:
Full path of the file(Absolute Path)

Returns:
UCSAPIERR_NONE
UCSAPIERR_NOT_SERVER_ACTIVE
UCSAPIERR_INVALID_POINTER
UCSAPIERR_INVALID_TERMINAL

Copyright 2009 UNIONCOMMUNITY Co., LTD. 115


Callback:
UCSAPI_CALLBACK_EVENT_USERFILE_UPGRADING : 다운로드 진행 중
UCSAPI_CALLBACK_EVENT_ USERFILE_UPGRADED : 다운로드 완료 후

Callback Parameters:
wParam:
UCSAPI_CALLBACK_PARAM_0 pCallback0;
다운로드 진행 정보는 pCallback0->Progress 구조체 참조.

lParam:
N/A

UCSAPI_GetOptionFromTerminal

Prototype:
UCSAPI_RETURN UCSAPI UCSAPI_GetOptionFromTerminal(
IN UCSAPI_UINT16 ClientID,
IN UCSAPI_UINT32 TerminalID);

Description:
This API obtains the option setting value from the designated terminal.

Parameters:
ClientID , TerminalID: See above

Returns:
UCSAPIERR_NONE
UCSAPIERR_NOT_SERVER_ACTIVE
UCSAPIERR_INVALID_TERMINAL

Callback Parameters:
UCSAPI_CALLBACK_EVENT_GET_TERMINAL_OPTION

Callback Parameters:

Copyright 2009 UNIONCOMMUNITY Co., LTD. 116


wParam:
UCSAPI_CALLBACK_PARAM_0 pCallback0;

lParam:
UCSAPI_TERMINAL_OPTION_PTR pOption;

Copyright 2009 UNIONCOMMUNITY Co., LTD. 117


UCSAPI_SetOptionToTerminal

Prototype:
UCSAPI_RETURN UCSAPI UCSAPI_SetOptionToTerminal(
IN UCSAPI_UINT32 ClientID,
IN UCSAPI_UINT32 TerminalID,
IN UCSAPI_TERMINAL_OPTION_PTR pOption);

Description:
This API sets up the option value of the designated terminal.

Parameters:
ClientID , TerminalID: See above
pOption:
The pointer of the UCSAPI_TERMINAL_OPTION structure

Returns:
UCSAPIERR_NONE
UCSAPIERR_NOT_SERVER_ACTIVE
UCSAPIERR_INVALID_POINTER
UCSAPIERR_INVALID_TERMINAL

Callback:
UCSAPI_CALLBACK_EVENT_SET_TERMINAL_OPTION

wParam
UCSAPI_CALLBACK_PARAM_0_PTR pCallBack0;

lParam:
N/A

UCSAPI_OpenDoorToTerminal

Prototype:

Copyright 2009 UNIONCOMMUNITY Co., LTD. 118


UCSAPI_RETURN UCSAPI UCSAPI_OpenDoorToTerminal(
IN UCSAPI_UINT32 ClientID,
IN UCSAPI_UINT32 TerminalID);

Description:
This API temporarily opens the locking device of the designated terminal.

Parameters:
ClientID , TerminalID: See above

Returns:
UCSAPIERR_NONE
UCSAPIERR_NOT_SERVER_ACTIVE
UCSAPIERR_INVALID_TERMINAL

Callback:
UCSAPI_CALLBACK_EVENT_OPEN_DOOR

Callback Parameters:
wParam:
UCSAPI_CALLBACK_PARAM_0_PTR pCallback0;

lParam:
N/A

UCSAPI_SetDoorStatusToTerminal

Prototype:
UCSAPI_RETURN UCSAPI UCSAPI_SetDoorStatusToTerminal(
IN UCSAPI_UINT16 ClientID,
IN UCSAPI_UINT32 TerminalID,
IN UCSAPI_UINT32 Status);

Description:

Copyright 2009 UNIONCOMMUNITY Co., LTD. 119


This API control lock to fit the status value

Parameters:
ClientID , TerminalID: See above
Status:
Lock Status (0: temporarily open, 1:start unlock, 2:end unlock)

Returns:
UCSAPIERR_NONE
UCSAPIERR_NOT_SERVER_ACTIVE
UCSAPIERR_INVALID_TERMINAL

Callback:
UCSAPI_CALLBACK_EVENT_OPEN_DOOR

Callback Parameters:
wParam:
UCSAPI_CALLBACK_PARAM_0_PTR pCallback0;

lParam:
N/A

UCSAPI_SendTerminalControl

Prototype:
UCSAPI_RETURN UCSAPI UCSAPI_SendTerminalControl (
IN UCSAPI_UINT16 ClientID,
IN UCSAPI_UINT32 TerminalID,
IN UCSAPI_UINT32 lockStatus,
IN UCSAPI_UINT32 lockType);

Description:
This API control terminal to fit the parameter value.
Global locking means terminal shutdown.

Copyright 2009 UNIONCOMMUNITY Co., LTD. 120


Parameters:
ClientID , TerminalID: See above
lockStatus:
Lock Status (0:Unlock, 1:Lock)
lockType:
Lock Type (0:Normal, 1:Global)

Returns:
UCSAPIERR_NONE

Callback:
UCSAPI_CALLBACK_EVENT_TERMINAL_CONTROL

Callback Parameters:
wParam:
UCSAPI_CALLBACK_PARAM_0_PTR pCallback0;

lParam:
UCSAPI_TERMINAL_CONTROL pCtrl;

Copyright 2009 UNIONCOMMUNITY Co., LTD. 121


UCSAPI_SetAccessControlDataToTerminal

Prototype:
UCSAPI_RETURN UCSAPI UCSAPI_SetAccessControlDataToTerminal(
IN UCSAPI_UINT32 ClientID,
IN UCSAPI_UINT32 TerminalID,
IN UCSAPI_ACCESS_CONTROL_DATA_PTR pAccessControlData);

Description:
This A s PI theends
access c iontrol t nformation
t d t oT he
z a esignated
t
holiday a a ndg ccess
i n roupt b s nformation
s A c eedi o i eu ent e
during a uthentication
a t t I n ts he a erminal.
c i f ioa toredt ccess
terminal does not perform access control separately.

Parameters:
ClientID , TerminalID: See above
pAccessControlData:
The pointer of the structure that contains access control information

Returns:
UCSAPIERR_NONE
UCSAPIERR_NOT_SERVER_ACTIVE
UCSAPIERR_INVALID_POINTER
UCSAPIERR_INVALID_TERMINAL

Callback:
UCSAPI_CALLBACK_EVENT_SET_ACCESS_CONTROL_DATA

Callback Parameters:
wParam:
UCSAPI_CALLBACK_PARAM_0_PTR pCallback0;

lParam:
N/A

Copyright 2009 UNIONCOMMUNITY Co., LTD. 122


UCSAPI_GetTerminalInfo
Prototype:
UCSAPI_RETURN UCSAPI UCSAPI_GetTerminalInfo(
IN UCSAPI_UINT32 TerminalID,
OUT UCSAPI_TERMINAL_INFO_PTR pInfo);

Description:
This A cPI g and t et ietail erminal
( : I A nfomations.
M A o EX
info…)

Parameters:
ClientID , TerminalID: See above

UCSAPI_TERMINAL_INFO_PTR: Point for Terminal information struct.


typedef struct ucsapi_terminal_info
{
UCSAPI_UINT32 TerminalID;
UCSAPI_UINT8 TerminalIP[4];
UCSAPI_UINT8 TerminalStatus;
UCSAPI_UINT8 DoorStatus;
UCSAPI_UINT8 CoverStatus;
UCSAPI_UINT8 LockStatus;
UCSAPI_UINT8 ExtSignal[4];
UCSAPI_VERSIONFirmware;
UCSAPI_VERSIONProtocol;
UCSAPI_VERSIONCardReader;
UCSAPI_UINT16 ModelNo;
UCSAPI_UINT8 TerminalType;
UCSAPI_UINT8 MacAddr[6];
} UCSAPI_TERMINAL_INFO, *UCSAPI_TERMINAL_INFO_PTR;

Returns:
UCSAPIERR_NONE

Copyright 2009 UNIONCOMMUNITY Co., LTD. 123


UCSAPIERR_INVALID_TERMINAL

Callback: None

UCSAPI_SendPrivateMessageToTerminal
Prototype:
UCSAPI_RETURN UCSAPI UCSAPI_SendPrivateMessageToTerminal(
IN UCSAPI_UINT16 ClientID,
IN UCSAPI_UINT32 TerminalID,
IN UCSAPI_UINT32 Reserved,
IN UCSAPI_PRIVATE_MESSAGE_PTR Message)

Description:
This API can send message for display on terminal LCD.
In struct of Message, there are display time(second) and text for display.

Parameters:
ClientID , TerminalID: See above

Message : The pointer on the structure that contains private message information
typedef struct ucsapi_private_message
{
UCSAPI_UINT16 messageSize;
UCSAPI_UINT16 displayTime;
UCSAPI_CHAR messageData[UCSAPI_MESSAGE];
} UCSAPI_PRIVATE_MESSAGE, *UCSAPI_PRIVATE_MESSAGE_PTR;

Returns:
UCSAPIERR_NONE
UCSAPIERR_NOT_SERVER_ACTIVE
UCSAPIERR_INVALID_POINTER
UCSAPIERR_INVALID_TERMINAL

Callback:
UCSAPI_CALLBACK_EVENT_PRIVATE_MESSAGE

Copyright 2009 UNIONCOMMUNITY Co., LTD. 124


Callback Parameters:
wParam:
UCSAPI_CALLBACK_PARAM_0_PTR pCallback0;

lParam:
N/A

UCSAPI_SendPublicMessageToTerminal
Prototype:
UCSAPI_RETURN UCSAPI UCSAPI_SendPublicMessageToTerminal(
IN UCSAPI_UINT16 ClientID,
IN UCSAPI_UINT32 TerminalID,
IN UCSAPI_BOOL Show,
IN UCSAPI_PUBLIC_MESSAGE_PTR Message)
Description:
This API can send public message for display on terminal LCD.
Public message display for setted period and setted time

Parameters:
ClientID , TerminalID: See above

Message : The pointer on the structure that contains public message information
typedef struct ucsapi_public_message
{
UCSAPI_UINT16 Reserved1;
UCSAPI_UINT8 Reserved2[2];
UCSAPI_DATE_YYYY_MM_DD StartDate;
UCSAPI_DATE_YYYY_MM_DD EndDate;
UCSAPI_TIME_HH_MM StartTime;
UCSAPI_TIME_HH_MM EndTime;
UCSAPI_CHAR Message[UCSAPI_MESSAGE];
} UCSAPI_PUBLIC_MESSAGE, *UCSAPI_PUBLIC_MESSAGE_PTR;
Returns:
UCSAPIERR_NONE

Copyright 2009 UNIONCOMMUNITY Co., LTD. 125


UCSAPIERR_NOT_SERVER_ACTIVE
UCSAPIERR_INVALID_POINTER
UCSAPIERR_INVALID_TERMINAL

Callback:
UCSAPI_CALLBACK_EVENT_PUBLIC_MESSAGE

Callback Parameters:
wParam:
UCSAPI_CALLBACK_PARAM_0_PTR pCallback0;

lParam:
N/A

UCSAPI_SendSirenToTerminal
Prototype:
UCSAPI_RETURN UCSAPI UCSAPI_SendSirenToTerminal(
IN UCSAPI_UINT16 ClientID,
IN UCSAPI_UINT32 TerminalID,
IN UCSAPI_UINT8 opt,
IN UCSAPI_UINT8 cntSiren,
IN UCSAPI_SIREN_CONFIG_PTR pSiren)
Description:
Bring t s he d tiren h b ata s f hatt t as o een
t t et s rom
d t t het erminal
If it is obtaining the siren data (opt=0), parameter value of next will be ignored.
Parameters:
ClientID , TerminalID: Refer to the above documents
opt:
Command issuing option (0: Obtaining siren data, 1: Writing siren data)
cntSiren:
It is the number of UCSAPI_SIREN_CONFIG value included in pSiren (Max. 100)

pSiren : Siren data structure

#define MAX_SIREN_CONFIG 100

Copyright 2009 UNIONCOMMUNITY Co., LTD. 126


struct WeekDay_Flag
{
BYTE Sunday :1;
BYTE Monday :1;
BYTE Tuesday :1;
BYTE Wednesday :1;
BYTE Thursday :1;
BYTE Friday :1;
BYTE Saturday :1;
BYTE OffHoliday :1;
};
typedef struct siren_config
{
BYTE Hour;
BYTE Minute;
WeekDay_Flag wf;
BYTE Duration; // Seconds
BYTE Reserved[4];
} UCSAPI_SIREN_CONFIG, *UCSAPI_SIREN_CONFIG_PTR;

Hour: Siren rings at Minute time during Duration (sec).


Repeat is available for each day and holidays can be excluded.

Callback:
UCSAPI_CALLBACK_EVENT_GET_SIREN : In case when opt value is 0.
UCSAPI_CALLBACK_EVENT_SET_SIREN : In case when opt value is 1.

Callback Parameters:
wParam:
UCSAPI_CALLBACK_PARAM_0_PTR pCallback0;
In case when opt value is 0. pCallback0->Progress.TotalNumber is the number of siren data.

lParam:
In case when opt value is 0, it will be UCSAPI_SIREN_CONFIG_PTR

Copyright 2009 UNIONCOMMUNITY Co., LTD. 127


UCSAPI_SetSmartCardLayoutToTerminal
Prototype:
UCSAPI_RETURN UCSAPI UCSAPI_SetSmartCardLayoutToTerminal (
IN UCSAPI_UINT16 ClientID,
IN UCSAPI_UINT32 TerminalID,
IN UCSAPI_SMARTCARD_LAYOUT_PTR pCardLayout)
Description:
It transmits the card layout data to the terminal to set up the card layout that is going to be read
on the terminal.
Parameters:
ClientID , TerminalID: Refer to the above document
pCardLayout : Card layout data structure

#define UCSAPI_SMARTCARD_SECTOR_MAX 128


typedef UCSAPI_UINT32 UCSAPI_SMARTCARD_KEYTYPE;
#define UCSAPI_SMARTCARD_KEYTYPE_A 0x60
#define UCSAPI_SMARTCARD_KEYTYPE_B 0x61

typedef struct ucsapi_smartcard_sector_layout


{
UCSAPI_UINT8 SectorNumber; // Sector Number(0..127)
UCSAPI_SMARTCARD_KEYTYPE KeyType; // Key A = 0x60, Key B = 0x61)
UCSAPI_UINT8 KeyData[6]; // Key Value
UCSAPI_UINT8 BlockNumber; // Block Number(0..3)
UCSAPI_UINT8 Start; // Start Location in Block
UCSAPI_UINT8 Length; // Data Length
UCSAPI_UINT8 AID[2]; // AID of MAD Card. If AID not use then set 0xff
// (This field is using for MAD Card and If byte value is 0xff then this byte is not use)
UCSAPI_UINT8 Reserved[3];

} UCSAPI_SMARTCARD_SECTOR_LAYOUT, *UCSAPI_SMARTCARD_SECTOR_LAYOUT_PTR;

typedef UCSAPI_UINT32 UCSAPI_SMARTCARD_TYPE;

Copyright 2009 UNIONCOMMUNITY Co., LTD. 128


#define UCSAPI_SMARTCARD_TYPE_DATA 0
#define UCSAPI_SMARTCARD_TYPE_FINGER 1

typedef UCSAPI_UINT32 UCSAPI_SMARTCARD_READTYPE;


#define UCSAPI_SMARTCARD_READTYPE_SERIAL 0
#define UCSAPI_SMARTCARD_READTYPE_DATA 1
#define UCSAPI_SMARTCARD_READTYPE_MAD 2

typedef UCSAPI_UINT8 UCSAPI_SMARTCARD_SERIALFORMAT;


#define UCSAPI_SMARTCARD_SERIALFORMAT_DEFAULT 0
#define UCSAPI_SMARTCARD_SERIALFORMAT_HEXA 1
#define UCSAPI_SMARTCARD_SERIALFORMAT_DECIMAL 2
#define UCSAPI_SMARTCARD_SERIALFORMAT_35DECIMAL 3

typedef struct ucsapi_smartcard_layout


{
UCSAPI_SMARTCARD_TYPE CardType;
UCSAPI_SMARTCARD_READTYPE ReadType;
UCSAPI_SMARTCARD_SERIALFORMAT SerialFormat;
// if ReadType is UCSAPI_SMARTCARD_READTYPE_SERIAL then this value is valid data.
UCSAPI_UINT8 SectorNumber; // 0..127
UCSAPI_UINT8 Reserved[6];
UCSAPI_SMARTCARD_SECTOR_LAYOUT Layouts[UCSAPI_SMARTCARD_SECTOR_MAX];
// max card size is 8k
} UCSAPI_SMARTCARD_LAYOUT, *UCSAPI_SMARTCARD_LAYOUT_PTR;

Callback:
UCSAPI_CALLBACK_EVENT_SET_SMARTCARD_LAYOUT

Callback Parameters:
wParam:
UCSAPI_CALLBACK_PARAM_0_PTR pCallback0;

lParam:
N/A

Copyright 2009 UNIONCOMMUNITY Co., LTD. 129


3.2.6 ACU Management API

APIs to manage the ACU are described.

UCSAPI_GetOptionFromACU
Prototype:
UCSAPI_RETURN UCSAPI UCSAPI_GetOptionFromACU (
IN UCSAPI_UINT16 ClientID,
IN UCSAPI_UINT32 TerminalID);

Description:
This API obtains the option setting value from the designated ACU.

Parameters:
ClientID , TerminalID: See above

Returns:
UCSAPIERR_NONE
UCSAPIERR_NOT_SERVER_ACTIVE
UCSAPIERR_INVALID_TERMINAL

Callback Parameters:
UCSAPI_CALLBACK_EVENT_GET_ACU_OPTION

Callback Parameters:
wParam:
UCSAPI_CALLBACK_PARAM_0 pCallback0;

lParam:
UCSAPI_ACU_OPTION_PTR pOption;

UCSAPI_SetOptionToACU
Prototype:

Copyright 2009 UNIONCOMMUNITY Co., LTD. 130


UCSAPI_RETURN UCSAPI UCSAPI_SetOptionToACU (
IN UCSAPI_UINT32 ClientID,
IN UCSAPI_UINT32 TerminalID,
IN UCSAPI_ACU_OPTION_FLAG fOption,
IN UCSAPI_ACU_OPTION_PTR pOption);

Description:
This API sets up the option value of the designated ACU.

Parameters:
ClientID , TerminalID: See above
fOption:
The struct of the UCSAPI_ACU_OPTION_FLAG
pOption:
The pointer of the UCSAPI_ACU_OPTION structure
Returns:
UCSAPIERR_NONE
UCSAPIERR_NOT_SERVER_ACTIVE
UCSAPIERR_INVALID_POINTER
UCSAPIERR_INVALID_TERMINAL

Callback:
UCSAPI_CALLBACK_EVENT_SET_ACU_OPTION

wParam
UCSAPI_CALLBACK_PARAM_0_PTR pCallBack0;

lParam:
N/A

UCSAPI_GetLockScheduleFromACU
Prototype:
UCSAPI_RETURN UCSAPI UCSAPI_GetLockScheduleFromACU (
IN UCSAPI_UINT16 ClientID,
IN UCSAPI_UINT32 TerminalID,

Copyright 2009 UNIONCOMMUNITY Co., LTD. 131


IN UCSAPI_UINT8 LockIndex);

Description:
This API obtains the schedule setting value of lock from the designated ACU.
(refer to TerminalOption for schedule.)
Parameters:
ClientID , TerminalID: See above
LockIndex:
The lock Index for get Schedule.(Index base is zero)
Be careful not to exceed the maximum value.
Returns:
UCSAPIERR_NONE
UCSAPIERR_NOT_SERVER_ACTIVE
UCSAPIERR_INVALID_TERMINAL

Callback Parameters:
UCSAPI_CALLBACK_EVENT_GET_ACU_LOCKSCHEDULE

Callback Parameters:
wParam:
UCSAPI_CALLBACK_PARAM_0 pCallback0;
lParam:
UCSAPI_ACU_LOCKSCHEDULE_PTR pLockSchedule;

UCSAPI_SetLockScheduleToACU
Prototype:
UCSAPI_RETURN UCSAPI UCSAPI_SetLockScheduleToACU (
IN UCSAPI_UINT32 ClientID,
IN UCSAPI_UINT32 TerminalID,
IN UCSAPI_UINT8 LockIndex,
IN UCSAPI_TERMINAL_SCHEDULE_PTR pSchedule);
Description:
This API sets up the lock schedule value of the designated ACU.
(refer to TerminalOption for schedule.)
Parameters:

Copyright 2009 UNIONCOMMUNITY Co., LTD. 132


ClientID , TerminalID: See above
LockIndex:
The lock Index for set Schedule.(Index base is zero)
Be careful not to exceed the maximum value.
Returns:
UCSAPIERR_NONE
UCSAPIERR_NOT_SERVER_ACTIVE
UCSAPIERR_INVALID_TERMINAL

Callback Parameters:
UCSAPI_CALLBACK_EVENT_SET_ACU_LOCKSCHEDULE

wParam
UCSAPI_CALLBACK_PARAM_0_PTR pCallBack0;
lParam:
N/A

UCSAPI_SetDoorStatusToACU

Prototype:
UCSAPI_RETURN UCSAPI UCSAPI_SetDoorStatusToACU(
IN UCSAPI_UINT16 ClientID,
IN UCSAPI_UINT32 TerminalID,
IN UCSAPI_UINT8 Status,
IN UCSAPI_UINT8 DoorID);

Description:
This API control ACU door lock to fit the status value

Parameters:
ClientID , TerminalID: See above
Status:
Lock Status (0: temporarily open, 1:start unlock, 2:end unlock, 3:arm, 4:disarm)
DoorID:
Door ID of ACU.

Copyright 2009 UNIONCOMMUNITY Co., LTD. 133


Returns:
UCSAPIERR_NONE
UCSAPIERR_NOT_SERVER_ACTIVE
UCSAPIERR_INVALID_TERMINAL

Callback: 2 event occur continuously.


UCSAPI_CALLBACK_EVENT_OPEN_DOOR
UCSAPI_CALLBACK_EVENT_ACU_STATUS
Callback Parameters:
wParam:
UCSAPI_CALLBACK_PARAM_0_PTR pCallback0;
lParam:
N/A

Copyright 2009 UNIONCOMMUNITY Co., LTD. 134


3.3 Callback Event References
Declaration is made at UCAPI_Type.h, and callback event types are defined.
To n otify
d received
ata f rom t t he t erminal
t a po he S u
pplication
t c f rogram,
T
callback e c vent o t onsists
p response f t o a wo pplication
arts;
p ’s r equesta
rogram r nd f tequest
terminal.

3.3.1 Events for request from terminal


This is event for changing for terminal status.

UCSAPI_CALLBACK_EVENT_CONNECTED
Prototype:
#define UCSAPI_CALLBACK_EVENT_CONNECTED UCSAPI_CALLBACK_EVENT+1

Description:
When t t he i cerminal t t ss onnected
t S m n o he
t e erver,
t t a he DK
program.

UCSAPI_CALLBACK_EVENT_DISCONNECTED
Prototype:
#define UCSAPI_CALLBACK_EVENT_DISCONNECTED UCSAPI_CALLBACK_EVENT+2

Description:
When t t he i erminal
disconnected f rom
s t s he t erver,
S m he
n tDK e odule
t t oti
application program.

UCSAPI_CALLBACK_EVENT_TERMINAL_STATUS
Description:
The S m
DK periodically
odule o i r notifies
mmediately
t s he abouterver
t s he i tatus nform
of the terminal and devices connected to the terminal when the status is changed.

UCSAPI_CALLBACK_EVENT_ACU_STATUS
Description:
The S m
DK periodically
odule o i r notifies
mmediately
t s he abouterver
t s he i tatus nform

Copyright 2009 UNIONCOMMUNITY Co., LTD. 135


of the ACU terminal and devices connected to the ACU terminal when the status is changed.
Callback Parameters:
lParam:
UCSAPI_ACU_STATUS_INFO_PTR

3.3.2 Events of Response for server command


The events of the response according to the command sent to the terminal.

UCSAPI_CALLBACK_EVENT_REALTIME_ACCESS_LOG
Description:
When t t he o erminali S m perates
a t t n implemented
/N ode
u sera nd
uthentication,
he
S erminal
notifies this event to the application program.

UCSAPI_CALLBACK_EVENT_GET_ACCESS_LOG
Description:
In response t t ao he p pplication
’s r equest f a rogram
or uthentication
l s a t ogs
terminal, the SDK module notifies this event to the application program.

UCSAPI_CALLBACK_EVENT_GET_ACCESS_LOG_COUNT
Description:
In response t t a o hep pplication
’s r equestf t n rogram
or o he
a umber l s f a tuthentication
terminal, the SDK module notifies this event to the application program.

UCSAPI_CALLBACK_EVENT_ADD_USER
Description:
In response t t u oa he r ser b t ddition
a p equestt S my he
n pplication
t
event to the application program.

UCSAPI_CALLBACK_EVENT_DELETE_USER
Description:
In response t t u od he r ser b t eletion
a p equestt S my he
n pplication
t
event to the application program.

UCSAPI_CALLBACK_EVENT_DELETE_ALL_USER
Description:

Copyright 2009 UNIONCOMMUNITY Co., LTD. 136


In response t t a uo dhe r ll ser
b t a eletion p equest
t S m y n he t pplication
event to the application program.

UCSAPI_CALLBACK_EVENT_GET_USER_COUNT
Description:
In response t t ao he p pplication
’s r equestf t rogram
nor he
o u umber
s a t f sers
terminal, the SDK module notifies this event to the application program.

UCSAPI_CALLBACK_EVENT_GET_USER_INFO_LIST
Description:
In r esponse
t ot he
a pplication
p ’s r equestfrogram
u l or s ser a t ists
t tored
t S t h
module notifies this event to the application program.

UCSAPI_CALLBACK_EVENT_GET_USER_DATA
Description:
In response t t a o he p pplication
’s r equestf u drogram
or s ser a t ata
t tored
t S t h
module notifies this event to the application program.

UCSAPI_CALLBACK_EVENT_VERIFY_USER_AUTH_INFO
Description:
To o btain
i nformation
( t required
authentication
i n1 s:1 authentication,
erver ype)t het erminal
n otif
this e vent
t t ao he p pplication
T t a rogram.p n hen, t s he pp
the authentication t i ype
t t t nformation
T e i g o heo werminal.
a his v
is implemented at the server, and it is always issued before the next event.
UCSAPI_CALLBACK_EVENT_VERIFY_FINGER_1_TO_1,
UCSAPI_CALLBACK_EVENT_VERIFY_CARD,
UCSAPI_CALLBACK_EVENT_VERIFY_PASSWORD

UCSAPI_CALLBACK_EVENT_VERIFY_FINGER_1_TO_1
Description:
During 1 f :1 authentication,
ingerprint t het erminal
n t e otifies
t t a his p vent o h
Then, t a he pplication
p n t s rogram
the authenticationeeds
r t t o t esults
end T e o i he erm
generated only when authentication is implemented at the server.

Copyright 2009 UNIONCOMMUNITY Co., LTD. 137


UCSAPI_CALLBACK_EVENT_VERIFY_FINGER_1_TO_N
Description:
During 1 f :N aingerprint t t uthentication,
n t e t t he
a erminal
p otifies
Then, t a he pplication
p n t s rogram
the authenticationeeds
r t t o t esults
end T e o i he erm
generated only when authentication is implemented at the server.

UCSAPI_CALLBACK_EVENT_VERIFY_CARD
Description:
During c a ard uthentication,
t t n t e he t t erminal
a p otifies T t his ven
application p n rogram
t s t hea uthenticationr
eeds o end
t t t esults T e o i g
he erminal.
only when authentication is implemented at the server.

UCSAPI_CALLBACK_EVENT_VERIFY_PASSWORD
Description:
During p assword
a t uthentication,
t n t e t het a erminal p otifies
T his
the a pplication
p n trogram
s the authentication
eeds r o t end
t tesults T eo he
i ermin
generated only when authentication is implemented at the server.

UCSAPI_CALLBACK_EVENT_GET_TERMINAL_OPTION
Description:
In response t t t o ohe serminali ption
r b t etting
application pnformation
rogram,t S he equD
module notifies this event to the application program.

UCSAPI_CALLBACK_EVENT_SET_TERMINAL_OPTION
Description:
In response t t t o he
o serminal r b ption
t a etting
p t equest
S m y he
notifies this event to the application program.

UCSAPI_CALLBACK_EVENT_FW_UPGRADING
Description:
In response t t f o he
u irmware
r b t a pgrade p equest
t S m y n he pplicati
this e vent
t t a o hep pplication
I i t e t n rogram.
the upgrade p t s i rogress
he vent
t nformat
o
the application program.

Copyright 2009 UNIONCOMMUNITY Co., LTD. 138


UCSAPI_CALLBACK_EVENT_FW_UPGRADED
Description:
In response t t f o heu irmware
r b t pgrade
a p equest
t S my he p
notifies this event to the application program.

UCSAPI_CALLBACK_EVENT_FW_VERSION
Description:
In response t t f o he
v irmware
r b t a ersion p equest
t S m y n he pplication
this event to the application program.

UCSAPI_CALLBACK_EVENT_USERFILE_UPGRADING
Description:
In response t t u o dhe serfile
r b t ownload
a p equest
t S m y n he pplicati
this e vent
t t a o hep pplication
I i t e t n rogram.
the download pt s iherogressventt nform
o
the application program.

UCSAPI_CALLBACK_EVENT_USERFILE_UPGRADED
Description:
In response t t uo he
d ssefile
r b t ownload
a p equest
t S my he p
notifies this event to the application program.

UCSAPI_CALLBACK_EVENT_OPEN_DOOR
Description:
In response t t t o he d emporary
o r b t oor
a pen
p tequest
S m y he
notifies this event to the application program.

UCSAPI_CALLBACK_EVENT_TERMINAL_CONTROL
Description:
In response t t r o f het equest
c b t ora erminalp t ontrol
S m ny he pplic
this event to the application program.

UCSAPI_CALLBACK_EVENT_PICTURE_LOG
Description:
When t phe l icture
i r ogf st teceived t S romm he
n erminal,
the picture l d og
t t aata op he I application i i rogram.w t t f uthentication

Copyright 2009 UNIONCOMMUNITY Co., LTD. 139


authentication t t picture
ype, l og i he
s s t entt a o hep pplication
a w t rogram
UCSAPI_CALLBACK_EVENT_REALTIME_ACCESS_LOG e B i a vent. ut,
i i f uthentication
w
the s erver
a uthentication
t t t n ype,
t p he l t erminal
t a p
otifies he
separately after receiving the authentication results from the application program.

UCSAPI_CALLBACK_EVENT_ANTIPASSBACK
Description:
In c ase
that the a nti-passback
o i n s t ption
t ns ott e et, t t he a erminal
program t o othe user’s
btain current a nti-passback s d utatusa uring T t ser uth
application p n rogramt immediately
eeds send u o ’s ser
a nti-passback s t t tatus
terminal. This event is generated only when authentication is implemented at the terminal.

UCSAPI_CALLBACK_EVENT_SET_ACCESS_CONTROL_DATA
Description:
In response t t a o r he s ccess
r b ights
t a etting
p t equest
S m ny he ppli
this event to the application program.

UCSAPI_CALLBACK_EVENT_REGIST_FACE
Description:
In response t r fo f egist
t race b rom
t a erminal
p t equest
S m ny he pp
this event to the application program.
Terminal s r tart w egistration
d r o ith
L d isplay
a c egistration
f 3 o 5 t n C
(Regular registration : 5 capture, Quick registration : 3 capture)
Each capture time make event for that with progress. value,
Callback Parameters:
wParam:
UCSAPI_CALLBACK_PARAM_0_PTR
CurrentIndex in progress is increase from 1.
If TotalNumber and CurrentIndex in progress are zero, then registration is canceled.
lParam:
UCSAPI_CALLBACK_PARAM_1_PTR
- DataType : UCSAPI_CALLBACK_DATA_TYPE_FACE_INFO
- Data : UCSAPI_FACE_INFO_PTR
In normal time, lParam is Face data

Copyright 2009 UNIONCOMMUNITY Co., LTD. 140


UCSAPI_CALLBACK_EVENT_GET_TERMINAL_OPTION
Description:
In response t t t o ohe serminali ption
r b t etting
application pnformation
rogram,t S he equD
module notifies this event to the application program.

UCSAPI_CALLBACK_EVENT_SET_TERMINAL_OPTION
Description:
In response t t t o he
o serminal r b ption
t a etting
p t equest
S m y he
notifies this event to the application program.

UCSAPI_CALLBACK_EVENT_GET_ACU_OPTION
Description:
In response to the ACU option information request by the application program,
the SDK module notifies this event to the application program.
Callback Parameters:
wParam: Result for command
UCSAPI_CALLBACK_PARAM_0 pCallback0;
lParam: The address of the Option struct
UCSAPI_ACU_OPTION_PTR pOption;

UCSAPI_CALLBACK_EVENT_SET_ACU_OPTION
Description:
In response t t A oo he s CUr ption
b t a ettingp tequest
S m yn he pplica
this event to the application program.
Callback Parameters:
wParam: Result for command
UCSAPI_CALLBACK_PARAM_0 pCallback0;
lParam: N/A

UCSAPI_CALLBACK_EVENT_GET_ACU_LOCKSCHEDULE
Description:
In response to the ACU lock schedule request by the application program,
Callback Parameters:
wParam: Result for command

Copyright 2009 UNIONCOMMUNITY Co., LTD. 141


UCSAPI_CALLBACK_PARAM_0 pCallback0;
lParam: The address of the LockSchedule struct
UCSAPI_ACU_LOCKSCHEDULE_PTR pSchedule;

UCSAPI_CALLBACK_EVENT_SET_ACU_LOCKSCHEDULE
Description:
In response to the ACU lock schedule setting request by the application program.
Callback Parameters:
wParam: Result for command
UCSAPI_CALLBACK_PARAM_0 pCallback0;
lParam: N/A

UCSAPI_CALLBACK_EVENT_GET_SIREN
Description:
It is response of result for UCSAPI_SendSirenToTerminal (In case when opt value is o.)
Callback Parameters:
wParam: Result Value
UCSAPI_CALLBACK_PARAM_0 pCallback0;
In case when opt value is 0, pCallback0->Progress.TotalNumber is the number of siren data.
lParam:
In case when opt value is 0, it will be UCSAPI_SIREN_CONFIG_PTR

UCSAPI_CALLBACK_EVENT_SET_SIREN
Description:
It is response of the result for UCSAPI_SendSirenToTerminal (In case when opt value is 1.)
Callback Parameters:
wParam: Result value
UCSAPI_CALLBACK_PARAM_0 pCallback0;
lParam: Not use

UCSAPI_CALLBACK_EVENT_SET_SMARTCARD_LAYOUT
Description:
It is response of the result for UCSAPI_SetSmartCardLayoutToTerminal
Callback Parameters:
wParam: Result Value

Copyright 2009 UNIONCOMMUNITY Co., LTD. 142


UCSAPI_CALLBACK_PARAM_0 pCallback0;
lParam: Not use

3.4 Error definitions

Gives definition of error and its value from the error value from SDK
Entire Error value is defined in UCSAPI_Error.h file

3.4.1 Success
Definition used for success in error code.

UCSAPIERR_NONE
Prototype:
#define UCSAPIERR_NONE (0)

Description:
Error value when its succed. By mean that not Error is succeed, but the function.

3.4.2 General error definitions


Definition of general error value
This error value starts with UCSAPIERR_BASE_GENERAL(0)

UCSAPIERR_INVALID_POINTER
Prototype:
#define UCSAPIERR_INVALID_POINTER (0x0001)

Description:
Applied with wrong pointer value..

UCSAPIERR_INVALID_TYPE
Prototype:
#define UCSAPIERR_INVALID_TYPE (0x0002)

Copyright 2009 UNIONCOMMUNITY Co., LTD. 143


Description:
Applied with wrong type value
.

UCSAPIERR_INVALID_PARAMETER
Prototype:
#define UCSAPIERR_INVALID_PARAMETER (0x0003)

Description:
Applied with wrong parameter value.

UCSAPIERR_INVALID_DATA
Prototype:
#define UCSAPIERR_INVALID_DATA (0x0004)

Description:
Applied with wrong data value.

UCSAPIERR_FUNCTION_FAIL
Prototype:
#define UCSAPIERR_FUNCTION_FAIL (0x0005)

Description:
.Occur when internal function error by causing process fail.

UCSAPIERR_NOT_SERVER_ACTIVE
Prototype:
#define UCSAPIERR_NOT_SERVER_ACTIVE (0x0006)

Description:
Server has not started.

UCSAPIERR_INVALID_TERMINAL
Prototype:
#define UCSAPIERR_INVALID_TERMINAL (0x0007)

Copyright 2009 UNIONCOMMUNITY Co., LTD. 144


Description:
Terminal is not connected.

UCSAPIERR_PROCESS_FAIL
Prototype:
#define UCSAPIERR_PROCESS_FAIL (0x0008)

Description:
Failed during processing
.

UCSAPIERR_USER_CANCEL
Prototype:
#define UCSAPIERR_USER_CANCEL (0x0009)

Description:
.Cancel process by a user

UCSAPIERR_UNKNOWN_REASON
Prototype:
#define UCSAPIERR_UNKNOWN_REASON (0x0010)

Description:
Unkown Error

3.4.3 Data size related error definitions


Definition of error value for a data.
This error value starts from UCSAPIERR_BASE_MEMORY (0X0200).

UCSAPIERR_CODE_SIZE
Prototype:
#define UCSAPIERR_CODE_SIZE (0x0201)

Copyright 2009 UNIONCOMMUNITY Co., LTD. 145


Description:
.Eceed value for Access Group Code.

UCSAPIERR_USER_ID_SIZE
Prototype:
#define UCSAPIERR_USER_ID_SIZE (0x0202)

Description:
Eceed value of User ID size

UCSAPIERR_USER_NAME_SIZE
Prototype:
#define UCSAPIERR_USER_NAME_SIZE (0x0203)

Description:
Eceed value of User’s name size.

UCSAPIERR_UNIQUE_ID_SIZE
Prototype:
#define UCSAPIERR_UNIQUE_ID_SIZE (0x0204)

Description:
Eceed value of UNIQUE ID size.
UCSAPIERR_INVALID_SECURITY_LEVEL
Prototype:
#define UCSAPIERR_INVALID_SECURITY_LEVEN (0x0205)

Description:
Eceed value of authentication level range.

UCSAPIERR_PASSWORD_SIZE
Prototype:
#define UCSAPIERR_PASSWORD_SIZE (0x0206)

Copyright 2009 UNIONCOMMUNITY Co., LTD. 146


Description:
Eceed size of password value.

UCSAPIERR_PICTURE_SIZE
Prototype:
#define UCSAPIERR_PICTURE _SIZE (0x0207)

Description:
Eceed value of User’s picture image

UCSAPIERR_INVALID_PICTURE_TYPE
Prototype:
#define UCSAPIERR_INVALID_PICTURE_TYPE (0x0208)

Description:
Does not support user’s picture image.

UCSAPIERR_RFID_SIZE
Prototype:
#define UCSAPIERR_RFID_SIZE (0x0209)

Description:
Eceed value of maximum user card size

UCSAPIERR_MAX_CARD_NUMBER
Prototype:
#define UCSAPIERR_MAX_CARD_NUMBER (0x0211)

Description:
Eceed maximum card number. Five cards are limited per user

UCSAPIERR_MAX_FINGER_NUMBER
Prototype:
#define UCSAPIERR_MAX_FINGER_NUMBER (0x0212)

Copyright 2009 UNIONCOMMUNITY Co., LTD. 147


Description:
Eceed number of fingerprint. Five fingerprint per user.

3.4.4 Authentication related error definitions


Definition of error value realated to verification.
.This error value starts with UCSAPIERR_BASE_AUTHENTICATION (0X0300)
.

UCSAPIERR_INVALID_USER
Prototype:
#define UCSAPIERR_INVALID_USER (0x0301)

Description:
Unregistered User.

UCSAPIERR_UNAUTHORIZED
Prototype:
#define UCSAPIERR_UNAUTHORIZED (0x0302)

Description:
FP, Card, PIN matching fail.

UCSAPIERR_PERMISSION
Prototype:
#define UCSAPIERR_PERMISSION (0x0303)

Description:
No authorization.

UCSAPIERR_FINGER_CAPTURE_FAIL
Prototype:
#define UCSAPIERR_FINGER_CAPTURE_FAIL (0x0304)

Description:

Copyright 2009 UNIONCOMMUNITY Co., LTD. 148


FP capture fail

UCSAPIERR_DUP_AUTHENTICATION
Prototype:
#define UCSAPIERR_DUP_AUTHENTICATION (0x0305)

Description:
Continous vification trial. Design to prevent duplicate meal.

UCSAPIERR_ANTIPASSBACK
Prototype:
#define UCSAPIERR_ANTIPASSBACK (0x0306)

Description:
Failed authentication for anti-passback.

UCSAPIERR_NETWORK
Prototype:
#define UCSAPIERR_NETWORK (0x0307)

Description:
No response from a network server.

UCSAPIERR_SERVER_BUSY
Prototype:
#define UCSAPIERR_SERVER_BUSY (0x0308)

Description:
Authentication can not be done, cause of busy server.

UCSAPIERR_FACE_DETECTION
Prototype:
#define UCSAPIERR_FACE_DETECTION (0x0309)

Description:

Copyright 2009 UNIONCOMMUNITY Co., LTD. 149


Face detection fail.

Copyright 2009 UNIONCOMMUNITY Co., LTD. 150


4. API Reference for COM

Properties and methods to use a COM module, UCSAPICOM.dll, are described in this chapter.

4.1 UCSAPI Object

As t he
m o ain t u bject
U o i se
p CSAPICOM.dll,
t b f o U S t a rovides
o a he
the basic o bject
t o hatv btains
c o Tarious
u S thild o bjects.
m t o se
be declared.

4.1.1 Properties
Various properties of UCSAPI objects are described.

ErrorCode
Prototype:
[ReadOnly] long ErrorCode;

Description:
This p roperty
c t ontains
v o e that
he occurred
alue d ne uring
rrorsm xecuted
a p ethod
setup.
The value of 0 represents success, while all other values represent failure.
Errors t hato ccurredd c uring
o ’s m ethod
hild a p bjectnd s croperty
a be obtained
etupw anith
this value.

ConnectionsOfTerminal
Prototype:
[ReadOnly] long ConnectionsOfTerminal;

Description:

Copyright 2009 UNIONCOMMUNITY Co., LTD. 151


This property contains the value of the number of terminals connected to the server.
This value can be obtained after the GetTerminalCount() method is called.

TerminalUserData
Prototype:
[ReadOnly] VARIANT TerminalUserData;

Description:
This property obtains the interface to obtain the user information from the terminal.
This i nterface
n t b eeds
o ao u e t btained
o u i nd f sed o
EventGetUserInfoList / E c vetGetUserData
e a G allback / vents
GetUserDataFromTerminal m a c R t ethods
I re d alled. f m efer o
details.

ServerUserData
Prototype:
[ReadOnly] VARIANT ServerUserData;

Description:
This property obtains the interface to send user information to the terminal.
This i nterface
n t b oeeds a ou te s btained
u u i nd t b sed
s t t o et
terminal b t efore
A he mddUserToTerminal
i c R t I ethod
d f s alled.
more details.

AccessLogData
Prototype:
[ReadOnly] VARIANT AccessLogData;

Description:
This property obtains the interface to obtain authentication log from the terminal.
This i nterface
n t b eeds
o a o u e t obtaineda nd l f sed t o b
EventGetAccessLog c e o allback
a t G vent mccurred i c Rfter t he

Copyright 2009 UNIONCOMMUNITY Co., LTD. 152


IAccessLogData description for more details.

AccessControlData
Prototype:
[ReadOnly] VARIANT AccessControlData;

Description:
This property obtains the interface to set up access control data with the terminal.
This i nterface
n t b o eeds a uo ineo rder
btained
to s u et the access
p ndr dsed
ightsb t ata efo
SetAccessControlDataToTerminal m i c R t I ethod ds alled.f efer
more details.

TerminalMacAddr
Prototype:
[ReadOnly] LONG TerminalID

Description:
Get the MAC address for the specified terminal(Mac Address return by Hex String)

4.1.2 Methods
Various methods of UCSAPI objects are described.

ServerStart

Prototype:
HRESULT ServerStart(long MaxTerminal, long Port);

Description:
This method initializes UCSAPI SDK and implements server functions.

Parameters:
MaxTerminal:
This p arameter
d t m efinesn ohet aximum
t c b c umberS c i f erminals
s

Copyright 2009 UNIONCOMMUNITY Co., LTD. 153


by a ssigning
i m nternal
c i a emory a tapacity
t m nn dvance
o t I ccording
t
number o c f tonnected e t erminals
m n xceeds
m i i he a aximum t umb
increase the number of connections.

Port :
The c ommunication
p f t c ort Tor d erminal
v i 9 onnection.
I t v i c het efault
terminal’s port value also needs to be changed.

Related Properties
ErrorCode

Callback Event:
EventTerminalConnected(long TerminalID, BSTR TerminalIP);

Event Parameters:
TerminalID:
Terminal ID

TerminalIP:
The character string that contains the terminal’s IP address value

Copyright 2009 UNIONCOMMUNITY Co., LTD. 154


ServerStop

Prototype:
HRESULT ServerStop();

Description:
This method disconnects all connected terminals and stops server functions.

Parameters:
N/A

Related Properties
ErrorCode

Callback Event:
N/A

Event Parameters
N/A

Copyright 2009 UNIONCOMMUNITY Co., LTD. 155


SetTerminalTimezone

Prototype:
HRESULT SetTerminalTimezone(long TerminalID, BSTR TimezoneName);

Description:
Set up standard time from connected terminal.
Terminal w b u ill c e tsing ’s t onnected
imew i ihen
d berminal
t i sT efault,
’s t imea sut nd’s ft ime
erminal
erver
i s
different, Terminal need to be set as local time
Parameters:
TerminalID:
Terminal ID

TimezoneName:
Select modifying Time zone.
Time zone name can be found from under registry.
HKEY_LOCAL_MACHINE\SOFRWARE\Microsoft\Windows NT\CurrentVersion\TimeZones

Related Properties
ErrorCode

Callback Event:
N/A

Event Prameters
N/A

※ GMT
To check standard time, GMT can be a reference
. G MTs f tand
G orM reenwich
t t i G + ean
K m ime,i i 9 hhat e f t MT 9 or
Greenwich time.

Copyright 2009 UNIONCOMMUNITY Co., LTD. 156


※ Time zone Name
Time zone Name can be checked from below Registry.
HKEY_LOCAL_MACHINE\SOFRWARE\Microsoft\Windows NT\CurrentVersion\TimeZones

Copyright 2009 UNIONCOMMUNITY Co., LTD. 157


SetError

Prototype:
HRESULT SetError(long TerminalID, long EventType);

Description:
Using callback event from the terminal and send back error code when its return.

Parameters:
TerminalD:
Terminal ID

EventType:
Getting Type Error value for returing to terminal
. 0 – None
1 – Access Log

For example call GetAccessLogFromTerminal then save Log Data to received database.
If f ail,s etting
E t 1rrorType
i t C E o function.
n C he
allingS allback
wetError
m t vent illr ake e
updated log and send call again when asking next New Log.

Related Properties
ErrorCode

Related Callback Event:


EventGetAccessLogFromTerminal

Event Prameters

Copyright 2009 UNIONCOMMUNITY Co., LTD. 158


GetTerminalCount

Prototype:
HRESULT GetTerminalCount(void);

Description:
This m ethod
o t n btainso t he c umbert t s f T erminals
n c b o onnected
u o
the ConnectionsOfTerminal property.

Parameters:
N/A

Related Properties
ErrorCode, ConnectionsOfTerminal

Callback Event:
N/A

Event Parameters
N/A

Copyright 2009 UNIONCOMMUNITY Co., LTD. 159


GetFirmwareVersionFromTerminal

Prototype:
HRESULT GetFirmwareVersionFromTerminal(long ClientID, long TerminalID);

Description:
This method obtains the firmware version of the designated terminal.

Parameters:
ClientID:
ID of the client that requested a job. (It is used in client/server model development.)

TerminalID:
Terminal ID

Related Properties
ErrorCode

Callback Event:
EventFirmwareVersion(long ClientID, long TerminalID, BSTR Version);

Event Parameters
ClientID:
ID of the client that requested a job. (It is used in client/server model development.)

TerminalID:
Terminal ID

Version:
This parameter contains the firmware version value in the form of a character string.

Copyright 2009 UNIONCOMMUNITY Co., LTD. 160


UpgradeFirmwareToTerminal

Prototype:
HRESULT UpgradeFirmwareToTerminal (long ClientID, long TerminalID, BSTR FilePath);

Description:
This m ethod
u t fpgrades o t designated
he irmware
t erminal.U fp pgrade
he i rogress
i n nform
with the following event.
EventFirmwareUpgrading / EventFirmwareUpgraded

Parameters:
ClientID:
ID of the client that requested a job. (It is used in client/server model development.)

TerminalID:
Terminal ID

FilePath:
This parameter designates the full path of the firmware file with a character string.

Related Properties
ErrorCode

Callback Event:
EventFirmwareUpgrading(long ClientID, long TerminalID, long CurrentIndex, long TotalNumber);
EventFirmwareUpgraded(long ClientID, long TerminalID);

Event Parameters
ClientID:
ID of the client that requested a job. (It is used in client/server model development.)

TerminalID:
Terminal ID

Copyright 2009 UNIONCOMMUNITY Co., LTD. 161


CurrentIndex:
This parameter contains the index value of the data block under transmission.

TotalNumber:
This parameter contains the total number of data blocks to be sent.

SendUserFileToTerminal

Prototype:
HRESULT SendUserFileToTerminal (long ClientID, long TerminalID, LONG FileType, BSTR FilePath);

Description:
This method send user file to terminal

Parameters:
ClientID: see 1.6 Terminology Description
TerminalID: 1.6 Terminology Description
FileType :
Type of file to download.( see UCSAPI_SendUserFileToTerminal)

FilePath:
Full path of the file

Related Properties
ErrorCode

Callback Event:
EventUserFileUpgrading(long ClientID, long TerminalID, long CurrentIndex, long TotalNumber);
EventUserFileUpgraded(long ClientID, long TerminalID);

Event Prameters
ClientID: see 1.6 Terminology Description
TerminalID: 1.6 Terminology Description

CurrentIndex:

Copyright 2009 UNIONCOMMUNITY Co., LTD. 162


This parameter contains the index value of the data block under transmission.

TotalNumber:
This parameter contains the total number of data blocks to be sent.

OpenDoorToTerminal

Prototype:
HRESULE OpenDoorToTerminal(long ClientID, long TerminalID);

Description:
This method temporarily opens the locking device of the designated terminal.

Parameters:
ClientID:
ID of the client that requested a job. (It is used in client/server model development.)

TerminalID:
Terminal ID

Related Properties
ErrorCode

Callback Event:
EventOpenDoor (long ClientID, long TerminalID);

Event Parameters
ClientID:
ID of the client that requested a job. (It is used in client/server model development.)

TerminalID:
Terminal ID

Copyright 2009 UNIONCOMMUNITY Co., LTD. 163


SetDoorStatusToTerminal

Prototype:
HRESULE SetDoorStatusToTerminal(long ClientID, long TerminalID, long Status);

Description:
This method control lock to fit status value

Parameters:
ClientID:
ID of the client that requested a job. (It is used in client/server model development.)

TerminalID:
Terminal ID

Status:
Lock Status (0: temporarily open, 1:start unlock, 2:end unlock)

Related Properties
ErrorCode

Callback Event:
EventOpenDoor (long ClientID, long TerminalID);

Event Parameters
ClientID:
ID of the client that requested a job. (It is used in client/server model development.)

TerminalID:
Terminal ID

Copyright 2009 UNIONCOMMUNITY Co., LTD. 164


SendTerminalControl

Prototype:
HRESULE SendTerminalControl(long ClientID, long TerminalID, long lockStatus, long lockType

Description:
This method control terminal to fit parameter values

Parameters:
ClientID: See above
TerminalID: See above

lockStatus:
Lock Status (0:Unlock, 1:Lock)

lockType:
Lock Type (0:Normal, 1:Global) * Global locking  Shutdown

Related Properties
ErrorCode

Callback Event:
EventTerminalControl (long ClientID, long TerminalID, long lockStatus, long lockType);

Event Prameters
ClientID: See above
TerminalID: See above
lockStatus:
Lock Status (0:Unlock, 1:Lock)

lockType:
Lock Type (0:Normal, 1:Global) * Global locking  Shutdown

Copyright 2009 UNIONCOMMUNITY Co., LTD. 165


SendPrivateMessageToTerminal
Prototype:
HRESULT SendPrivateMessageToTerminal(
LONG ClientID, LONG TerminalID,
LONG Reserved, BSTR TextMessage, short displayTime)

Description:
This method send message for display on terminal LCD.

Parameters:
ClientID: See above
TerminalID: See above
TextMessage :
Text for display.( ref. UCSAPI_SendPrivateMessageToTerminal)
displayTime :
Time(Second value) for display

Related Properties

Callback Event:
EventPrivateMessage(long ClientID, long TerminalID);

Event Prameters

SendPublicMessageToTerminal
Prototype:
HRESULT SendPublicMessageToTerminal(
LONG ClientID, LONG TerminalID, BOOL Show,
BSTR StartDate, BSTR EndDate, BSTR StartTime, BSTR EndTime, BSTR TextMessage)

Description:
This method send public message for display on terminal LCD.
Public message display for setted period and setted time

Parameters:

Copyright 2009 UNIONCOMMUNITY Co., LTD. 166


ClientID: See above
TerminalID: See above
TextMessage :
Public message for display(ref. UCSAPI_SendPublicMessageToTerminal)
StartDate, EndDate :
Period for display(ex : “2012-03-25” or “20120325”)
StartTime, EndTime :
Time for display.(ex : ”08:30” or “0830”)

Related Properties

Callback Event:
EventPublicMessage(long ClientID, long TerminalID);

Event Prameters

SetWiegandFormatToTerminal

Prototype:
HRESULT SetWiegandFormatToTerminal(LONG ClientID, LONG TerminalID, LONG wgdType,
BSTR FilePath);

Description:
To s W
et iegand
I F f n/Out
t t ormat
W F romF c he w erminal.
S a c b c iegand
by Wiegand Tool.

Parameters:
ClientID: See above
TerminalID: See above

wgdType:
Getting Type value for define whether Wiegand In or Out.

FilePath:
Entire directory for Wiegand Format Data File

Copyright 2009 UNIONCOMMUNITY Co., LTD. 167


Related Properties
ErrorCode

Related Callback Event:


EventSetWiegandFormat

Event Prameters

SetDoorStatusToACU
Prototype:
HRESULE SetDoorStatusToTerminal(long ClientID, long TerminalID, long Status, long DoorID);

Description:
This method control ACU door lock to fit status value

Parameters:
ClientID: See above
TerminalID: See above
Status:
Lock Status (0: temporarily open, 1:start unlock, 2:end unlock, 3:arm, 4:disarm)

DoorID:
ACU Door ID to control.

Related Properties
ErrorCode

Callback Event:
EventOpenDoor
EventACUStatus

Copyright 2009 UNIONCOMMUNITY Co., LTD. 168


4.2 IServerUserData Interface

The i nterface
t s the user
o i endnformation
t t t To s heu i erminal. t t to endt ser
AddUserToTerminal m i c a ethod
s u the suser alled
i nformation
rfter p etting elated
A sp roperties.
the user i nformation,
c w transmission
heck w asc
hether ompleted
n b c ormally
t e c yo t hecking
EventAdduserToTerminal event.

4.2.1 Properties

Various properties of the IServerUserData interface are described.

UserID
Prototype:
[WriteOnly] long UserID;

Description:
This p roperty d esignates
t u I v heT v ser c Db d alue. o his al
with numeric data of up to 8 digits.

UniqueID
Prototype:
[WriteOnly] BSTR UniqueID;

Description:
This p roperty
d t esignates
u I ( Ihe w cnique s DT employee
v c b u D)
in p lace
o U ff userIDi or T ser
m dentification.
d s t c b d he iaximum
20bytes.

UserName
Prototype:
[WriteOnly] BSTR UserName;

Description:
This p roperty
d t esignates
u n v w he
c sers Tamem alue
d s t ith harac

Copyright 2009 UNIONCOMMUNITY Co., LTD. 169


can be designated is 16bytes.

AccessGroup
Prototype:
[WriteOnly] BSTR AccessGroup;

Description:
This p roperty
d t esignates
a g c vhe w ccess
c s roup T c odev alue
consists of a 4byte character string.

SecurityLevel
Prototype:
[WriteOnly] long SecurityLevel;

Description:
This p roperty
c s u t an
a et sp hel t uthentication
b u i f a ecurity evel
It can have any of the following values.

1- LOWEST
2- LOWER
3- LOW
4- BELOW_NORMAL
5- NORMAL
6- ABOVE_NORMAL
7- HIGH
8- HIGHER
9- HIGHEST

The default level is 4 for 1:1 authentication and 5 for 1:N authentication.

IsCheckSimilarFinger
Prototype:
[WriteOnly] BOOL IsCheckSimilarFinger;

Description:

Copyright 2009 UNIONCOMMUNITY Co., LTD. 170


When a dding
u ’s f ingerprint
serd t t t ata theo p he
rocess
o whether
erminal,t f c for
o a sheck
imilar
fingerprint or not is designated.
If t his
v i alue
designateds a st rue,
t t he c erminal
i as f hecks e bf c imilar ing
with the fingerprints o a r f u ll Ifegistered
a s imilar
f ingerprint
sers.
i d r s f etected,
Since this f clag s dan u lowa own
j b t tser the
ddition
performance mob b d y ay
he ermin
e
if there are a large number of registered users.

IsAdmin
Prototype:
[WriteOnly] BOOL IsAdmin;

Description:
This p roperty
c d an
a u aesignate
an administrator. For ser
t het serminal
w m t ith1 ore
registered a dministrator,
t u o t t he m sec b f r he t erminal t enu
administrator logon process during entry to the setup menu.

IsIdentify
Prototype:
[WriteOnly] BOOL IsIdentify;

Description:
This property can designate to allow the user to use 1:N fingerprint authentication.

Password
Prototype:
[WriteOnly] BSTR Password;

Description:
In c ase
that the u ser
u t ses
p he
a asswordm t uthentication
p d a etho
password character string. The maximum size of data that can be designated is 8bytes.

FaceNumber
Prototype:
HRESULT FaceNumber([in] long newVal);
Description:

Copyright 2009 UNIONCOMMUNITY Co., LTD. 171


This is the face count that is included in face data.
This is download to terminal for face authentificaion.
This value is in the range of 3 to 10
Related methods:
AddUserToTerminal
Related properties:
FaceData

FaceData
Prototype:
HRESULT FaceData([in] VARIANT newVal);
Description:
This is the face data that is used when face authentication.
This data consists of multiple face information. And FaceNumber notify how many faces in this data.

Related methods:
AddUserToTerminal

Related properties:
FaceNumber

IsFace1toN
Prototype:
HRESULT IsFace1toN([in] BOOL newVal);
Description:
This property can designate to allow the user to use 1:N face authentication.

IsBlacklist
Prototype:
HRESULT IsBlacklist([in] BOOL newVal);
Description:
This property can designate of value for blacklist user

Copyright 2009 UNIONCOMMUNITY Co., LTD. 172


4.2.2 Methods

Various methods of the IServerUserData interface are described.

InitUserData
Prototype:
HRESULT InitUserData()

Description:
Initialize all properties.

Parameters:
None

SetAuthType

Prototype:
HRESULT SetAuthType(BOOL AndOperation, BOOL Finger, BOOL FPCard, BOOL Password,
BOOL Card, BOOL CardID);

Description:
This m ethod
d u esignates
’s a uthenticationt serE a ype. t achc b uuthentication
t
AND or OR combination according to the AndOperation flag.

Parameters:
AndOperation:
This p arameter
d t a esignates
t u o e oa llow t he t se A f o Oach ut
combination.
1i s f et A or
c ND a 0
ombination
f O combination. F orm
nd dore orr etails,
tR U P eferi o
Section 1.6 Terminology Description.

Finger:
This parameter designates to allow the use of fingerprint authentication.

Copyright 2009 UNIONCOMMUNITY Co., LTD. 173


FPCard:
This p arameter
d t a esignates
t u o f o c llowauthentication.
he T sehef f ingerprint
ingerprint
c
uses a method that authenticates by storing the fingerprint information at the smart card.

Password:
This parameter designates to allow the use of password authentication.

Card:
This parameter designates to allow the use of card authentication.

CardID:
This p arameter
d t a esignates
t u o R ao U llowo U he C se d f n FID
u s
the card’s R FIDa a s uthentication
t , b utinstead, t card’s
ool
heR FIDi simplys used a an identifier
s l ike
UserID.
It must be designated using AND combination with other authentication type.

Related methods
AddUserToTerminal, SendAuthInfoToTerminal

Related properties
ErrorCode

Callback Event:
N/A

Event Parameters:
N/A

Copyright 2009 UNIONCOMMUNITY Co., LTD. 174


SetFPSampleData
 Change to AddFingerData
Prototype:
HRESULT SetFPSampleData(BOOL bInitialize, long nSrcFPDataType, long nFPDataSize,
VARIANT FPData1, VARIANT FPData2);

Description:
This m ethod
d theesignates
binary s dtreamo t t ata f ef fhe o emplate
F c f or ach
fingerprint authentication. For more detailed description on the template, refer to UCBioBSP SDK.

Parameters:
bInitialize:
This parameter designates whether to initialize FIR data and produce new data or not.
If t his
v i alue
f the added
s alse,
t emplate
d a a atat the FIR
re d ppended
ata
p roduced
i to ntern
produce o F d ne w sIR t ata d ith I t everal
v i t aemplate
e F d aata. d f his
and new data are produced.
nSrcFPDataType :
The t ype
information o ft the emplate
t b a R o t UCBioAPI_TEMPLATE_TYPE
e dded. eferf orr oelevant
values.
nFPDataSize :
The size data of the template to be added
FPData1:
Template data to be added. (Binary stream data)
FPData2:
The second template data of a finger to be added. (Binary stream data)
Related properties:
ErrorCode
Callback Event:
N/A
Event Parameters:
N/A

AddFingerData
Prototype:

Copyright 2009 UNIONCOMMUNITY Co., LTD. 175


HRESULT AddFingerData(long FingerID, long FPDataType,
VARIANT FPData1, VARIANT FPData2);
Description:
This m ethod
d t esignates
f i a hethe binary
inger s d
nformation
treamo t t ata f end
f he em
finger of FIR converted for fingerprint authentication.
For more detailed description on the template, refer to UCBioBSP SDK.

Parameters:
FingerID :
Finger Infomation(1:Right_Thumb, 10:Left_Little)
FPType :
The type of the template to be added
FPData1:
Template data to be added. (Binary stream data)
FPData2:
The second template data of a finger to be added. (Binary stream data)
Related properties:
ErrorCode
Callback Event:
N/A
Event Parameters:
N/A
SetDuressFinger
Prototype:
HRESULT SetDuressFinger(long FingerID, long Value)
Description:
Set duress finger.
If duress finger input terminal, terminal work normal status.
But terminal trans result 0x21(33) - not zero - to server
Parameters:
FingerID :
Duress finger ID(1:Right_Thumb, 10:Left_Little)
Value :
Is duress finger or not(0:normal finger, 1:duress finger)
Related properties:

Copyright 2009 UNIONCOMMUNITY Co., LTD. 176


ErrorCode

SetCardData

Prototype:
HRESULT SetCardData(BOOL bInitialize, BSTR RFID);

Description:
This method designates RFID data for card authentication.

Parameters:
bInitialize:
This parameter designates whether to initialize RFID data and produce new data or not.
If t hisv i alue
f the sadded
alse,
R d FIDa a ata t the
re RFIDppended
d pata i roduced
o t nte
produce several RFID data.
If this value is true, all existing RFID data are deleted and new data are produced.

RFID :
This p arameter
d t R esignates
v t b a he
w t FID
c alue
s T om e s dded
of data that can be designated is 16bytes.

Related properties:
ErrorCode

Callback Event:
N/A

Event Parameters:
N/A

Copyright 2009 UNIONCOMMUNITY Co., LTD. 177


SetPictureData

Prototype:
HRESULT SetPictureData(long PictureDataLength, BSTR PictureDataType, VARIANT
PictureData);

Description:
This method designates the picture data with binary stream.

Parameters:
PictureDataLength:
This parameter designates the length of picture data.

PictureDataType:
This p arameter
d t t esignates
v o p d he w ype
t c alue s (f ictureo ata
“JPG” is supported.)
It designates the file extension value with the character string.

PictureData:
Picture data to be added. (Binary stream data)

Related properties:
ErrorCode

Callback Event:
N/A

Event Parameters:
N/A

Copyright 2009 UNIONCOMMUNITY Co., LTD. 178


SetAccessDate

Prototype:
HRESULT SetAccessDate(long AccessDateType, long StartYear, long StartMonth, long
StartDay, long EndYear, long EndMonth, long EndDay);

Description:
This m ethod
d t esignates
p a f a he o eriod
the p eriod
notllowed
a llowed
f a or T or
ccess ccess. r
access p deriodc b data an
not u e, sed
allowed
esignated;
a p ccess, and access
eriodr estriction
period. The following values are available.

Parameters:
AccessDateType:
This parameter designates the type of access period data. The following values are available.

0- Not used
1- Period allowed for authentication designated
2- Period not allowed for authentication designated

StartYear / StartMonth / StartDay:


This parameter designates the start date of the access period.

EndYear / EndMonth / EndDay:


This parameter designates the end date of the access period.

Related properties:
ErrorCode

Callback Event:
N/A

Event Parameters:
N/A

Copyright 2009 UNIONCOMMUNITY Co., LTD. 179


AddUserToTerminal

Prototype:
HRESULT AddUserToTerminal(long ClientID, long TerminalID, BOOL IsOverwrite);

Description:
This m ethod
s the userends
i nformation
t t d ot he U esignated
i n t erminal.
b
produced u the user
singi nformation
r p elated
a m broperties
t A nd ethods
method is called.

Parameters:
ClientID:
ID of the client that requested a job. (It is used in client/server model development.)
TerminalID:
Terminal ID
IsOverwrite:
This p arameter
d w esignates
t o a a hether
r uo o n
verwrite
T d v n lready
is 1.
Related properties:
ErrorCode
Callback Event:
EventAddUser
Event Parameters:
ClientID:
ID of the client that requested a job. (It is used in client/server model development.)

TerminalID:
Terminal ID

※ Note
In c ase
o s f m endingn s o fultiple
u ser
d t t ata
umber
t ou het AddUserToTerminal
erminal sing he
method, t E he ventAddUser
c e m b checked
allback
a ftert AddUserToTerminal
he
vent ust m ethod
e
is called. The next user data is sent only after the transmission is processed normally.

Copyright 2009 UNIONCOMMUNITY Co., LTD. 180


Copyright 2009 UNIONCOMMUNITY Co., LTD. 181
4.3 ITerminalUserData Interface

The i nterface
r t t elated
’s u seri o nformation
erminal
m a g anagement
f T i n nd t b et unctio
obtained a u ndin o rderto
sed o btaino d r t elete
n o uhe u umber
i f se
list, and user data.

4.3.1 Properties

Various properties of the ITerminalUserData interface are described.

CurrentIndex / TotalNumber
Prototype:
[ReadOnly] long CurrentIndex;
[ReadOnly] long TotalNumber;

Description:
In c ase
o o f mbtainingn o uultiple
i umbers
l t p fc ser t t nformation
number o l fa tists i ndo t he
c ndex
r I cf bhe o urrent
a t ecord.
GetUserInfoListFromTerminal method is called.

Related methods:
GetUserInfoListFromTerminal,

UserID
Prototype:
[ReadOnly] long UserID;

Description:
This property contains the user ID value.
It c anb o e abtained
G fter etUserInfoListFromTerminal
/ G m a
called.

Related methods:
GetUserInfoListFromTerminal, GetUserDataFromTerminal

Copyright 2009 UNIONCOMMUNITY Co., LTD. 182


UniqueID
Prototype:
[ReadOnly] BSTR UniqueID;

Description:
This property contains the unique ID value (employee ID).
It c anb o e abtained
G fter etUserInfoListFromTerminal
/ G m a
called.

Related methods:
GetUserInfoListFromTerminal, GetUserDataFromTerminal

UserName
Prototype:
[ReadOnly] BSTR UserName;

Description:
This property contains the user name value.
It c anb o e abtained
G fter etUserInfoListFromTerminal
/ G m a
called.

Related methods:
GetUserInfoListFromTerminal, GetUserDataFromTerminal

AccessGroup
Prototype:
[ReadOnly] BSTR AccessGroup;

Description:
This property contains the access group code value.
It c anb o e abtained
G fter etUserInfoListFromTerminal
/ G m a
called.

Copyright 2009 UNIONCOMMUNITY Co., LTD. 183


Related methods:
GetUserInfoListFromTerminal, GetUserDataFromTerminal

IsAdmin
Prototype:
[ReadOnly] BOOL IsAdmin;

Description:
This property contains the flag value on whether the user is an administrator or not.
It c anb o e abtained
G fter etUserInfoListFromTerminal
/ G m a
called.

Related methods:
GetUserInfoListFromTerminal, GetUserDataFromTerminal

IsIdentify
Prototype:
[ReadOnly] BOOL IsIdentify;

Description:
This property contains the flag value on whether 1:N fingerprint authentication is allowed or not.
It c anb o e abtained
G fter etUserInfoListFromTerminal
/ G m a
called.

Related methods:
GetUserInfoListFromTerminal, GetUserDataFromTerminal

Related properties:
IsFinger, TotalFingerCount, FingerID, FPSampleDataLength, SampleNumber, FPSampleData,
SecurityLevel

AccessDateType
Prototype:
[ReadOnly] long AccessDateType;

Copyright 2009 UNIONCOMMUNITY Co., LTD. 184


Description:
This property contains the type value of access period data. The following values are available.
It can be obtained after the GetUserDataFromTerminal method is called.

0- Not used
1- Period allowed for authentication designated
2- Period not allowed for authentication designated

Related methods:
GetUserDataFromTerminal

Related properties:
StartAccessDate, EndAccessDate

StartAccessDate/EndAccessDate
Prototype:
[ReadOnly] BSTR StartAccessDate;

[ReadOnly] BSTR EndAccessDate;

Description:
This property contains the start/end date of access period.
The data format is yyyy-MM-dd.
It c anb o e abtained
G fter etUserInfoListFromTerminal
/ G m a
called.

Related methods:
GetUserDataFromTerminal

Related Properties:
AccessDateType

SecurityLevel
Prototype:
[ReadOnly] long SecurityLevel;

Copyright 2009 UNIONCOMMUNITY Co., LTD. 185


Description:
This property contains the authentication security level to be used in fingerprint authentication.
It can be obtained after the GetUserDataFromTerminal method is called.
The following values are available.

1- LOWEST
2- LOWER
3- LOW
4- BELOW_NORMAL
5- NORMAL
6- ABOVE_NORMAL
7- HIGH
8- HIGHER
9- HIGHEST

The default value is 4 for 1:1 authentication and 5 for 1:N authentication.

Related methods:
GetUserDataFromTerminal

Related properties:
IsFinger, TotalFingerCount, FingerID, FPSampleDataLength, SampleNumber, FPSampleData

IsAndOperation
Prototype:
[ReadOnly] BOOL IsAndOperation;

Description:
This p roperty
c t ontains
f v o he t lag
A alue
c no t he ND
authentication t ype.T v his a alue
t u o fllows c he, a ndpse assword
f a ingerprint, t uthentication
ard
through A o O ND
c r FR m ombination.
d r t U P or i S ore 1 Tetails, efer
Description.
It c anb o e abtained
G fter etUserInfoListFromTerminal
/ G m a
called.

Copyright 2009 UNIONCOMMUNITY Co., LTD. 186


Related methods:
GetUserDataFromTerminal

Related properties:
IsFinger, IsFPCard, IsCard, IsPassword

IsFinger
Prototype:
[ReadOnly] BOOL IsFinger;

Description:
This property contains the flag value that allows user’s fingerprint authentication.
It c anb o e abtained
G fter etUserInfoListFromTerminal
/ G m a
called.

Related methods:
GetUserInfoListFromTerminal, GetUserDataFromTerminal

Related properties:
IsAndOperation, TotalFingerCount, FingerID, FPSampleDataLength, SampleNumber,
FPSampleData, SecurityLevel

IsFPCard
Prototype:
[ReadOnly] BOOL IsFPCard;

Description:
This property contains the flag value that allows user’s fingerprint card authentication.
It c anb o e abtained
G fter etUserInfoListFromTerminal
/ G m a
called.

Related methods:
GetUserInfoListFromTerminal, GetUserDataFromTerminal

Copyright 2009 UNIONCOMMUNITY Co., LTD. 187


Related properties:
IsAndOperation

IsCard
Prototype:
[ReadOnly] BOOL IsCard;

Description:
This property contains the flag value that allows user’s card authentication.
It c anb o e abtained
G fter etUserInfoListFromTerminal
/ G m a
called.

Related methods:
GetUserInfoListFromTerminal, GetUserDataFromTerminal

Related properties:
IsAndOperation, CardNumber, RFID

IsCardID
Prototype:
[ReadOnly] BOOL IsCardID;

Description:
This property c ontainst f v he o wlag Calue u ’s R n FIDi uhether
sa I sed
f u ard
i s D ser or ser
or not.
CardID d n oes
u the card’s
ot R FID
se a a s uthentication
t , b ut instead, t card’s
ool
heR FIDi simply
s
used a an sidentifier l U ike I m serID.
b d t u ust A ce esignated
w o sing
authentication type.
It c anb o e abtained
G fter etUserInfoListFromTerminal
/ G m a
called.

Related methods:
GetUserInfoListFromTerminal, GetUserDataFromTerminal

Related properties:

Copyright 2009 UNIONCOMMUNITY Co., LTD. 188


IsAndOperation

IsPassword
Prototype:
[ReadOnly] BOOL IsPassword;

Description:
This property contains the flag value that allows password authentication.
It c anb o e abtained
G fter etUserInfoListFromTerminal
/ G m a
called.

Related methods:
GetUserInfoListFromTerminal, GetUserDataFromTerminal

Related properties:
IsAndOperation, Password

Password
Prototype:
[ReadOnly] BSTR Password;

Description:
This p roperty
c t p ontains v i the f assword
o a character s alue
T tring.
m n he
s heo orm aximum
data that can be designated is 8bytes.
It can be obtained after the GetUserDataFromTerminal method is called.

Related methods:
GetUserDataFromTerminal

Related properties:
IsPassword

CardNumber
Prototype:
[ReadOnly] long CardNumber;

Copyright 2009 UNIONCOMMUNITY Co., LTD. 189


Description:
In c ase
that the u u
ser t cses authentication
he ard
m ethod,t p his c roperty
t v o t ontains
number of registered RFIDs.
It can be obtained after the GetUserDataFromTerminal method is called.

Related methods:
GetUserDataFromTerminal

Related properties:
IsCard, RFID

RFID
Prototype:
[ReadOnly] BSTR RFID(long nIndex);

Description:
In c ase
that the u user t cses a he ard
m uthentication
t p c t d ethod,
v o his
registered RFID.
It can be obtained after the GetUserDataFromTerminal method is called.

Parameters:
nIndex
The index number of RFID to be obtained

Related methods:
GetUserDataFromTerminal

Related properties:
IsCard, CardNumber

PictureDataLength
Prototype:
[ReadOnly] long PictureDataLength;

Copyright 2009 UNIONCOMMUNITY Co., LTD. 190


Description:
This property contains the size value of picture data.
It can be obtained after the GetUserDataFromTerminal method is called.

Related methods:
GetUserDataFromTerminal

Related properties:
PictureData

PictureData
Prototype:
[ReadOnly] VARIANT PictureData;

Description:
This p roperty
c t p ontains
d v i het f icture
o a binary s ata tream.
Thealue
l ength
v n o he
dalue orm f
is contained in the PictureDataLength property.
It c anb o e abtained
G fter etUserInfoListFromTerminal
/ G m a
called.

Related methods:
GetUserDataFromTerminal

Related properties:
PictureDataLength

TotalFingerCount
Prototype:
[ReadOnly] long TotalFingerCount;

Description:
This property contains the total number of fingers of converted FIR.
It can be obtained after the GetUserDataFromTerminal method is called.

Related methods:

Copyright 2009 UNIONCOMMUNITY Co., LTD. 191


GetUserDataFromTerminal

Related properties:
IsFinger, FingerID, FPSampleDataLength, SampleNumber, FPSampleData

FingerID
Prototype:
[ReadOnly] long FingerID(long nIndex);

Description:
This p roperty
c t ontains
f I i he oinger
c DF i nformation
t f o f
an array.
nIndex can have a value between 0 and (TotalFingerCount-1).
It can be obtained after the GetUserDataFromTerminal method is called.

Related methods:
GetUserDataFromTerminal

Related properties:
IsFinger,TotalFingerCount, FPSampleDataLength, SampleNumber, FPSampleData

SampleNumber
Prototype:
[ReadOnly] long SampleNumber;

Description:
This p roperty
c t n ontains o t he f e umber
f o c f emplates
F I c t or ach
value of 1 or 2.
It can be obtained after the GetUserDataFromTerminal method is called.

Related methods:
GetUserDataFromTerminal

Related properties:

Copyright 2009 UNIONCOMMUNITY Co., LTD. 192


IsFinger, TotalFingerCount, FingerID, FPSampleDataLength, FPSampleData

FPSampleData
Prototype:
[ReadOnly] VARIANT FPSampleData(long nFigerID, long nSampleNum);

Description:
This property contains template’s binary stream data for each finger of converted FIR.
nFingerID and SampleNum can be obtained using the FingerID and SampleNumber property.
The length value of binary stream data can be obtained using the FPSampleDataLength property.
It can be obtained after the GetUserDataFromTerminal method is called.

Parameters:
nFingerID:
Finger ID number to be obtained

nSampleNum:
Sample number to be obtained. The value of 0 or 1 is used.

Related methods:
GetUserDataFromTerminal

Related properties:
IsFinger, TotalFingerCount, FingerID, FPSampleDataLength, SampleNumber

FaceNumber
Prototype:
HRESULT FaceNumber([out, retval] long *pVal);
Description:
This property contains count of face in FaceData(min 3, max 10)
Related methods:
GetUserDataFromTerminal
Related properties:
FaceData

Copyright 2009 UNIONCOMMUNITY Co., LTD. 193


FaceData
Prototype:
HRESULT FaceData([out, retval] VARIANT *pVal);

Description:
This property contains template’s binary stream data for each face data
Each face data is composed 4bytes length and nbytes binary data.

Related methods:
GetUserDataFromTerminal

Related properties:
FaceNumber

IsBlacklist
Prototype:
[ReadOnly] BOOL IsBlacklist;

Description:
This property contains the flag of blacklist user.
It c anb o e abtained
G fter etUserInfoListFromTerminal
/ G m a
called.

Related methods:
GetUserInfoListFromTerminal, GetUserDataFromTerminal

Related properties:

Copyright 2009 UNIONCOMMUNITY Co., LTD. 194


4.3.2 Methods

Various methods of the ITerminalUserData interface are described.

GetUserCountFromTerminal

Prototype:
HRESULT GetUserCountFromTerminal(long ClientID, long TerminalID);

Description:
This method obtains the total number of registered users from the designated terminal.

Parameters:
ClientID:
ID of the client that requested a job. (It is used in client/server model development.)

TerminalID:
Terminal ID

Related Properties
ErrorCode

Callback Event:
EventGetUserCount

Event Parameters:
ClientID:
ID of the client that requested a job. (It is used in client/server model development.)

TerminalID:
Terminal ID

AdminNumber:
The number of registered administrators

Copyright 2009 UNIONCOMMUNITY Co., LTD. 195


UserNumber:
The number of registered users

Copyright 2009 UNIONCOMMUNITY Co., LTD. 196


GetUserDataFromTerminal

Prototype:
HRESULT GetUserDataFromTerminal(long ClientID, long TerminalID, long UserID);

Description:
This method obtains the user data from the designated terminal.

Parameters:
ClientID:
ID of the client that requested a job. (It is used in client/server model development.)

TerminalID:
Terminal ID

UserID:
User ID

Related Properties
ErrorCode, UserID, UserName, UniqueID, AccessGroup, AccessDateType, StartAccessDate,
EndAccessDate, IsAdmin, IsIdentify, IsAndOperation, IsFinger, IsFPCard, IsCard, IsPassword,
IsCardID, Password, CardNumber, RFID, SecurityLevel, TotalFingerCount, FingerID,
FPSampleDataLength, SampleNumber, FPSampleData, PictureDataLength, PictureData

Callback Event:
EventGetUserData

Event Parameters:
ClientID:
ID of the client that requested a job. (It is used in client/server model development.)

TerminalID:
Terminal ID

Copyright 2009 UNIONCOMMUNITY Co., LTD. 197


DeleteUserFromTerminal

Prototype:
HRESULT DeleteUserFromTerminal(long ClientID, long TerminalID, long UserID);

Description:
This method deletes the user data from the designated terminal.

Parameters:
ClientID:
ID of the client that requested a job. (It is used in client/server model development.)

TerminalID:
Terminal ID

UserID:
User ID

Related Properties
ErrorCode

Callback Event:
EventDeleteUser

Event Parameters:
ClientID:
ID of the client that requested a job. (It is used in client/server model development.)

TerminalID:
Terminal ID

UserID:
User ID

Copyright 2009 UNIONCOMMUNITY Co., LTD. 198


DeleteAllUserFromTerminal

Prototype:
HRESULT DeleteAllUserFromTerminal(long ClientID, long TerminalID);

Description:
This method deletes all user data from the designated terminal.

Parameters:
ClientID:
ID of the client that requested a job. (It is used in client/server model development.)

TerminalID:
Terminal ID

Related Properties
ErrorCode

Callback Event:
EventDeleteAllUser

Event Parameters:
ClientID:
ID of the client that requested a job. (It is used in client/server model development.)

TerminalID:
Terminal ID

RegistFaceFromTerminal

Prototype:
HRESULT RegistFaceFromTerminal (long ClinetID, long TerminalID, long Opt);

Description:

Copyright 2009 UNIONCOMMUNITY Co., LTD. 199


This method get regist face data from terminal.

Parameters:
ClientID:
ID of the client that requested a job. (It is used in client/server model development.)
TerminalID:
Terminal ID
Opt :
This is command opotion(0:Start, 1:cancel)

Related Properties
ErrorCode

Callback Event:
EventRegistFace

Copyright 2009 UNIONCOMMUNITY Co., LTD. 200


4.4 IAccessLogData Interface

The i nterfacer t elated


t a o he
l g uthentication
f o t t og et
This interface is required to obtain the authentication log of the terminal.

4.4.1 Properties

Various properties of the IAccessLogData interface are described.

CurrentIndex / TotalNumber
Prototype:
[ReadOnly] long CurrentIndex;
[ReadOnly] long TotalNumber;

Description:
In c ase
o o f s btaining
n o l everal
r t umbers
p c ft og
t n ecords,o his
records and the index of the current record.
It can be obtained after GetAccessLogFromTerminal methods are called.

Related methods:
GetAccessLogFromTerminal

UserID
Prototype:
[ReadOnly] long UserID;

Description:
This property contains the user ID value.
It can be obtained after the GetAccessLogFromTerminal method is called.

Related methods:
GetAccessLogFromTerminal

Copyright 2009 UNIONCOMMUNITY Co., LTD. 201


AuthType
Prototype:
[ReadOnly] long AuthType;

Description:
This property contains the authentication type value. The following values are available.

0- 1:N fingerprint authenticaiton


1- 1:1 fingerprint authenticaiton
2- Fingerprint and card authentication
3- Card authentication
4- Password authentication
It can be obtained after the GetAccessLogFromTerminal method is called.

Related methods:
GetAccessLogFromTerminal

AuthMode
Prototype:
[ReadOnly] long AuthMode;

Description:
This property contains the authentication mode value. The following values are available.

0- Office start
1- Office leave
2- General (General access)
3- Work outside
4- Return to office
It can be obtained after the GetAccessLogFromTerminal method is called.

Related methods:
GetAccessLogFromTerminal

Copyright 2009 UNIONCOMMUNITY Co., LTD. 202


DateTime
Prototype:
[ReadOnly] BSTR DateTime;

Description:
This property contains the authentication time data in the form of a character string.
The data format is “yyyy-MM-dd hh:mm:ss”.
It can be obtained after the GetAccessLogFromTerminal method is called.

Related methods:
GetAccessLogFromTerminal

IsAuthorized
Prototype:
[ReadOnly] BOOL IsAuthorized;

Description:
This p roperty
c t a ontains r hev Tuthentication
v i 0f a esult
s a alue.
1 his
for failure.
It can be obtained after the GetAccessLogFromTerminal method is called.

Related methods:
GetAccessLogFromTerminal

RFID
Prototype:
[ReadOnly] BSTR RFID;

Description:
In c ase
t a he uthentication
t i c t p ype
c st R
ard, v his
i t f roperty
o o
a character string.
It can be obtained after the GetAccessLogFromTerminal method is called.

Related methods:

Copyright 2009 UNIONCOMMUNITY Co., LTD. 203


GetAccessLogFromTerminal

PictureDataLength
Prototype:
[ReadOnly] long PictureDataLength;

Description:
This property contains the size value of picture data.
It can be obtained after the GetAccessLogFromTerminal method is called.

Related methods:
GetAccessLogFromTerminal

Related properties:
PictureData

PictureData
Prototype:
[ReadOnly] VARIANT PictureData;

Description:
This p roperty
c p ontains
d i t f icture
o a binary s ata tream.
The nP ictureDataLength
he orm p f
contains the length value of data.
It can be obtained after the GetAccessLogFromTerminal method is called.

Related methods:
GetAccessLogFromTerminal

Related properties:
PictureDataLength

Copyright 2009 UNIONCOMMUNITY Co., LTD. 204


4.4.2 Methods

Various methods of the IAccessLogData interface are described.

SetPeriod
Prototype:
HRESULT SetPeriod(long StartYear, long StartMonth, long StartDay,
long EndYear, long EndMonth, long EndDay);

Description:

Period i nformation
i s i c u sw et t gn a ase ser
r i ants f o a l et uthentica
period.
This M ethodi G s etAccessLogCountFromTerminal,
G M e
When calling, it is used in case of LogType = 3.

Parameters:
StartYear/StartMonth/StartDay:
Specify the start date.

EndYear/EndMonth/EndDay:
Specify the end date.

Related properties
ErrorCode

Callback Event:
N/A

Event Parameters:
N/A

Copyright 2009 UNIONCOMMUNITY Co., LTD. 205


GetAccessLogCountFromTerminal
Prototype:
HRESULT GetAccessLogCountFromTerminal(long ClientID, long TerminalID, long LogType);

Description:
This method obtains the number of authentication logs stored at the designated terminal.

Parameters:
ClientID:
ID of the client that requested a job. (It is used in client/server model development.)

TerminalID:
Terminal ID

LogType:
This parameter designates the type of the log to obtain. The following values are available.

0- New log
1- Log already sent to the server
2- All stored logs
3- Period logs

If LogType = 3, firstly set period information using SetPeriod method.

Related properties
ErrorCode

Callback Event:
EventGetAccessLogCount

Event Parameters:
ClientID:
ID of the client that requested a job. (It is used in client/server model development.)

TerminalID:

Copyright 2009 UNIONCOMMUNITY Co., LTD. 206


Terminal ID

LogCount:
The number of authentication logs

Copyright 2009 UNIONCOMMUNITY Co., LTD. 207


GetAccessLogFromTerminal

Prototype:
HRESULT GetAccessLogFromTerminal(long ClientID, long TerminalID, long LogType);

Description:
This method obtains the authentication log stored at the designated terminal.

Parameters:
ClientID:
ID of the client that requested a job. (It is used in client/server model development.)

TerminalID:
Terminal ID

LogType:
This parameter designates the type the log to obtain. The following values are available.

0- New log
1- Log already sent to the server
2- All stored logs
3- Period Log

If LogType = 3, firstly set period information using SetPeriod method.

Related Properties
ErrorCode, TotalNumber, CurrentIndex, UserID, DateTime, AuthType, AuthMode,
IsAuthorized, RFID, PictureDataLength, PictureData

Callback Event:
EventGetAccessLog

Event Parameters:
ClientID:

Copyright 2009 UNIONCOMMUNITY Co., LTD. 208


ID of the client that requested a job. (It is used in client/server model development.)

TerminalID:
Terminal ID

Copyright 2009 UNIONCOMMUNITY Co., LTD. 209


4.5 IAccessControlData Interface

The i nterface
t t a o c ransmitd t t ccess
t T ontrol
i n ata
t b l o ahe u erminal.
t
set up access control information with the terminal.

4.5.1 Properties

Various properties of IAccessControlData interface are described.

Copyright 2009 UNIONCOMMUNITY Co., LTD. 210


4.5.2 Methods

Various methods of IAccessControlData interface are described.

InitData

Prototype:
HRESULT InitData(void);

Description:
This method designates whether to initialize access control data and create new data or not.

Parameters:
N/A

Related properties
ErrorCode

Callback Event:
N/A

Event Parameters:
N/A

Copyright 2009 UNIONCOMMUNITY Co., LTD. 211


SetTimeZone

Prototype:
HRESULT SetTimeZone(BSTR Code, long nIndex, long StartHour, long StartMinute,
long EndHour, long EndMinute);

Description:
This method adds a time zone during a day allowed for authentication.
Up t 1 o t 28z cime c bonea aodesu t 1 an
t z e c dded,
b a t ands tp o 2
zone code. SDK contains the added information in the form of an array.

Parameters:
Code:
As t he
i dentification
c v o t t odez t alue
b s u ft phe imei a f one
4 o e
character string.

nIndex:
Index on time zone information. This value can have a value between 0 and 11.

StartHour / StartMinute:
This parameter designates the start time of the time zone.

EndHour / EndMinute:
This parameter designates the end time of the time zone.

Related methods
SetAccessControlDataToTerminal

Related properties
ErrorCode

Callback Event:
N/A

Copyright 2009 UNIONCOMMUNITY Co., LTD. 212


Event Parameters:
N/A

Copyright 2009 UNIONCOMMUNITY Co., LTD. 213


SetAccessTime

Prototype:
HRESULT SetAccessTime(BSTR Code, BSTR Sun, BSTR Mon, BSTR Tue, BSTR
Wed, BSTR Thu, BSTR, Fri, BSTR Sat, BSTR Hol, BSTR Holiday);

Description:
This method adds an allowed access time for each day of the week.
Up t 1 o a 28 a llowed
t c c ccess
b a aime S c odes the added
an i e nformation
dded,
i t nd
form of an array.

Parameters:
Code:
As t he
i dentification
c v o t a ode a alue
t t b fs uhe t pllowed i a f ccess im
4byte character string.

Sun/Mon/Tue/Wed/Thu/Fri/Sat/Hol:
These p arameters
d t a esignate
a t z he
c f llowed
e d o t ccess
w t b uime one
during authentication and the allowed access time zone code to be applied to holidays.

Holiday:
This p arameterd t esignates
h c t he
w s oliday
u a t S ode mhat as
The time zone of the Hol code is applied to the designated holiday code.

Related methods
SetAccessControlDataToTerminal

Related properties
ErrorCode

Callback Event:
N/A

Event Parameters:

Copyright 2009 UNIONCOMMUNITY Co., LTD. 214


N/A

Copyright 2009 UNIONCOMMUNITY Co., LTD. 215


SetHoliday

Prototype:
HRESULT SetHoliday(BSTR Code, long nIndex, long Month, long Day);

Description:
This method adds holiday information.
Up t 6 o h 4 c oliday
c b a odes
a u t an
3 h e c dded,
b a t ands hp oc 2 oliday
SDK contains added information in the form of an array.

Parameters:
Code:
As t he
i dentification
c v o t h ode t b salue
u t pf he i a oliday
f 4 c o e et
string.

nIndex:
Index value of the holiday to be added. This value can have a number between 0 and 63.

Month / Day:
This parameter designates the date for the holiday.

Related methods
SetAccessControlDataToTerminal

Related properties
ErrorCode

Callback Event:
N/A

Event Parameters:
N/A

Copyright 2009 UNIONCOMMUNITY Co., LTD. 216


SetAccessGroup

Prototype:
HRESULT SetAccessGroup(BSTR Code, long nIndex, BSTR AccessTime);

Description:
This method adds access group information.
Up t 1 o a 28 g ccess
c c b roup
a a odes
u t 4a an a e t dded,
c c b nd
a p o
to a s ingle
a g ccessc S roup
c aode. i DK i ontains
t f o dded
an array.

Parameters:
Code:
As t he
i dentification
c v o t a ode g alue
t b s uf t hep ccessi a f 4roup o
character string.

nIndex:
The i ndex
v o t alue
a af he
t c llowed
t b a ccess
T v cimeh a ode
n o e
between 0 and 3.

AccessTime:
This parameter designates the allowed access time code to be used at the access group.

Related methods
SetAccessControlDataToTerminal

Related properties
ErrorCode

Callback Event:
N/A

Event Parameters:
N/A

Copyright 2009 UNIONCOMMUNITY Co., LTD. 217


Copyright 2009 UNIONCOMMUNITY Co., LTD. 218
SetAccessControlDataToTerminal

Prototype:
HRESULT SetAccessControlDataToTerminal(long ClientID, long TerminalID, long DataType);

Description:
This m ethod
s to t he
ends
d esignated
t t accesserminal
c ontrol
d a he b ata
S dded y
SetAccessTime, S S etHoliday, a S etAccessTime
m . T ime z nd
aone, t etAccessGroup
ccess
holiday a a ndg ccess
i n roupt b s nformation
s A c eedi o i eu ent e
at the t erminald a uring I uthentication.
c s a c i n ase i n tored
a t ccess
terminal does not implement access control.

Parameters:
ClientID:
ID of the client that requested a job (It is used in client/server model development.)

TerminalID:
Terminal ID

DataType:
This p arameter
d a esignates
c d t b s ccess
t t t ontrol T f ata v oa e ent
available.

0- Time zone information


1- Holiday information
2- Allowed access time information
3- Access group information

Related methods
SetTimeZone, SetHoliday, SetAccessTime, SetAccessGroup

Related properties
ErrorCode

Copyright 2009 UNIONCOMMUNITY Co., LTD. 219


Callback Event:
HRESULT EventSetAccessControlData(long ClientID, long TerminalID, long DataType);

Event Parameters:
ClientID:
ID of the client that requested a job (It is used in client/server model development.)

TerminalID:
Terminal ID

DataType:
The type value of access control data

Copyright 2009 UNIONCOMMUNITY Co., LTD. 220


4.6 IServerAuthentication Interface

The i nterface
t i so mplement
a T a erver p uthentication.
r t i t rhe t pplication
the user authentication request from the terminal.

4.6.1 Properties

Various properties of the IServerAuthentication interface are described.

DeviceID
Prototype:
[ReadOnly] long DeviceID;

Description:
This is Input Device ID.
You can use this propety after events about server authentication.

Related Events:
EventAuthTypeWithUserID
EventAuthTypeWithUniqueID
EventVerifyCard
EventVerifyFinger1to1
EventVerifyFinger1toN
EventVerifyPassword

Copyright 2009 UNIONCOMMUNITY Co., LTD. 221


4.6.2 Methods

Various methods of the IServerAuthentication interface are described.

SetAuthType

Prototype:
HRESULT SetAuthType(BOOL AndOperation, BOOL Finger, BOOL FPCard, BOOL Password,
BOOL Card, BOOL CardID);

Description:
This m ethod
d theesignates
user’s a uthenticationt E a ype. t ach
c b uuthentication
t
AND o O r combination
R a ccording t t A o he f ndOperation
I m b u b lag.
t t
SendAuthInfoToTerminal method is called.

Parameters:
AndOperation:
If t hisv i alue
t a s rue, w uthentication
A c i a ithI t vND i f ombination
authentication with OR combination is allowed.

Finger:
This parameter designates to allow the use of fingerprint authentication.

FPCard:
This p arameter
d t a esignates
t u o f o c llowauthentication.
he T sehef f ingerprint
ingerprint
c
uses the method that authenticates by storing the fingerprint information at the smart card.

Password:
This parameter designates to allow the use of password authentication.

Card:
This parameter designates to allow the use of card authentication.

CardID:

Copyright 2009 UNIONCOMMUNITY Co., LTD. 222


This p arameter
d t a esignates
t u o R ao U llowo U he C se d f n FID
u s
card’s R FIDa a s uthentication
t b instead, t card’s
ool,
heR FIDi ut
simply
s used a an identifier
s l ike
UserID.
It must be designated using AND combination with other authentication type.

Related methods
SendAuthInfoToTerminal

Related properties
ErrorCode

Callback Event:
N/A

Event Parameters:
N/A

Copyright 2009 UNIONCOMMUNITY Co., LTD. 223


SendAuthInfoToTerminal

Prototype:
HRESULT SendAuthInfoToTerminal(long TerminalID, long UserID, BOOL
IsAccessibility, long ErrorCode);

Description:
When t t he o erminal i s aperates m n t erver
a uthentication
p n t o
immediately s u ’s end
a uthentication
ser information t o t he
t erminal
i r t nt esponse
EventAuthTypeWithUserID/EventAuthTypeWithUniqueID e I m b u a t S
method is called.

Parameters:
TerminalID:
Terminal ID

UserID:
ID of the user who attempted authentication

IsAccessibility:
This p arameter
d t f esignates
v o w t he u hlag a alue
r o nn I t hether
v i he
false, authentication fails at the terminal.

Related Properties
ErrorCode

Callback Event:
N/A

Event Parameters
N/A

Copyright 2009 UNIONCOMMUNITY Co., LTD. 224


SendAuthResultToTerminal

Prototype:
HRESULT SendAuthResultToTerminal(long TerminalID, long UserID, BOOL
IsAccessibility, BOOL IsVisitor, BOOL IsAuthorized, BSTR AuthorizedTime, long ErrorCode);

Description:
For user authentication, the terminal notifies the following events to the application program.
EventVerifyCard, E ventVerifyPassword,
E E ventVerifyFinger_1_TO_1,
T t
application program must send the user’s authentication result to the terminal immediately.

Parameters:
TerminalID:
Terminal ID

UserID:
ID of the authenticated user or the user who attempted authentication

IsAccessibility:
This p arameter
d t f esignates
o w t u heh a lag r n o n hether
I t v i he
f ser
authentication fails at the terminal.

IsVistor:
This parameter designates whether the user is a visitor or not.

IsAuthorized:
This parameter designates whether authentication is success or not.

AuthorizedTime:
This p arameter
d the authentication
esignates t T character
ime. s tringi het fn ohe“yyyy-MM-dd
orm f
hh:mm:ss” is designated for this value.

ErrorCode:
This p arameter
d t code
esignates
o t f e he t he
orror d hat a ccurs T vuringo 0 uthenti

Copyright 2009 UNIONCOMMUNITY Co., LTD. 225


represents no error. Refer to the ErrorCode table for more information.

Related Properties
ErrorCode

Callback Event:
N/A

Event Parameters
N/A

Copyright 2009 UNIONCOMMUNITY Co., LTD. 226


SendAntipassbackResultToTerminal

Prototype:
HRESULT SendAntipassbackResultToTerminal(long TerminalID, long UserID, BOOL
bResult);

Description:
. T erminalh i A as tso ntipassback
E w v hption.
m t ventw g shen o erificatio
Antipassback. I o g nt rderto
T w s et E his, erminal
t a illp end ven
At t het pime, w rogram
c A ill s ontain
t b a ntipassback
s t t i r tatus
t o
This event will only occur when authentication done from the terminal.

Parameters:
TerminalID:
Terminal ID

UserID:
Already verified or attempt user ID
.

bResult:
. Authorization status by Antipassback. Value 1 means enter available

Related Properties
ErrorCode

Callback Event:
EventAntipassback

Event Prameters
N/A

Copyright 2009 UNIONCOMMUNITY Co., LTD. 227


4.7 ITerminalOption Interface

Terminal option setting interface.


Application p i f rogram
s a retrieves o ptionf
or eta t rom
nd T erminal.
’s o ptionsa D erminal
reN efault,
setting, lock, Holiday.

4.7.1 Properties

IterminalOption defines each interfaces’ Property


.
flagSecuLevel / f lagInputIDLength
/f /f /f lagAutoEnterKey
/ f lag
/ flagAntipassback / flagNetwork / flagInputIDType / flagAccessLevel / flagPrintText / flagSchedule
Prototype:
[WriteOnly] long flagSecuLevel~flagSchedule;

Description:
Getting a f v flag o aluer rom
O i F ption
v i 1 veference.
c b r nly T f lag
can only get reference if flag value is set as 1.

Set related falg and value before call SetOptionToTerminal Method.

Related methods:
SetOptionToTerminal

SecurityLevel_1To1 / SecurityLevel_1ToN
Prototype:
[Read/Write] long SecurityLevel_1To1;
[Read/Write] long SecurityLevel_1ToN;

Description:
Terminal gets authentication level for 1:1, 1:N. To set this value flagSecuLevel 1. Value can have below

1- LOWEST

Copyright 2009 UNIONCOMMUNITY Co., LTD. 228


2- LOWER
3- LOW
4- BELOW_NORMAL
5- NORMAL
6- ABOVE_NORMAL
7- HIGH
8- HIGHER
9- HIGHEST

This v alue
c s f ana r et v lag t S nd elated o aaluet g ro etOptionToTerminal
f
GetOptionFromTerminal Method.

Related methods:
SetOptionToTerminal
GetOptionFromTerminal

InputIDLength
Prototype:
[Read/Write] long InputIDLength;

Description:
Getting a ID lenghth for the terminal input. Maximum 8 digit number can be set when
using UserID. Maximum 20 digit for UniqueID. To set this value need to set 1 in
flagInputIDLenght.

This v alue
i t s f s a or et v lagb nd
c S elated alue
o c g efore
r a all etOp
call GetOptionFromTerminal Method
Related methods:
SetOptionToTerminal
GetOptionFromTerminal

AutoEnterKey
Prototype:
[Read/Write] long AutoEnterKey;

Copyright 2009 UNIONCOMMUNITY Co., LTD. 229


Description:
Ables y t ou
g v o f et
u T alue A or E sing
T f erminal
i f i uto
E K nter.
automatically w i h i hen k f t I as nput T s ey
t f or S nputIDLenghth.
v t 1 i
flagAutoEnterKey

This v alue
i t s fs ao r et v lag b nd S elated oaluer efore
a c etOptio
GetOptionFromTerminal Method
Related methods:
SetOptionToTerminal
GetOptionFromTerminal

Sound
Prototype:
[Read/Write] long Sound;

Description:
Can h save v ound
f t talume V rom
c b s hef 0erminal.
t 2 T M t olume s 0 an
Set value 1 to set flagSound.

This v alue
i t s fs ao r et v lag b nd S elated oaluer efore
a c etOptio
GetOptionFromTerminal Method

Related methods:
SetOptionToTerminal
GetOptionFromTerminal

Authentication
Prototype:
[Read/Write] long Authentication;

Description:
Getting a value for terminal’s authentication method. Check Chepter 1.5 for “Terminal
Authentication method” Set value 1 fom flagAuthentication.

This v alue
i t s fs ao r et v lag b ndc S elated alueM efore
o c g all

Copyright 2009 UNIONCOMMUNITY Co., LTD. 230


reference after call GetOptionFromTerminal Method.

Related methods:
SetOptionToTerminal
GetOptionFromTerminal

Application
Prototype:
[Read/Write] long Application;

Description:
Getting mode value in terminal program. Terminal can be used for Access, TNA, Meal. For
the reference check Chepter 1.5 “Terminal program mode” To set this vaule 1 in
flagApplication.

This v alue
i t s fs ao r et v lag b ndc S elated alueM efore
o c g all
reference after call GetOptionFromTerminal Method..

Related methods:
SetOptionToTerminal
GetOptionFromTerminal

Antipassback
Prototype:
[Read/Write] long Antipassback;

Description:
Terminal gets antipassback level.
To set, value 1 in flagAntipassback.
This can have following value.

0- Not in Use
1- Authentication during network disconnection.
2- No Authentication during network disconnection.

Copyright 2009 UNIONCOMMUNITY Co., LTD. 231


This v alue
i t s fs ao r et v lag b ndc S elated alueM efore
o c g all
reference after call GetOptionFromTerminal Method

Related methods:
SetOptionToTerminal
GetOptionFromTerminal

NetworkType / TerminalIP / Subnet / Gateway / ServerIP / Port


Prototype:
[ReadOnly] long NetworkType;
[ReadOnly] BSTR TerminalIP;
[ReadOnly] BSTR Subnet;
[ReadOnly] BSTR Gateway;
[ReadOnly] BSTR ServerIP;
[ReadOnly] long Port;

Description:
This v alue
i t s fs ao r et v lag b ndc S elated alueM efore
o c g all
reference after call GetOptionFromTerminal Method.

NetworkType
Getting type value for IP address. If 0, static, or 1 for DHCP.

TerminalIP
Getting Terminal a IP.

Subnet
. Getting Terminal Subnet Mask value.

Gateway
Getting Terminal Getway value

ServerIP
Getting IP value terminal connection.

Copyright 2009 UNIONCOMMUNITY Co., LTD. 232


Port
Getting terminal’s Port value. Default will be 9870

Related methods:
SetOptionToTerminal

InputIDType
Prototype:
[Read/Write] long InputIDType;

Description:
Getting ID Type value.
value 1 in flagInputIDType for setting
. This value lead to below

0- UserID
1- UniqueID

This v alue
i t s fs ao r et v lag b ndc S elated alueM efore
o c g all
reference after call GetOptionFromTerminal Method.

Related methods:
SetOptionToTerminal
GetOptionFromTerminal

AccessLevel
Prototype:
[Read/Write] long AccessLevel;

Description:
Getting approach level value. Appointed type for limit authentication type from using
input authentication method. 0 will be default value.
set value 1 in flagAccessLevel to use it.

Copyright 2009 UNIONCOMMUNITY Co., LTD. 233


0- Limitless
1- Only to Fingerprint and Password authentication.

This v alue
i t s fs ao r et v lag b ndc S elated alueM efore
o c g all
reference after call GetOptionFromTerminal Method

Related methods:
SetOptionToTerminal
GetOptionFromTerminal

PrintText
Prototype:
[Read/Write] long PrintText;

Description:
Buffer sequence for the text which will be printed out that the meal printer which is
integrated to the terminal.
This value can only be used when printer is connected to the terminal.
Input value 1 in flagPrintText to set.

This v alue
i t s fs ao r et v lag b ndc S elated alueM efore
o c g all
reference after call GetOptionFromTerminal Method
Related methods:
SetOptionToTerminal
GetOptionFromTerminal

IsUse / StartHour / StartMinute / EndHour / EndMinute


Prototype:
[ReadOnly] long IsUse;
[ReadOnly] long StartHour;

Copyright 2009 UNIONCOMMUNITY Co., LTD. 234


[ReadOnly] long StartMinute;
[ReadOnly] long EndHour;
[ReadOnly] long EndMinute;

Description:
Getting Lock or Open schedule in the Time zone.
Reference can be done after calling GetDaySchedule Method.

IsUse
Set validation for the Time zone, if 1, time zone validate.

StartHour
Getting Time zone starting time. Start from 0 to 23

StartMinute
Getting minute value from the Time zone. Start from 0 to 59.

EndHourGetting end time from Time zone. Start from 0 to 23.

EndMinute
Getting end minute from Time zone. Start from 0 to 59.

Related methods:
GetOptionFromTerminal
GetDaySchedule

Month / Day
Prototype:
[ReadOnly] long Month;
[ReadOnly] long Day;

Copyright 2009 UNIONCOMMUNITY Co., LTD. 235


Description:
Able to get Holiday information.
Refence can be found after calling GetHoliday Method.

Month
Getting Month value from Date. From 1 to 12.

Day
. Getting Day value. From 1 to 31.

Related methods:
GetOptionFromTerminal
GetHoliday

Copyright 2009 UNIONCOMMUNITY Co., LTD. 236


4.7.2 Methods

.Explain Method of All ITerminalOption interface

SetOptionToTerminal

Prototype:
HRESULT SetOptionToTerminal(LONG ClinetID, LONG TerminalID);

Description:
Set terminal option. Need to fill related value on regarding Properties and Method.
Please refer to chepter 4.7.1 for regarding Properties and Method.

Parameters:
ClientID:
ID of requested client (For Client/Server model development.)

Terminal ID:
Terminal ID

Related methods
SetHoliday
SetDaySchedule

Related properties
flagSecuLevel ~ flagSchedule
SecurityLevel
InputIDLength
AutoEnterKey
Sound
Authentication
Application
Antipassback

Copyright 2009 UNIONCOMMUNITY Co., LTD. 237


InputIDType
AccessLevel
PrintText
NetworkType
TerminalIP
Subnet
Gateway
ServerIP
Port

Callback Event:
EventSetTerminalOption

Event Parameters:
ClientID:
ID of requested client ID (For Client/Server model development.)

TerminalID:
Terminal ID

GetOptionFromTerminal

Prototype:
HRESULT GetOptionFromTerminal(LONG ClinetID, LONG TerminalID);

Description:
Import option from the Terminal. After Method call from EventGetTerminalOption, value
can be found from Properties and Method.
Please refer to chepter 4.7.1 for Properties and Method.
Parameters:
ClientID:
ID of requested client. (For Client/Server model development.)

Copyright 2009 UNIONCOMMUNITY Co., LTD. 238


Terminal ID:
Terminal ID

Related methods
GetHoliday
GetDaySchedule

Related properties
SecurityLevel_1To1
SecurityLevel_1ToN
InputIDLength
AutoEnterKey
Sound
Authentication
Application
Antipassback
InputIDType
AccessLevel
PrintText
NetworkType
TerminalIP
Subnet
Gateway
ServerIP
Port

Callback Event:
EventGetTerminalOption

Event Parameters:
ClientID:
ID of requested client. (For Client/Server model development.)

TerminalID:

Copyright 2009 UNIONCOMMUNITY Co., LTD. 239


Terminal ID

SetDaySchedule

Prototype:
HRESULT SetDaySchedule(BOOL Initialize, LONG DayOfWeek, LONG ScheduleType, LONG
Index, LONG StartHour, LONG StartMinute, LONG EndHour, LONG EndMinute);

Description:
This Method is in use of adding Lock or Open Time zone before calling SetOptionToTerminal.
Parameters:
Initialize:
Appoint to initialize and create new Lock & Open Schedule.
If F alse(=0)
T z d imew b aone continuously
ata a ill
ndm e nake dded
o t umber
z If T rue(=1),
f ime o
erase all time zone and create new.
For Schedule, 3 Lock Time zone and 3 Open Time zone each per a day.

DayOfWeek:
Set day and Holiday type.
0 – Sun
1 – Mon
2 – Tue
3 – Wed
4 – Thu
5 – Fri
6 – Sat
7 – Holiday 1
8 – Holiday 2
9 – Holiday 3

ScheduleType:

Appoint whether lock and open

Copyright 2009 UNIONCOMMUNITY Co., LTD. 240


.
0 – Lock
1 – Open

Index:

Getting Lock and Open Time zone Index vaule.


1 – Lock 1 or Open 1
2 – Lock 2 or Open 2
3 – Lock 3 or Open 3

StartHour
Getting Time zone start value. Value from 0~23.

StartMinute
Getting Mininute value, From 0~59.

EndHour
Getting Hour value, From 0~23.

EndMinute
Getting minute value from Time zone end. From 0~59.

Related methods
SetOptionToTerminal

Related properties
N/A

Callback Event:
N/A

Event Parameters:
N/A

Copyright 2009 UNIONCOMMUNITY Co., LTD. 241


GetDaySchedule

Prototype:
HRESULT GetDaySchedule(LONG DayOfWeek, LONG ScheduleType, LONG Index);

Description:
This Method is calling GetOptionFromTerminal Method then getting schedule information
from EventGetTerminalOption.

Parameters:

DayOfWeek:
Set date and Holiday Type.
0 – Sun
1 – Mon
2 – Tue
3 – Wed
4 – Thu
5 – Fri
6 – Sat
7 – Holiday 1
8 – Holiday 2
9 – Holiday 3

ScheduleType:
. Set type Lock or Open.
0 – Lock
1 – Open

Index:
Getting Index vaule for Lock and Open Time zone.
1 – Lock 1 or Open 1
2 – Lock 2 or Open 2
3 – Lock 3 or Open 3

Copyright 2009 UNIONCOMMUNITY Co., LTD. 242


Related methods
GetOptionFromTerminal

Related properties
IsUse, StartHour, StartMinute, EndHour, EndMinute

Callback Event:
N/A

Event Parameters:
N/A

SetHoliday

Prototype:
HRESULT S etHoliday(
BOOL I nitialize,
L H ONG L olidayType,
M L ON
Day);

This Method is used for for adding Holiday before call SetOptiontoTerminal Method.
Holiday can be set as 3 type. Each Type can be set with each Time zone.
Holiday can be added up to 100.

Parameters:
Initialize:
Appoint whether initialize Holiday and start from new.
If this value is False(=0) then Holiday data will be added continuously with data that has
been made internally and make various holiday data. This value is True(=0) then, erase all
holiday and create new.

HolidayType:
Appoint Holiday type 1, 2, 3
1 – Holiday 1
2 – Holiday 2

Copyright 2009 UNIONCOMMUNITY Co., LTD. 243


3 – Holiday 3

Month
Getting Month value. Start from 1 to 12.

Day
Getting Day value. Start from 1 to 31.

Related methods
SetOptionToTerminal

Related properties
N/A

Callback Event:
N/A

Event Parameters:
N/A

GetHoliday

Prototype:
HRESULT GetHoliday(LONG Index);

This Method is to check Holiday information through EventGetTerminalOption from


terminal by call GetOptionFromTerminal Method. After call Method then refer HolidayType,
Month, Day Properties. Holiday can be set maximum 100, so that Index need to be made
from 0~99 and call repeatedly.

Parameters:

Index:
Set Index value for importing. This value start from 0 to 99.

Copyright 2009 UNIONCOMMUNITY Co., LTD. 244


Related methods
GetOptionFromTerminal

Related properties
HolidayType, Month, Day

Callback Event:
N/A

Event Parameters:
N/A

Clear

Prototype:
HRESULT Clear();

Description:
This Method erase all internal option setting data.
This is used for when initialize before call GetOptionFromTerminal or after
SetOptionToTerminal.

Parameters:

Related methods
GetOptionFromTerminal
SetOptionToTerminal

Related properties

Callback Event:
N/A

Copyright 2009 UNIONCOMMUNITY Co., LTD. 245


Event Parameters:
N/A

get_ACUStatusValue
Prototype:
long get_ACUStatusValue(long StatusIndex, long ValueIndex)
Description:
This is property for get ACU Status after receive EventACUStatus.
(Refer to UCSAPI_ACU_STATUS_INFO)
StatusIndex
Set status type for get.
#define UCSAPI_ACU_STATUS_PARTITION 0
#define UCSAPI_ACU_STATUS_ZONE 1
#define UCSAPI_ACU_STATUS_LOCK 2
#define UCSAPI_ACU_STATUS_READER 3
ValueIndex
Set index for get.(base is zero)
Be careful not to exceed the maximum value.
#define MAX_ACU_PARTITION 4
#define MAX_ACU_ZONE 8
#define MAX_ACU_LOCK 4
#define MAX_ACU_READER 8

ACUGetReaderVersion
Prototype:
HRESULT ACUGetReaderVersion(long Index, long *pID, long *pType, long *pHW, long *pMajor, long
*pMinor, long *pCustom1, long *pCustom2, long *pOrder);
Description:
This is method for get ACU Reader version after receive EventACUStatus.
(Refer to UCSAPI_ACU_STATUS_INFO)

Index:
Set index for get.
Be careful not to exceed the maximum value.

Copyright 2009 UNIONCOMMUNITY Co., LTD. 246


Ref Parameters:
These are refer values for Reader Version items.

GetOptionFromACU
Prototype:
HRESULT GetOptionFromACU (LONG ClinetID, LONG TerminalID);

Description:
Import option from the ACU. After Method call from EventGetOptionFromACU, value
can be found from Properties and Method.
(Refer to UCSAPI_ACU_OPTION)
Parameters:
ClientID: See 1.6 Terminology Description
TerminalID: See 1.6 Terminology Description

Related properties
ACUNetType, ACUNetSPort
get_ACUReaderType
get_ACUReaderOpenTime
get_ACUReaderMode

Related methods
ACUGetNetAddress
ACUGetPartLock
ACUGetReaderPassback
ACUGetPartition
ACUGetZone
ACUGetProgramOption
ACUGetDoorOption
ACUGetInputOption
ACUGetSystemOption

Callback Event:
EventGetOptionFromACU

Copyright 2009 UNIONCOMMUNITY Co., LTD. 247


SetOptionToACU
Prototype:
HRESULT SetOptionToACU (LONG ClinetID, LONG TerminalID);

Description:
Set ACU option. Need to fill related value on regarding Properties and Method before call.
(Refer to UCSAPI_ACU_OPTION)

Parameters:
ClientID: See 1.6 Terminology Description
TerminalID: See 1.6 Terminology Description
Related properties
set_ACUReaderType
set_ACUReaderOpenTime
set_ACUReaderMode

Related methods
ClearACUOptionFlag
ClearACUOptionData
SetACUOptionFlag
ACUSetNetAddress
ACUSetPartLock
ACUSetReaderPassback
ACUSetPartition
ACUSetZone
ACUSetProgramOption
ACUSetDoorOption
ACUSetInputOption
ACUSetSystemOption

Callback Event:
EventSetOptionToACU

GetLockScheduleFromACU
Prototype:

Copyright 2009 UNIONCOMMUNITY Co., LTD. 248


HRESULT GetLockScheduleFromACU (LONG ClinetID, LONG TerminalID, long LockIndex);

Description:
Import lock schedule from the ACU. After Method call from
EventGetLockScheduleFromACU, value can be found from Properties and Method.
(Refer to GetDaySchedule for get schedule value)
Parameters:
ClientID: See 1.6 Terminology Description
TerminalID: See 1.6 Terminology Description
Related properties
Refer to GetDaySchedule in TerminalOption
Related methods
Refer to GetDaySchedule in TerminalOption

Callback Event:
EventGetLockScheduleFromACU

SetLockScheduleToACU
Prototype:
HRESULT SetLockScheduleToACU (LONG ClinetID, LONG TerminalID, long LockIndex);

Description:
Set l ock
s o
chedule
A N t f fr CU.v o eed
r o
P ill aelated
M b aluec n e
this method.
(Refer to SetDaySchedule for get schedule value)
Parameters:
ClientID: See 1.6 Terminology Description
TerminalID: See 1.6 Terminology Description
Related properties
Refer to SetDaySchedule in TerminalOption
Related methods
Refer to SetDaySchedule in TerminalOption

Callback Event:
EventSetLockScheduleFromACU

Copyright 2009 UNIONCOMMUNITY Co., LTD. 249


ClearSirenConfig
Prototype:
HRESULT ClearSirenConfig();

Description:
It initializes the Siren config value and Siren Count value.

Callback Event:
N/A

SetSirenConfig
Prototype:
HRESULT SetSirenConfig(BYTE Hour, BYTE Minute, BYTE Duration,
B Y T E S u n , B Y T E M o n , B Y T E T u e , B Y T E W e d , B Y T E T h u , B
OffHoliday);

Description:
Set Sirent Config value. Siren Count value will be increased internally.

Callback Event:
N/A

SetSirenToTerminal
Prototype:
HRESULT SetSirenToTerminal(LONG ClientID, LONG TerminalID);

Description:
It transmits to the terminal which designates the Sirent Config value set by SetSirenConfig.
Parameters:
ClientID: 1.6 Refer to the term explanation
TerminalID: 1.6 Refer to the term explanation
Related methods
ClearSirenConfig, SetSirenConfig

Copyright 2009 UNIONCOMMUNITY Co., LTD. 250


Callback Event:
EventSetSirenToTerminal

GetSirenFromTerminal
Prototype:
HRESULT GetSirenFromTerminal(LONG ClientID, LONG TerminalID);

Description:
Obtaining Siren Config which has set in the terminal.
Parameters:
ClientID: 1.6 Refer to the term explanation
TerminalID: 1.6 Refer to the term explanation
Related methods
GetSirenConfig

Callback Event:
EventGetSirenFromTerminal

GetSirenConfig
Prototype:
HRESULT GetSirenConfig(BYTE index, BYTE* Hour, BYTE* Minute, BYTE* Duration,
BYTE* Sun, BYTE* Mon, BYTE* Tue, BYTE* Wed,
BYTE* Thu, BYTE* Fri, BYTE* Sat, BYTE* OffHoliday);

Description:
When obtaining setting value of the terminal, EventGetSirenFromTerminal will be appeared
and it gets Siren Config value of the terminal through this Method.
Index value increases from 0 and gets Siren Config as much as Siren Count which has issued from
EventGetSirenFromTerminal

Callback Event:
N/A

Copyright 2009 UNIONCOMMUNITY Co., LTD. 251


4.8 ISmartCardLayout Interface
It is the interface for setting the card layout applying when reading smart card on the terminal.

4.8.1 Properties
It explains about various Property of the interface of ISmartCardLayout

SectorNumber
Prototype:
[ReadOnly] long SectorNumber

Description:
It obtains the number of SectorLayout set on COM.
Everytime when conducting SetSectorLayout, it increases 1 by 1 and when conducing
ClearSectorLayout, it will be initialized as 0.

Related methods:
ClearSectorLayout
SetSectorLayout

4.8.2 Methods
It explains about various Property of the interface of ISmartCardLayout

ClearSectorLayout

Prototype:
HRESULT ClearSectorLayout();

Description:
It initializes SectorLayout Data which has saved on COM.

Parameters:
N/A

Related methods

Copyright 2009 UNIONCOMMUNITY Co., LTD. 252


SetSectorLayout
SetSmartCardLayoutToTerminal

Related properties
SectorNumber

Callback Event:
N/A

SetSectorLayout

Prototype:
HRESULT SetSectorLayout(LONG Sector, LONG KeyType, BSTR KeyData,
LONG Block, LONG StartPoint, LONG DataLength, BYTE Aid0, BYTE Aid1)

Description:
Set the Sector Layout to COM applying to smartcard Layout.
SectorNumber of internal COM will be increased 1 by 1 when setting.
Parameters:
Sector:
It is Sector Number to be applied. Max. 127 (In case of 8K smartcard)
KeyType:
It designates the type of Key Data to get access to the related Sector.
#define UCSAPI_SMARTCARD_KEYTYPE_A 0x60
#define UCSAPI_SMARTCARD_KEYTYPE_B 0x61
KeyData:
It designates the type of Key Data to get access to the related Sector.
Designation value is Hex String (Ex: “000000FFFFFF”)
Block:
It is Block Number containing real data. (Range: 0 ~ 3)
StartPoint:
It designates the start point where the real data included in the related Block.
DataLength:
It designates the real length of data to be applied.
Aid0, Aid1:

Copyright 2009 UNIONCOMMUNITY Co., LTD. 253


It is AID value in case when Read type is UCSAPI_SMARTCARD_READTYPE_MAD

Related methods
ClearSectorLayout
SetSmartCardLayoutToTerminal

Related properties
SectorNumber

Callback Event:
N/A

SetSmartCardLayoutToTerminal
Prototype:
HRESULT SetSmartCardLayoutToTerminal(LONG ClientID, LONG TerminalID,
LONG CardType, LONG ReadType, LONG SerialFormat);

Description:
Set the Card Layout applying when reading card on the terminal transmitting the Sector
information of COM which has saved as Given Parameter and SetSectorLayout.

Parameters:
ClientID: 1.6 Refer to the term explanation
TerminalID: 1.6 Refer to the term explanation
CardType:
Designates the card type. Refer to the define below.
typedef UCSAPI_UINT32 UCSAPI_SMARTCARD_TYPE;
#define UCSAPI_SMARTCARD_TYPE_DATA 0
#define UCSAPI_SMARTCARD_TYPE_FINGER 1
ReadType:
Designates the data type reading card. Refer to the define below.
typedef UCSAPI_UINT32 UCSAPI_SMARTCARD_READTYPE;
#define UCSAPI_SMARTCARD_READTYPE_SERIAL 0
#define UCSAPI_SMARTCARD_READTYPE_DATA 1
#define UCSAPI_SMARTCARD_READTYPE_MAD 2

Copyright 2009 UNIONCOMMUNITY Co., LTD. 254


SerialFormat:

Designates t t heo i ype s f n ndicating w r erial t s umber


number.
Refer to the define below.
typedef UCSAPI_UINT8 UCSAPI_SMARTCARD_SERIALFORMAT;
#define UCSAPI_SMARTCARD_SERIALFORMAT_DEFAULT 0
#define UCSAPI_SMARTCARD_SERIALFORMAT_HEXA 1
#define UCSAPI_SMARTCARD_SERIALFORMAT_DECIMAL 2
#define UCSAPI_SMARTCARD_SERIALFORMAT_35DECIMAL 3

Related properties
SetSectorLayout

Related methods

Callback Event:
EventSetSmartCardLayout

4.9 Events of COM


Events of a COM module, UCSAPICOM.dll, are described in this chapter.

EventUserFileUpgrading
Prototype:
HRESULT EventUserFileUpgrading(
long ClientID,
long TerminalID,
long CurrentIndex,
long TotalNumber);
Description:
This is event to notify the download progress information to the application program.

Event Prameters

Copyright 2009 UNIONCOMMUNITY Co., LTD. 255


ClientID: See 1.6 Terminology Description
TerminalID: See 1.6 Terminology Description
CurrentIndex:
This parameter contains the index value of the data block under transmission.

TotalNumber:
This parameter contains the total number of data blocks to be sent.

Reference
SendUserFileToTerminal

EventUserFileUpgraded
Prototype:
HRESULT EventUserFileUpgraded(
long ClientID,
long TerminalID);
Description:
This is event to notify the download complete information to the application program.

Event Prameters
ClientID: See 1.6 Terminology Description
TerminalID: See 1.6 Terminology Description

Reference
SendUserFileToTerminal

EventRegistFace
Prototype:
HRESULT EventRegistFace (
long ClientID,
long TerminalID,
long CurrentIndex,
long TotalNumber,
VARIANT RegFaceData);
Description:

Copyright 2009 UNIONCOMMUNITY Co., LTD. 256


This is event to notify the process of registing face from terminal

Event Prameters
ClientID: See 1.6 Terminology Description
TerminalID: See 1.6 Terminology Description
CurrentIndex:
This p arameter
c t ontains
c i he
v o urrent
p ndex
f r alue
f f
Base value is 1.
If this value is 0 then this event mean process cancel.
TotalNumber:
This parameter contains the whole input face value. In normal regist, this value is 5, in quick regist,
this value is 3. If this value is 0 then this event mean process cancel.
RegFaceData:
Real input face data.(data type is byte array)
Reference
RegistFaceFromTerminal

EventACUStatus
Prototype:
HRESULT EventACUStatus (
long ClientID,
long TerminalID,
long Notice,
VARIANT binStatus,
BSTR strStatus);
Description:
This is periodically event to notify the status of ACU.

Event Prameters
ClientID: See 1.6 Terminology Description
TerminalID: See 1.6 Terminology Description
Notice:
This parameter mean that ACU has any problem.
binStatus:
The binary array for struct of ACU_STATUS.

Copyright 2009 UNIONCOMMUNITY Co., LTD. 257


strStatus:
The hex string for struct of ACU_STATUS.

Reference
SetDoorStatusToACU

EventGetLockScheduleFromACU
Prototype:
HRESULT EventGetLockScheduleFromACU (
long ClientID,
long TerminalID,
long LockIndex);
Description:
This is response event for call GetLockScheduleFromACU().
When receive this event, you can get schedule valus using property and method about schedule.
Event Prameters
ClientID: See 1.6 Terminology Description
TerminalID: See 1.6 Terminology Description
LockIndex:
Lock index of ACU for get schedule.
Reference
GetLockScheduleFromACU

EventSetLockScheduleToACU
Prototype:
HRESULT EventSetLockScheduleToACU (
long ClientID,
long TerminalID);
Description:
This is response event for call SetLockScheduleToACU().

Event Prameters
ClientID: See 1.6 Terminology Description
TerminalID: See 1.6 Terminology Description
Reference

Copyright 2009 UNIONCOMMUNITY Co., LTD. 258


SetLockScheduleToACU

EventSetSirenToTerminal
Prototype:
HRESULT EventSetSirenToTerminal(long ClientID, long TerminalID);
Description:
SDK module notifies this event as the result of Sirent Config set on the terminal.

Event Prameters
ClientID: 1.6 Refer to the term explanation
TerminalID: 1.6 Refer to the term explanation
Reference
ClearSirenConfig
SetSirenConfig
SetSirenToTerminal

EventGetSirenFromTerminal
Prototype:
HRESULT EventGetSirenFromTerminal(long ClientID, long TerminalID);
Description:
SDK module notifies this event as the result of Sirent Config set on the terminal.

Event Prameters
ClientID: 1.6 Refer to the term explanation
TerminalID: 1.6 Refer to the term explanation
Reference
GetSirenFromTerminal
GetSirenConfig

EventSetSmartCardLayout
Prototype:
HRESULT EventSetSmartCardLayout(long ClientID, long TerminalID);
Description:
SDK module notifies this event as the result of Sirent Config set on the terminal.

Copyright 2009 UNIONCOMMUNITY Co., LTD. 259


Event Prameters
ClientID: 1.6 Refer to the term explanation
TerminalID: 1.6 Refer to the term explanation
Reference
SetSmartCardLayoutToTerminal

5. Error definitions

Define all Error value and about Error value from UCS SDK.

5.1 Success
Definition for Error value in Success..

UCSAPIERR_NONE
Prototype:
LONG UCSAPIERR_NONE (0)

Description:
Error value when sccuess. Means that not Error but success in function.

5.2 General error definitions

UCSAPIERR_INVALID_POINTER
Prototype:
UCSAPIERR_INVALID_POINTER (1)

Description:
Wrong Pointer value in use.
.

UCSAPIERR_INVALID_TYPE
Prototype:

Copyright 2009 UNIONCOMMUNITY Co., LTD. 260


LONG UCSAPIERR_INVALID_TYPE (2)

Description:
Wrong type value is in use
.

UCSAPIERR_INVALID_PARAMETER
Prototype:
LONG UCSAPIERR_INVALID_PARAMETER (3)

Description:
Used for wrong parameter.
.

UCSAPIERR_INVALID_DATA
Prototype:
LONG UCSAPIERR_INVALID_DATA (4)

Description:
Use in wrong data

UCSAPIERR_FUNCTION_FAIL
Prototype:
LONG UCSAPIERR_FUNCTION_FAIL (5)

Description:
. Error from internal function and fail processing
UCSAPIERR_NOT_SERVER_ACTIVE
Prototype:
LONG UCSAPIERR_NOT_SERVER_ACTIVE (6)

Description:
Server is not on start

Copyright 2009 UNIONCOMMUNITY Co., LTD. 261


UCSAPIERR_INVALID_TERMINAL
Prototype:
LONG UCSAPIERR_INVALID_TERMINAL (7)

Description:
Terminal is not connected

UCSAPIERR_PROCESS_FAIL
Prototype:
LONG UCSAPIERR_PROCESS_FAIL (8)

Description:
Fail during process
UCSAPIERR_USER_CANCEL
Prototype:
LONG UCSAPIERR_USER_CANCEL (9)

Description:
Process cancel from a user.

UCSAPIERR_UNKNOWN_REASON
Prototype:
LONG UCSAPIERR_UNKNOWN_REASON (16)

Description:
Unknown error.

5.3 Data szie related error definitions


Definition for data size error

UCSAPIERR_CODE_SIZE
Prototype:
LONG UCSAPIERR_CODE_SIZE (513)

Description:

Copyright 2009 UNIONCOMMUNITY Co., LTD. 262


. Exceed of Access Group Code size.

UCSAPIERR_USER_ID_SIZE
Prototype:
LONG UCSAPIERR_USER_ID_SIZE (514)

Description:
Maximum size of user ID exceed.

UCSAPIERR_USER_NAME_SIZE
Prototype:
LONG UCSAPIERR_USER_NAME_SIZE (515)

Description:
Exceed of user name length.

UCSAPIERR_UNIQUE_ID_SIZE
Prototype:
LONG UCSAPIERR_UNIQUE_ID_SIZE (516)

Description:
Exceed of UNIQUE ID length.

UCSAPIERR_INVALID_SECURITY_LEVEL
Prototype:
LONG UCSAPIERR_INVALID_SECURITY_LEVEN (517)

Description:
Exceed of authentication level.

UCSAPIERR_PASSWORD_SIZE
Prototype:
LONG UCSAPIERR_PASSWORD_SIZE (518)

Copyright 2009 UNIONCOMMUNITY Co., LTD. 263


Description:
Exceed of maximum User PIN size

UCSAPIERR_PICTURE_SIZE
Prototype:
LONG UCSAPIERR_PICTURE _SIZE (519)

Description:
User’s Picture image type is not in support

UCSAPIERR_INVALID_PICTURE_TYPE
Prototype:
LONG UCSAPIERR_INVALID_PICTURE_TYPE (520)

Description:
User’s Picture image type is not in support
UCSAPIERR_RFID_SIZE
Prototype:
LONG UCSAPIERR_RFID_SIZE (521)

Description:
Exceed of maximum card number length

UCSAPIERR_MAX_CARD_NUMBER
Prototype:
LONG UCSAPIERR_MAX_CARD_NUMBER (529)

Description:
Exceed maximum card capacity. Maximum 5 card can be stored per user.
.

UCSAPIERR_MAX_FINGER_NUMBER
Prototype:
LONG UCSAPIERR_MAX_FINGER_NUMBER (530)

Copyright 2009 UNIONCOMMUNITY Co., LTD. 264


Description:
Exceed maximum fingerprint capacity. Maximum 5 fingerprint can be stored per user

5.4 Authentication related error definitions


Definition for error related to authentication

UCSAPIERR_INVALID_USER
Prototype:
LONG UCSAPIERR_INVALID_USER (769)

Description:
Unregistered user..

UCSAPIERR_UNAUTHORIZED
Prototype:
LONG UCSAPIERR_UNAUTHORIZED (770)

Description:
Fingerprint, card, PIN matching fail.

UCSAPIERR_PERMISSION
Prototype:
LONG UCSAPIERR_PERMISSION (771)

Description:
No autoriztion.

UCSAPIERR_FINGER_CAPTURE_FAIL
Prototype:
LONG UCSAPIERR_FINGER_CAPTURE_FAIL (772)

Description:
FP capture fail

Copyright 2009 UNIONCOMMUNITY Co., LTD. 265


UCSAPIERR_DUP_AUTHENTICATION
Prototype:
LONG UCSAPIERR_DUP_AUTHENTICATION (773)

Description:
Multiple authentication. Prevent to have duplicate by using card from meal management

UCSAPIERR_ANTIPASSBACK
Prototype:
LONG UCSAPIERR_ANTIPASSBACK (774)

Description:
Authentication fail for antipassback.

UCSAPIERR_NETWORK
Prototype:
LONG UCSAPIERR_NETWORK (775)

Description:
No response from a server due to network problem.

UCSAPIERR_SERVER_BUSY
Prototype:
LONG UCSAPIERR_SERVER_BUSY (776)

Description:
Authentication has not been made due to busy server.

UCSAPIERR_FACE_DETECTION
Prototype:
LONG UCSAPIERR_FACE_DETECTION (777)

Description:
Face detection failed when it set.

Copyright 2009 UNIONCOMMUNITY Co., LTD. 266


Copyright 2009 UNIONCOMMUNITY Co., LTD. 267

You might also like