Standalone SDK API Doc  V1.0.4
Functions
5.RTEvent.h File Reference

Detailed Description

Author
http://www.zkteco.com
Date
2016-01-01
Copyright:
Copyright 2017 ZKTECO CO., LTD. All Rights Reserved.
Note

Functions

 OnConnected (LONG MachineNumber)
 
 OnDisConnected (LONG MachineNumber)
 
 OnAlarm (LONG AlarmType, LONG EnrollNumber, LONG Verified)
 
 OnDoor (LONG EventType)
 
 OnAttTransaction (LONG EnrollNumber, LONG IsInValid, LONG AttState, LONG VerifyMethod, LONG Year, LONG Month, LONG Day, LONG Hour, LONG Minute, LONG Second)
 
 OnAttTransactionEx (LONG EnrollNumber, LONG IsInValid, LONG AttState, LONG VerifyMethod, LONG Year, LONG Month, LONG Day, LONG Hour, LONG Minute, LONG Second)
 
 OnDeleteTemplate (LONG EnrollNumber, LONG FingerIndex)
 
 OnEnrollFinger (LONG EnrollNumber, LONG FingerIndex, LONG ActionResult, LONG TemplateLength)
 
 OnFinger ()
 
 OnFingerFeature (LONG Score)
 
 OnHIDNum (LONG CardNumber)
 
 OnKeyPress (LONG Key)
 
 OnNewUser (LONG EnrollNumber)
 
 OnVerify (LONG UserID)
 
 OnWriteCard (LONG EnrollNumber, LONG ActionResult, LONG Length)
 
 OnEmptyCard (LONG ActionResult)
 
 OnEMData (LONG DataType, LONG DataLen, CHAR *DataBuffer)
 
VARIANT_BOOL RegEvent (LONG dwMachineNumber, LONG EventMask)
 
VARIANT_BOOL ReadRTLog (LONG dwMachineNumber)
 
VARIANT_BOOL GetRTLog (LONG dwMachineNumber)
 

Function Documentation

◆ OnConnected()

OnConnected ( LONG  MachineNumber)

To trigger this event when the machine is connected successfully.

Parameters
Parameter description:
name type param direction description of param
MachineNumber LONG [in] Machine ID
Returns
None
See also
Attention
Note
Applicable to BW, TFT, and IFACE devices

◆ OnDisConnected()

OnDisConnected ( LONG  MachineNumber)

To trigger this event when the machine is disconnected.

Parameters
Parameter description:
name type param direction description of param
MachineNumber LONG [in] Machine ID
Returns
None
See also
Attention
Note
Applicable to BW, TFT, and IFACE devices

◆ OnAlarm()

OnAlarm ( LONG  AlarmType,
LONG  EnrollNumber,
LONG  Verified 
)

To trigger this event when the machine raises an alarm.

Parameters
Parameter description:
name type param direction description of param
AlarmType LONG [in] Alarm type
EnrollNumber LONG [in] User ID
Verified LONG [in] Whether to perform verification
Returns
None
See also
Attention
1. Alarm Type: alarm type. The value 55 indicates a tamper alarm, 58 misoperation alarm, 32 duress alarm, and 34 passback alarm.
  1. EnrollNumber: user ID. The value is 0 if the alarm is a tamper alarm, misoperation alarm, or duress key alarm. The value is the user ID if the alarm is another type of duress alarm or a passback alarm.
  2. Verified: whether to perform verification. The value is 0 when the alarm is a tamper or misoperation alarm, and is 1 if the alarm is of other types.
Note
Applicable to BW, TFT, and IFACE devices

◆ OnDoor()

OnDoor ( LONG  EventType)

To trigger this event when the machine opens the door.

Parameters
Parameter description:
name type param direction description of param
EventType LONG [in] Door opening type
Returns
None
See also
Attention
EventType: specifies the door opening type. The value 4 indicates that the door is not closed properly or has been opened, 53 indicates an exit button, 5 indicates that the door has been closed, and 1 indicates that the door is opened unexpectedly.
Note
Applicable to BW, TFT, and IFACE devices

◆ OnAttTransaction()

OnAttTransaction ( LONG  EnrollNumber,
LONG  IsInValid,
LONG  AttState,
LONG  VerifyMethod,
LONG  Year,
LONG  Month,
LONG  Day,
LONG  Hour,
LONG  Minute,
LONG  Second 
)

To trigger this event when the verification is passed.

Parameters
Parameter description:
name type param direction description of param
EnrollNumber LONG [in] Alarm type
IsInValid LONG [in] Whether the record is valid
AttState LONG [in] Attendance status
VerifyMode LONG [in] Verification mode of the record
Year LONG [in] Year
Month LONG [in] Month
Day LONG [in] Date
Hour LONG [in] Hour
Minute LONG [in] Minute
Returns
None
See also
Attention
1. The VerifyMode parameter specifies the verification mode. The values are described as follows:
Under normal conditions:
0 indicates password verification, 1 fingerprint verification, and 2 card verification.
Under multiple verification modes:
FP_OR_PW_OR_RF 0
FP 1
PIN 2
PW 3
RF 4
FP_OR_PW 5
FP_OR_RF 6
PW_OR_RF 7
PIN_AND_FP 8
FP_AND_PW 9
FP_AND_RF 10
PW_AND_RF 11
FP_AND_PW_AND_RF 12
PIN_AND_FP_AND_PW 13
FP_AND_RF_OR_PIN 14
  1. The AttState parameter specifies the attendance status. The values are described as follows:
    0?aCheck-In Default
    1?aCheck-Out
    2?aBreak-Out
    3?aBreak-In
    4?aOT-In
    5?aOT-Out
Note
Applicable to BW

◆ OnAttTransactionEx()

OnAttTransactionEx ( LONG  EnrollNumber,
LONG  IsInValid,
LONG  AttState,
LONG  VerifyMethod,
LONG  Year,
LONG  Month,
LONG  Day,
LONG  Hour,
LONG  Minute,
LONG  Second 
)

To trigger this event when the verification is passed.

Parameters
Parameter description:
name type param direction description of param
EnrollNumber BSTR [in] Alarm type
IsInValid LONG [in] Whether the record is valid
AttState LONG [in] Attendance status
VerifyMode LONG [in] Verification mode of the record
Year LONG [in] Year
Month LONG [in] Month
Day LONG [in] Date
Hour LONG [in] Hour
Minute LONG [in] Minute
Second LONG [in] Second
WorkCode LONG [in] Work code
Returns
None
See also
Attention
1. The VerifyMode parameter specifies the verification mode. The values are described as follows:
Under normal conditions:
0 indicates password verification, 1 fingerprint verification, and 2 card verification.
Under multiple verification modes:
FP_OR_PW_OR_RF 0
FP 1
PIN 2
PW 3
RF 4
FP_OR_PW 5
FP_OR_RF 6
PW_OR_RF 7
PIN_AND_FP 8
FP_AND_PW 9
FP_AND_RF 10
PW_AND_RF 11
FP_AND_PW_AND_RF 12
PIN_AND_FP_AND_PW 13
FP_AND_RF_OR_PIN 14
  1. The AttState parameter specifies the attendance status. The values are described as follows:
    0?aCheck-In Default
    1?aCheck-Out
    2?aBreak-Out
    3?aBreak-In
    4?aOT-In
    5?aOT-Out
    1. The WorkCode parameter specifies the work code. If the machine does not support the work code, 0 is returned.
Note
Applicable to BW, TFT, and IFACE devices

◆ OnDeleteTemplate()

OnDeleteTemplate ( LONG  EnrollNumber,
LONG  FingerIndex 
)

To trigger this event when deleting a fingerprint template on the machine.

Parameters
Parameter description:
name type param direction description of param
EnrollNumber LONG [in] ID of the user to which the fingerprint template to be deleted belongs
FingerIndex LONG [in] Index of the fingerprint template to be deleted
Returns
None
See also
Attention
Note
Applicable to BW, TFT, and IFACE devices

◆ OnEnrollFinger()

OnEnrollFinger ( LONG  EnrollNumber,
LONG  FingerIndex,
LONG  ActionResult,
LONG  TemplateLength 
)

To trigger this event when registering a fingerprint.

Parameters
Parameter description:
name type param direction description of param
EnrollNumber LONG [in] ID of the user whose fingerprint is to be registered
FingerIndex LONG [in] Index of the fingerprint to be registered
ActionResult LONG [in] Operation result. The value is 0 if the operation succeeds and is larger than 0 if the operation fails.
TemplateLength LONG [in] Length of the fingerprint template
Returns
None
See also
Attention
Note
Applicable to BW, TFT, and IFACE devices

◆ OnFinger()

OnFinger ( )

To trigger this message when a fingerprint is scanned by the machine.

Parameters
None
Returns
None
See also
Attention
Note
Applicable to BW, TFT, and IFACE devices

◆ OnFingerFeature()

OnFingerFeature ( LONG  Score)

To trigger this message if a finger is pressed onto the fingerprint reader when registering user fingerprints.

Parameters
Parameter description:
name type param direction description of param
Score LONG [in] Quality score of the fingerprint
Returns
None
See also
Attention
Note
Applicable to BW, TFT, and IFACE devices

◆ OnHIDNum()

OnHIDNum ( LONG  CardNumber)

To trigger this message when punching a card.

Parameters
Parameter description:
name type param direction description of param
CardNumber LONG [in] Card number
Returns
None
See also
Attention
The card can be an ID card or HID card. For an MIFARE card, this event will be triggered only when it is used as an ID card.
Note
Applicable to BW, TFT, and IFACE devices

◆ OnKeyPress()

OnKeyPress ( LONG  Key)

To trigger this message when a key is available.

Parameters
Parameter description:
name type param direction description of param
Key LONG [in] Key value
Returns
None
See also
Attention
hello world
Note
Applicable to BW, TFT, and IFACE devices

◆ OnNewUser()

OnNewUser ( LONG  EnrollNumber)

To trigger this message when a new user is registered successfully.

Parameters
Parameter description:
name type param direction description of param
EnrollNumber LONG [in] ID of the newly registered user
Returns
None
See also
Attention
hello world
Note
Applicable to BW, TFT, and IFACE devices

◆ OnVerify()

OnVerify ( LONG  UserID)

To trigger this message during user verification.

Parameters
Parameter description:
name type param direction description of param
UserID LONG [in] ID of the user to be verified
Returns
None
See also
Attention
hello world
Note
Applicable to BW, TFT, and IFACE devices

◆ OnWriteCard()

OnWriteCard ( LONG  EnrollNumber,
LONG  ActionResult,
LONG  Length 
)

To trigger this event when the machine writes data to a card.

Parameters
Parameter description:
name type param direction description of param
EnrollNumber LONG [in] User ID of the card to which data is to be written
ActionResult LONG [in] Result of the write operation. The value 0 indicates operation success and other values indicate operation failure.
Length LONG [in] Total size of the data written to the card
Returns
None
See also
Attention
hello world
Note
Applicable to BW, TFT, and IFACE devices

◆ OnEmptyCard()

OnEmptyCard ( LONG  ActionResult)

To trigger this event when the machine writes data to a card.

Parameters
Parameter description:
name type param direction description of param
ActionResult LONG [in] Result of the clear operation. The value 0 indicates operation success and other values indicate operation failure.
Returns
None
See also
Attention
hello world
Note
Applicable to BW, TFT, and IFACE devices

◆ OnEMData()

OnEMData ( LONG  DataType,
LONG  DataLen,
CHAR *  DataBuffer 
)

To trigger this event when the machine sends an unknown event to the SDK.

Parameters
Parameter description:
name type param direction description of param
DataType LONG [in] Event type
DataLen LONG [in] Total data length
DataBuffer CHAR* [in] Data
Returns
None
See also
Attention
hello world
Note
Applicable to BW, TFT, and IFACE devices

◆ RegEvent()

VARIANT_BOOL RegEvent ( LONG  dwMachineNumber,
LONG  EventMask 
)

To register a real-time event to be triggered.

Parameters
Parameter description:
name type param direction description of param
dwMachineNumber LONG [in] Machine ID
EventMask LONG [in] Event ID
Returns
Value description:
name type description of value
True BOOL Function execution success
False BOOL Function execution failure
See also
Attention
The event IDs are described as follows:
1 OnAttTransactionˇę?OnAttTransactionEx
2(1<<1) OnFinger
4(1<<2) OnNewUser
8(1<<3) OnEnrollFingerˇę?OnEnrollFingerEx
16(1<<4) OnKeyPress
256(1<<7) OnVerify
512(1<<8) OnFingerFeature
1024(1<<9) OnDoorˇę?OnAlarm
2048(1<<10) OnHIDNum
4096(1<<11) OnWriteCard
8192(1<<12) OnEmptyCard
16384(1<<13) OnDeleteTemplate
To register multiple real-time events, perform the OR operation for the binary event IDs. To register all real-time events, set EventMask to 65535.
Note
Applicable to BW, TFT, and IFACE devices

◆ ReadRTLog()

VARIANT_BOOL ReadRTLog ( LONG  dwMachineNumber)

To read real-time events to the buffer of the PC.

Parameters
Parameter description:
name type param direction description of param
dwMachineNumber LONG [in] Machine ID
Returns
Value description:
name type description of value
True BOOL Function execution success
False BOOL Function execution failure
See also
Attention
This function can be used together with GetRTLog to actively obtain real-time events from the machine after the machine is connected successfully.
Note
Applicable to BW, TFT, and IFACE devices

◆ GetRTLog()

VARIANT_BOOL GetRTLog ( LONG  dwMachineNumber)

To get a real-time event from the buffer of the PC and trigger this event.

Parameters
Parameter description:
name type param direction description of param
dwMachineNumber LONG [in] Machine ID
Returns
Value description:
name type description of value
True BOOL Function execution success
False BOOL Function execution failure
See also
Attention
This function can be used together with ReadRTLog to actively obtain real-time events from the machine after the machine is connected successfully.
Note
Applicable to BW, TFT, and IFACE devices