TFT 系列脱机通讯开发包
开发手册
日期: 2015 年8月
2015 ZKTeco Inc.。版权所有,翻印必究。
·本说明文件中的信息如有更改,恕不另行通知。
·ZKTeco Inc.为中控科技的司标,Biokey 为中控科技的核心技术徽标,ZKTeco, Biokey 已经在中国及美
国注册。
·本说明文件中述及的其他商标和产品名称是指拥有相应商标和产品名称的公司或者制造的产品。ZKTeco
Inc.对其他公司的商标和产品名称不拥有任何所有权。
·开发中使用问题,非开发包问题,请自行解决。
·使用该开发包,由于人为或程序本身造成数据丢失,本公司概不负责。
·该文档基于 6.2.5.34 版 SDK
目录
1. SDK 介绍................................................................................................................................................................. 1
2. 快速开始................................................................................................................................................................2
2.1 常用词介绍...................................................................................................................................................2
2.2 常用工作流程介绍......................................................................................................................................3
2.2.1 考勤记录下载流程:.........................................................................................................................3
2.2.2 操作记录下载流程:.........................................................................................................................3
2.2.3 门禁设置流程:.................................................................................................................................4
2.2.4 下载用户信息,指纹模板等流程.................................................................................................... 4
2.2.5 实时事件接收流程...........................................................................................................................5
2.2.6 联机登记流程 (上传用户信息,指纹模板等流程)...................................................................... 6
2.2.7 短消息上传流程...............................................................................................................................7
3. 属性相关介绍........................................................................................................................................................7
3.1 AccGroup......................................................................................................................................................7
3.2 AccTimeZones..............................................................................................................................................7
3.3 BASE64..........................................................................................................................................................7
3.4 CardNumber..................................................................................................................................................8
3.5 CommPort......................................................................................................................................................8
3.6 ConvertBIG5................................................................................................................................................8
3.7 PINWidth......................................................................................................................................................8
3.8 GetStrCardNumber......................................................................................................................................8
3.9 SetStrCardNumber......................................................................................................................................9
3.10 MaxP4PConnect...................................................................................................................................9
4. 实时事件相关........................................................................................................................................................9
4.1 获取实时事件方法......................................................................................................................................9
4.1.1 RegEvent..........................................................................................................................................9
4.1.2 ReadRTLog......................................................................................................................................10
4.1.3 GetRTLog........................................................................................................................................10
4.2 实时事件介绍............................................................................................................................................11
4.2.1 OnConnected..................................................................................................................................11
4.2.2 OnDisConnected............................................................................................................................11
4.2.3 OnAlarm..........................................................................................................................................11
4.2.4 OnDoor............................................................................................................................................ 11
4.2.5 OnAttTransactionEx....................................................................................................................11
4.2.6 OnEnrollFingerEx........................................................................................................................12
4.2.7 OnFinger........................................................................................................................................12
4.2.8 OnFingerFeature..........................................................................................................................12
4.2.9 OnHIDNum........................................................................................................................................12
4.2.10 OnNewUser....................................................................................................................................13
4.2.11 OnVerify......................................................................................................................................13
4.2.12 OnWriteCard................................................................................................................................13
4.2.13 OnEmptyCard................................................................................................................................13
4.2.14 OnEMData......................................................................................................................................13
5 常用函数介绍........................................................................................................................................................14
5.1 连接机器相关函数....................................................................................................................................14
5.1.1 Connect_Net..................................................................................................................................14
5.1.2 Connect_Com..................................................................................................................................14
5.1.3 Connect_P4P..................................................................................................................................14
5.1.4 Disconnect....................................................................................................................................15
5.2 数据管理相关函数....................................................................................................................................15
5.2.1 考勤记录数据................................................................................................................................15
5.2.1.1 ReadGeneralLogData.............................................................................................................15
5.2.1.2 ReadAllGLogData................................................................................................................. 15
5.2.1.3 SSR_GetGeneralLogData......................................................................................................16
5.2.1.4 ClearGLog..............................................................................................................................17
5.2.2 操作记录相关.................................................................................................................................17
5.2.2.1 ReadSuperLogData................................................................................................................ 17
5.2.2.2 ReadAllSLogData.................................................................................................................. 17
5.2.2.3 GetSuperLogData...................................................................................................................18
5.2.2.4 GetAllSLogData.....................................................................................................................19
5.2.2.5 ClearSLog.............................................................................................................................. 20
5.2.2.6 GetSuperLogData2................................................................................................................ 20
5.2.3 用户信息相关.................................................................................................................................20
5.2.3.1 ReadAllUserID.......................................................................................................................20
5.2.3.2 SSR_EnableUser....................................................................................................................21
5.2.3.3 SetUserInfoEx........................................................................................................................21
5.2.3.4 GetUserInfoEx....................................................................................................................... 22
5.2.3.5 DeleteUserInfoEx...................................................................................................................22
5.2.3.6 SSR_GetAllUserInfo............................................................................................................. 22
5.2.3.7 SSR_GetUserInfo.................................................................................................................. 23
5.2.3.8 SSR_SetUserInfo................................................................................................................... 24
5.2.4 登记数据(同时包括用户信息和指纹).................................................................................... 24
5.2.4.1 SSR_DeleteEnrollData.......................................................................................................... 24
5.2.4.2 SSR_DeleteEnrollDataExt.....................................................................................................25
5.2.5 指纹模板相关.................................................................................................................................25
5.2.5.1 ReadAllTemplate................................................................................................................... 25
5.2.5.2 SSR_GetUserTmp..................................................................................................................26
5.2.5.3 SSR_GetUserTmpStr.............................................................................................................26
5.2.5.4 SSR_SetUserTmp.................................................................................................................. 27
5.2.5.5 SSR_SetUserTmpStr..............................................................................................................27
5.2.5.6 SSR_DelUserTmp..................................................................................................................27
5.2.5.7 SSR_SetUserTmpExt.............................................................................................................28
5.2.5.8 SSR_DelUserTmpExt............................................................................................................ 28
5.2.5.9 SetUserTmpEx....................................................................................................................... 29
5.2.5.10 SetUserTmpExStr................................................................................................................ 29
5.2.5.11 GetUserTmpEx.................................................................................................................... 30
5.2.5.12 GetUserTmpExStr................................................................................................................31
5.2.6 其他................................................................................................................................................31
5.2.6.1 短消息相关............................................................................................................................31
5.2.6.1.1 SetSMS........................................................................................................................31
5.2.6.1.2 SSR_SetUserSMS.......................................................................................................32
5.2.6.1.3 GetSMS.......................................................................................................................32
5.2.6.1.4 DeleteSMS.................................................................................................................. 33
5.2.6.1.5 SSR_DeleteUserSMS................................................................................................. 33
5.2.6.1.6 ClearUserSMS............................................................................................................ 34
5.2.6.1.7 ClearSMS....................................................................................................................34
5.2.6.2 WorkCode 相关..................................................................................................................... 34
5.2.6.2.1 SSR_GetWorkCode.................................................................................................... 34
5.2.6.2.2 SSR_SetWorkCode..................................................................................................... 34
5.2.6.2.3 SSR_DeleteWorkCode................................................................................................35
5.2.6.2.4SSR_ClearWorkCode.................................................................................................. 35
5.2.6.3 节假日相关............................................................................................................................35
5.2.6.3.1 SSR_GetHoliday.........................................................................................................35
5.2.6.3.2 SSR_SetHoliday......................................................................................................... 36
5.2.6.4 夏令时相关...........................................................................................................................36
5.2.6.4.1 SetDaylight................................................................................................................. 36
5.2.6.4.2 GetDaylight.................................................................................................................37
5.2.6.5 快捷键定义...........................................................................................................................37
5.2.6.5.1 SSR_SetShortkey........................................................................................................37
5.2.6.5.2 SSR_GetShortkey....................................................................................................... 38
5.2.6.6 指纹模板转换相关................................................................................................................39
5.2.6.6.1 GetFPTempLength......................................................................................................39
5.2.6.6.2 GetFPTempLengthStr................................................................................................. 39
5.2.6.6.3 FPTempConvert.......................................................................................................... 40
5.2.6.6.4 FPTempConvertStr..................................................................................................... 40
5.2.6.6.5 FPTempConvertNew...................................................................................................40
5.2.6.6.6 FPTempConvertNewStr..............................................................................................41
5.2.7 系统数据管理相关.........................................................................................................................41
5.2.7.1 ClearKeeperData....................................................................................................................41
5.2.7.2 ClearData................................................................................................................................42
5.2.7.3 GetDataFile............................................................................................................................ 42
5.2.7.4 SendFile..................................................................................................................................43
5.2.7.5 RefreshData............................................................................................................................43
5.2.8 考勤照片........................................................................................................................................43
5.2.8.1 GetPhotoNamesByTime........................................................................................................ 43
5.2.8.2 GetPhotoByName.................................................................................................................. 44
5.2.8.3 GetPhotoCount.......................................................................................................................44
5.2.8.4 ClearPhotoByTime.................................................................................................................45
5.3 门禁相关(时间段,组,开锁组合).................................................................................................... 45
5.3.1 GetUserGroup................................................................................................................................45
5.3.2 SetUserGroup................................................................................................................................46
5.3.3 GetTZInfo......................................................................................................................................46
5.3.4 SetTZInfo......................................................................................................................................46
5.3.5 SSR_SetUnLockGroup....................................................................................................................47
5.3.6 SSR_GetUnLockGroup....................................................................................................................47
5.3.7 SSR_SetGroupTZ............................................................................................................................48
5.3.8 SSR_GetGroupTZ............................................................................................................................48
5.3.9 GetUserTZs....................................................................................................................................49
5.3.10 SetUserTZs..................................................................................................................................49
5.3.11 GetUserTZStr..............................................................................................................................50
5.3.12 SetUserTZStr..............................................................................................................................50
5.3.13 ACUnlock......................................................................................................................................51
5.3.14 GetACFun......................................................................................................................................51
5.3.15 GetDoorState..............................................................................................................................51
5.3.16 UseGroupTimeZone......................................................................................................................52
5.4 机器管理.....................................................................................................................................................52
5.4.1 IsTFTMachine................................................................................................................................52
5.4.2 GetDeviceStatus..........................................................................................................................53
5.4.3 GetDeviceInfo..............................................................................................................................53