PullSDK Development Guide v2.0
PullSDK Development Guide v2.0
Date: 2021.10.25
Copyright:
Release history:
contact information:
Software Park Phase III, Jimei District, Xiamen city, Fujian Province
Web:www.zkteco.com
www.zkteco.com
1.Overview of the PulISDK Interfaces.....................................................................................5
2.Description of the PullSDK Interface Technology.......................................................... 5
3.Installation of the PullSDK Interface.............................................................................. 6
4.Detailed Description of the PullSDK Interface Functions.......................................... 6
4.1 Connect............................................................................................................................... 6
4.2 ConnectExt.........................................................................................................................7
4.3 Disconnect.........................................................................................................................8
4.4 SetDeviceParam.................................................................................................................8
4.5 GetDeviceParam.................................................................................................................9
4.6 ControlDevice.................................................................................................................10
4.7 SetDeviceData.................................................................................................................11
4.8 GetDeviceData.................................................................................................................12
4.9 GetDeviceDataCount.......................................................................................................13
4.10 DeleteDeviceData.........................................................................................................14
4.11 GetRTLog.........................................................................................................................15
4.12 GetRTLogExt...................................................................................................................16
4.13 SearchDevice.................................................................................................................17
4.14 ModifyIPAddress...........................................................................................................18
4.15 PullLastError...............................................................................................................19
4.16 SetDeviceFileData.......................................................................................................19
4.17 GetDeviceFileData.......................................................................................................20
4.18 ProcessBackupData.......................................................................................................20
4.19 BufferToProtocolData.................................................................................................21
4.20 ProtocolDataToBuffer.................................................................................................21
4.21 SetParameters...............................................................................................................22
4.22 GetPullSDKVersion.......................................................................................................22
4.23 GetDeviceFileDataToPath...........................................................................................23
5. Appendix..................................................................................................................................... 23
5.1 Attached Table 1:Detailed Description of Interface Files......................23
5.2 Attached Table 2:Description of Controller Parameters............................ 24
5.3 Attached Table 3:Description of ControlDevice Parameters ....................31
5.4 Attached Table 4:Description of Structure of Function Tables..............32
5.4.1 Description of ladder control meter structure.................................... 32
5.4.1.1 Card number information table structure(user)....................32
5.4.1.2 pin authorization table(userauthorize).................................. 32
5.4.1.3 Holiday table(holiday).................................................................... 33
5.4.1.4 timezone table(timezone).............................................................. 34
5.4.1.5 Event table(transaction).............................................................. 35
5.4.1.6 First card door opening table(firstcard).............................. 36
5.4.1.7 Multicard door opening combination table(multimcard)......37
5.4.1.8 Linkage control i / o table(inoutfun).................................... 37
5.4.1.9 9.0Fingerprint template table(template)................................ 39
5.4.1.10 10.3Fingerprint template table (only on devices supporting
fingerprint 10.0)(templatev10).................................................................. 39
5.4.1.11 Loss report card (losscard).......................................................... 40
5.4.2 Old schema table structure instructions................................................ 40
5.4.2.1 Card number information table structure(user)....................40
5.4.2.2 Pin authorization table(userauthorize).................................. 41
5.4.2.3 holiday table(holiday).................................................................. 42
5.4.2.4 timezone table(timezone).............................................................. 42
5.4.2.5Event table(transaction)................................................................ 44
5.4.2.6 First card door opening table(firstcard).............................. 45
5.4.2.7 Multicard door opening combination table(multimcard)......45
5.4.2.8 Linkage control i/o table(inoutfun)........................................ 46
5.4.2.9 9.0 Fingerprint template table(template).............................. 47
5.4.2.10 10.3 Fingerprint template table (only on devices supporting
fingerprint 10.0)(templatev10).................................................................. 48
5.4.3 New schema table structure instructions................................................ 49
5.4.3.1 Card number information table structure(user)....................49
5.4.3.2 Pin authorization table(userauthorize).................................. 49
5.4.3.3 holiday table(holiday).................................................................. 50
5.4.3.4 timezone table(timezone).............................................................. 51
5.4.3.5 Event table(transaction).............................................................. 52
5.4.3.6 First card door opening table(firstcard).............................. 53
5.4.3.7 Multicard door opening combination table(multimcard)......53
5.4.3.8 Linkage control i/o table(inoutfun)........................................ 54
5.4.3.9 9.0 Fingerprint template table(template).............................. 55
5.4.3.10 10.3 Fingerprint template table (only on devices supporting
fingerprint 10.0)(templatev10).................................................................. 55
5.4.3.11 Loss report card(losscard)............................................................ 56
5.4.3.12 Antisubmarine table (antipassback)............................................ 56
5.4.3.13 Card number information table (cardinfo)................................ 56
5.4.3.14 Extended user (extuser).................................................................. 57
5.4.3.15 One person with more cards (mulcarduser)................................ 57
5.4.3.16 Auxiliary output setting table (outrelaysetting)................57
5.4.3.17 Daylight saving time (time setting) table(DSTSetting)......57
5.5 Attached Table5:Description of Error Codes in the Returnd Values......58
5.6 Attached Table 6:Description of Event Types and Code.............................. 60
5.7 Attached Table 7:Description of the data format returned by the parameter
Buffer in the GetRTLog function.................................................................................... 65
5.8 Attached Table 8:Description of data format returned by parameter Buffer
in GetRTLogExt function.....................................................................................................66
1.Overview of the PullSDK Interfaces
The PullSDK interfaces are a group of functions, which are used to access the data of the C3
and C4 access control panels.
PullSDK enables the developers of final application programs to aces the aces control panel
more visually, conveniently, and concisely. The PullSDK interface provides the following
functions:
Read and set the controller parameters
Read, set, and delete the related information (fr example, time segment, user information, and
holiday information) of the controller
In the eyes of the developers of final application programs, the PullSDK interfaces are a
group of extract interfaces that are used to set and get the data in the aces control panel. It seems
that the developers are using the most universal SQL sentences while accessing the user data. In
the eyes of the developers of application programs, the PullSDK interfaces seem to be a database
server.
The PullSDK interfaces support the TCP/IP and RS485 communication protocol.
The PullSDK interfaces are developed by using the ( language. Data communication is highly
optimized, thus turning the PullSDK interfaces into the concise and efficient access interfaces.
Initially, the PullSDK interfaces are designed by referring to the SQL, but the most commonly
used service model is the first consideration. Generally, the PullSDK interfaces are a group of
elaborately abstracted interfaces, which attain a good balance between design, implementation,
and use.
3.Installation of the PullSDK Interface
The PullSDK interface functions are contained in the plcommpro.dll file, which relies upon
several other files. You need to copy the following five DLL files together to the system directory
under Windows (windows / system32 under 32-bit operating system , windows / syswow64 under
64 bit operating system).After the file is copied, it does not need to be registered. It can be used
directly according to the following interface functions.
Functions
4.1 Connect
4.2 ConnectExt
4.3 Disconnect
4.4 SetDeviceParam
4.5 GetDeviceParam
int GetDeviceParam(void *handle, char *Buffer, int BufferSize, const char *Items)
Read the controller Parameter, such as equipment number, door magnetic Type, lock driving
time, card reading interval, etc
Parameter
The following table describes the parameters:
Parameter
Type Parameter properties Parameter description
names
handle void * [in] connection handle
The buffer used to receive
return data. The return data
is in text format and may be
Buffer char * [in/out]
multiple parameter values.
Each parameter is separated
by commas.
The size of the buffer
BufferSize int [in]
used to receive Return data
The device parameter
names to be read are called
the table. Multiple names
can be separated by
Items const char * [in] commas. At most 30
parameters can be read at a
time (see Table 2 for the
readable parameter value
attribute).
Return
Return Value Description:
Return value Return Value Description
0 success
Less than 0 failed,see attached table 5 for information on error codes
Note
4.6 ControlDevice
int ControlDevice(void *handle, LONG OperationID, LONG Param1, LONG Param2, LONG
Param3, LONG Param4, const char *Options)
Control controller action。
Parameter
The following table describes the parameters:
Parameter
Type Parameter properties Parameter description
names
handle void * [in] connection handle
Operation contents: 1
means lock output or
auxiliary output, 2 means
cancel alarm, 3 restart the
equipment, 4 enable and
disable normally open (here,
OperationID LONG [in]
the disabled normally open
includes first open normally
open, five consecutive card
enabled normally open, and
remotely enabled normally
open).
When OperationID is
output operation, if param2
is door output, this
parameter represents the
number of the door in the
equipment; if param2 is
auxiliary output, this
Param1 LONG [in]
parameter represents the
number of the auxiliary
output port in the
equipment. For details, see
attached table 3; When
OperationID is cancel alarm,
the default value is 0
Param2 LONG [in] When OperationID is
output operation, this
parameter indicates the
address type of the
equipment output point (1:
lock output, 2: auxiliary
output). See attached table 3
for details; When
OperationID is cancel alarm,
the default value is 0; When
OperationID is 4, i.e.
normally open, this
parameter indicates whether
to normally open or disable
normally open (0: disabled;
1: enabled)
When OperationID is
output operation, this
parameter indicates the door
opening time (0 means
Param3 LONG closed, 255 means normally
open, the value range is 1 ~
60 (seconds)), and the
default value is 0
4.7 SetDeviceData
4.8 GetDeviceData
int GetDeviceData(void *handle, char *Buffer, int BufferSize, const char *TableName, const
char *FieldNames,const char *Filter, const char *Options)
Reading data from the device is used to read card swiping records, time periods, user
information, holiday settings and other data. The data can be one record or multiple records.
Parameter
The following table describes the parameters:
Parameter
Type Parameter properties Parameter description
names
handle void * [in] connection handle
The buffer used to receive
return data. The return data
is in text format and may be
Buffer char * [in]
multiple records. Each
record is separated by
\r\n
The size of the buffer
BufferSize int [in]
used to receive return data
Data table name. see
TableName const char * [in]
attached Table IV for
currently available table
names
A list of field names.
Multiple fields are separated
by \t, and "*" indicates all
FieldNames const char * [in]
fields. At this time, the first
row of the return data field
is the field name
Conditions for reading
data. When a single string
composed of "field name
operator value", multiple
conditions can be supported,
Filter const char * [in] separated by \ T, as follows:
4.9 GetDeviceDataCount
int GetDeviceDataCount(void *Handle, const char *TableName, const char *Filter,const char
*Options)
Read the total number of records in the device. Return specifies the number of records of the
data.
Parameter
The following table describes the parameters:
Parameter
Type Parameter properties Parameter description
names
handle void * [in] connection handle
Data table name. see
attached Table IV for
TableName const char * [in]
currently available table
names
It is empty by default and
Filter const char * [in]
used for extension;
It is empty by default and
Options const char * [in]
used for extension;
Return
Return Value Description:
Return value Return Value Description
When return is 0 or a positive number, it indicates the success of the
0
operation, and its value is the number of records
Less than 0 failed,see attached table 5 for information on error codes
Note
4.10 DeleteDeviceData
4.11 GetRTLog
int GetRTLog(void *handle,char *Buffer, int BufferSize)
Obtain the real-time event records generated by the equipment, as well as the door status and
alarm status of the equipment.
Parameter
The following table describes the parameters:
Parameter
Type Parameter properties Parameter description
names
handle void * [in] connection handle
The buffer used to receive
return data. The return data
is in text format.
There are two types of
data stored in the buffer, one
is real-time event recording,
and the other is door status /
alarm status. The data
returned with this function
can only be one of them at a
Buffer char * [in] time.If it is a real-time event
record, multiple event
records can be returned at
the same time (depending on
the number of event records
in the real-time monitoring
buffer in the device at the
current time).see attached
table 7 for detailed data
format in buffer。
4.12 GetRTLogExt
4.13 SearchDevice
4.14 ModifyIPAddress
4.15 PullLastError
int PullLastError()
The function is used to Obtain the returned error code.If an error code return fails by using other
error codes,this function can be called to obtain the error code.For example,if 0 is returned when
an equipment connection fails by calling Connect(),you can run this function to obtain current
error code.
Parameter description
None
Return
Return error ID number
Note
4.16 SetDeviceFileData
4.18 ProcessBackupData
4.19 BufferToProtocolData
4.20 ProtocolDataToBuffer
4.21 SetParameters
4.22 GetPullSDKVersion
4.23 GetDeviceFileDataToPath
5. Appendix
Four-door controller
Read
Interlock InterLock 1 :InterLock Door 1 and Door 2
/write
mutually
Door1ForcePassWord
Door2ForcePassWord Read
Coercion code Maximum 8 bits
Door3ForcePassWord /write
Door4ForcePassWord
Door1SupperPassWord
Emergency Door2SupperPassWord Read
Maximum 8 bits
password Door3SupperPassWord /write
Door4SupperPassWord
Door1CloseAndLock
Lock at door Door2CloseAndLock Read 1: Enabled
closing Door3CloseAndLock /write 0 : Disabled
Door4CloseAndLock
Door1SensorType
0:Not available
Door2SensorType Read
Door senor type 1: Normal open
Door3SensorType /write
2:Normal closed
Door4SensorType
The set range(0~255)
Door1Drivertime
0 :Normal closed
Lock drive time Door2Drivertime Read
255 : Normal open
length Door3Drivertime /write
1~254 :Door-opening duration
Door4Drivertime
Note:The ladder control has 120 doors
Door1Detectortime
Timeout alarm
Door2Detectortime Read The set range(0~255)
duration of door
Door3Detectortime /write Unit :second
magnet
Door4Detectortime
1:Fingerprint
Door1VerifyType
4 :Card
Door2VerifyType Read
Verify mode 6:Card or fingerprint
Door3VerifyType /write
10:Card and fingerprint
Door4VerifyType
11: Card and Password
Door1MultiCardOpenDoor
Multi-card open Door2MultiCardOpenDoor Read 0 :Disabled
door Enable Door3MultiCardOpenDoor /write 1: Enabled
Door4MultiCardOpenDoor
Door1FirstCardOpenDoor
Opening the door 0: Disabled
Door2FirstCardOpenDoor Read
through the first
Door3FirstCardOpenDoor /write
card 1: First card normal open
Door4FirstCardOpenDoor
Active time
Door1ValidTZ The default value of 0 indicates that the
segment of the door
Door2ValidTZ Read lock is not activated
(time segment in
Door3ValidTZ /write
which a valid
Door4ValidTZ Note: the ladder control has 120 doors
punch)
Door1KeepOpenTimeZone
Normal-open time
Door2KeepOpenTimeZone Read Default 0(the parameter is not set)
segement of the
Door3KeepOpenTimeZone /write Note: the ladder control has 120 doors
door
Door4KeepOpenTimeZone
Door1Intertime
Door2Intertime Read
Punch interval 0 means no interval (unit:second)
Door3Intertime /write
Door4Intertime
Read 0 : Disabled
MCU watchdog WatchDog
/write 1: Enabled
DateTime= ((Year-2000)*12*31 +
(Month -1)*31 + (Day-1))*(24*60*60)
+ Hour* 60 *60 + Minute*60 + Second;
For example, the time to be set is
2010-10-26 20:54:55 after conversion
DateTime=347748895;Resolution
method:
If you get
Synchronization Write
DateTime “DateTime = 347748895”;
controller time only
Then:
Second = DateTime % 60;
Minute = ( DateTime / 60 ) % 60;
Hour = ( DateTime / 3600 ) % 24;
Day = ( DateTime / 86400 ) % 31 +
1;
Month= ( DateTime / 2678400 ) % 12 +
1;
Year = (DateTime / 32140800 ) +
2000;
Read 0: Disabled
Four doors to two Door4ToDoor2
/write 1: Enabled
Cancel door Door1CancelKeepOpenDay Date saved when canceling normally
Read only
normally open date Door2CancelKeepOpenDay open
Door3CancelKeepOpenDay
Door4CancelKeepOpenDay Note: the ladder control has 120 doors
SD card backup Read
BackupTime 1~24,Set to integer
time /write
Display parameters
Read 0:Never Show(default)
of daylight saving ~DSTF
/write 1:show
time
Enablement Read
parameters of /write 0:Never start(default)
DaylightSavingTimeOn
daylight saving 1:start
time
Enable mode of Read
0:mode 1
daylight saving DLSTMode /write
1:mode 2
time
1 is currently daylight saving time
Daylight saving Read
CurTimeMode 2 is not daylight saving time, and the
time marker /write
firmware is used internally
Start time of
Read The value have 4
daylight saving DaylightSavingTime
/write bytes:”month-date-hour-minute”
time mode
Daylight saving
Read The value have 4
time mode 1 end StandardTime
/write bytes:”month-date-hour-minute”
time
Daylight saving
Read
time mode 2 start WeekOfMonth1 The value range are 1 ~ 12
/write
time: month
Start of daylight
Read
saving time mode WeekOfMonth2 The value range are 1 ~ 6
/write
2: weeks
Daylight saving
Read
time mode 2 start: WeekOfMonth3 The value range are 1~7
/write
day of week
Daylight saving
Read
time mode 2 WeekOfMonth4 The value range are 0~23
/write
start :Hours
Start of daylight
Read
saving time mode WeekOfMonth5 The value range are 0~59
/write
2: minutes
Daylight saving
Read
time mode 2 end WeekOfMonth6 The value range are 1~12
/write
time: month
End of daylight
Read
saving time mode WeekOfMonth7 The value range are1~6
/write
2: what week
End of daylight
Read
saving time mode WeekOfMonth8 The value range are 1~7
/write
2: day of week
Daylight saving
Read
time mode 2 WeekOfMonth9 The value range are 0~23
/write
ends:Hours
End of daylight
Read
saving time mode WeekOfMonth10 The value range are 0~59
/write
2: minutes
Fingerprint
Read
comparison MThreshold The value range are 0~100
/write
threshold
Read head
The four Wiegand heads do not
configuration
distinguish the number one.
Descripti
Operation Param1 Param2 Param3 Param4 Options
on
ID
0: disable
255: normal
1: Door open state
output 1~60: normal
Door number 2: auxiliary open or the Expansion
Output or auxiliary output(the duration of parameter
1 reserved
operation output address type normal open is null
number of output (If Param2=1,
operation) the value of
Param3 makes
sense)
Expansion
Cancel 0(null) 0(null) 0(null) parameter
2 reserved
alarm is null
Expansion
reboot 0(null) 0(null) 0(null) parameter
3 reserved
device is null
Enable/ Expansion
0:Disable 0(null)
4 disable Door number reserved parameter
1:Enable
normal is null
open state
Note: If OperationID=1, Param2 determine the Param1 value is door number or auxiliary output
number. If Param1 is door number, the max value is the door number that the device permitted. If
the Param1 is auxiliary output number, the max value is the auxiliary output number that the
device permitted.
0F0000000000000000000000000
000
F00000000000000000000000000
000
5.4.1.5Event table(transaction)
0F0000000000000000000000000
Primary
2 DoorID 30 string 000
key
F00000000000000000000000000
000
and so on
Primary
3 TimezoneID 4 int
key
0 any;
3 InAddr 1 char
1 door 1;
2 doors 2;
3 door 3;
4 doors 4;
0 any;
1 auxiliary input 1;
2 auxiliary input 2;
3 auxiliary input 3;
4 auxiliary input 4;
Output type 0 refers to door lock
4 OutType 1 char
and 1 refers to auxiliary output
OutAddr indicates lock:
1 door lock 1;
2 door lock 2;
3 door lock 3;
4 door lock 4;
1 auxiliary output 1;
2 auxiliary output 2;
3 auxiliary output 3;
4 auxiliary output 4;
5 auxiliary output 5;
6auxiliary output 6
Output action time: 0 off, 1 ~ 254
6 OutTime 1 char
on, N seconds, 255 normally open
7 Reserved 1 char Reserve to ensure alignment
0: invalid flag;
3: Stress markers
5 Template 608 string Fingerprint template
10.0)(templatev10)
3: Stress markers
LONG_B
6 Template 2080 Fingerprint template
YTE_T
7 Resverd 1 char reservefield
8 EndTag 1 char Firmware internal use
1 denotes lock1;
2 denotes lock2;
4 denotes lock3;
AuthorizeDoorI Primary
3 4 int
d key 5 denotes lock1 and lock3;
8 denotes lock4;
1<<(1-1)+1<<(2-1)+1<<(3-1)+1<
<(4-1)=15
or(1111)2 =(15)10
3 Verified 1 char
11 represents "card plus
password" authentication;
0F0000000000000000000000000
Primary
2 DoorID 30 string 000
key
F00000000000000000000000000
000
and so on
Primary
3 TimezoneID 4 int Max 20
key
0 any;
1 door 1;
2 doors 2;
4 doors 4;
0 any;
1 auxiliary input 1;
2 auxiliary input 2;
3 auxiliary input 3;
4 auxiliary input 4;
Output type 0 refers to door lock
4 OutType 1 char
and 1 refers to auxiliary output
OutAddr indicates lock:
1 door lock 1;
2 door lock 2;
3 door lock 3;
4 door lock 4;
1 auxiliary output 1;
2 auxiliary output 2;
3 auxiliary output 3;
4 auxiliary output 4;
5 auxiliary output 5;
6auxiliary output 6;
Output action time: 0 off, 1 ~ 254
6 OutTime 1 char
on, n seconds, 255 normally open
7 Reserved 1 char Reserve to ensure alignment
0: invalid flag;
3: Stress markers
5 Template 608 string Fingerprint template
10.0)(templatev10)
0: invalid flag;
3: Stress markers
LONG_B
6 Template 2080 Fingerprint template
YTE_T
7 Resverd 1 char reservefield
8 EndTag 1 char Firmware internal use
5.4.3 New schema table structure instructions
1 denotes lock1;
2 denotes lock2;
4 denotes lock3;
8 denotes lock4;
1<<(1-1)+1<<(2-1)+1<<(3-1)+1<
<(4-1)=15
or(1111)2 =(15)10
0 any;
1 door 1;
2 doors 2;
3 door 3;
3 InAddr 1 char
4 doors 4;
The input point InAddr is an
auxiliary input:
0 any;
1 auxiliary input 1;
2 auxiliary input 2;
3 auxiliary input 3;
4 auxiliary input 4;
Output type 0 refers to door lock
4 OutType 1 char
and 1 refers to auxiliary output
OutAddr indicates lock:
1 door lock 1;
2 door lock 2;
5 OutAddr 1 char
3 door lock 3;
4 door lock 4;
When the output type ‘OutType’
is 1, the output point ‘OutAddr’
represents auxiliary output:
1 auxiliary output 1;
2 auxiliary output 2;
3 auxiliary output 3;
4 auxiliary output 4;
5 auxiliary output 5;
6auxiliary output 6
Output action time: 0 off, 1 ~ 254
6 OutTime 1 char
on, N seconds, 255 normally open
7 Reserved 1 char Reserve to ensure alignment
0: invalid flag;
3: Stress markers
5 Template 608 string Fingerprint template
10.0)(templatev10)
3: Duress markers
LONG_B
6 Template 2080 Fingerprint template
YTE_T
7 Resverd 1 char Reserve field
8 EndTag 1 char Firmware internal use
Returned Values
207 Password open the door The user uses the password to generate a door opening event
208 Super user open the door Event generated when the user is a super user
When the door is configured as locked state, the door cannot be
209 The door is locked opened by using the door switch button and this event will be
triggered.
210 Fire open Fire protection function, use all doors are always open
Use event in ladder control. After the super user starts normally
211 Shutdown of superuser
open, swipe the card again to close normally open state.
When any auxiliary input point breaks down, this normal
220 Auxiliary Input Disconnected
event is triggered.
When any auxiliary input point has short circuited, this
221 Auxiliary Input Shorted
normal event is triggered.
222 Background verification success
Background verification network
223
instability
Enable antisubmarine in the
224
background
Actually that obtain door status
255 See Attachment 7
and alarm status
200
DSS status Alarm (Indicates
(0: no DSS; status (1: that the
Temporarily Tempor
Door/Alar 1: door alarm; 2: verification
Time not in arily not
m Status closed; door mode is
use 255 in use
2: door opening “none”);
open) timeout) not
in use
The
Entry/Ex
Door No., Event type verification
Realtime Pin it
namely code. See mode is the
Event Time (Employee Card No. status:
lock Attachment same as the
Records No.) (0:
number 6 for details. door
entry;
opening
1: exit:
mode of
2: none)
controller
parameters
described in
Attachment
2.
Note:
(1) The device can temporarily save a maximum of 30 realtime event records. You can call
GetRTLog to check whether the cache contains event records. If so, the device returns all records
(30 entries at most) in the current cache; otherwise, the device returns the door and alarm status
events referred above.
(2) The door status records contain the open/closed status of current door (on the premise that
the DSS is connected). Additionally, you can judge the current door status through “Door already
open” (Event code: 200) and “Door already closed” (Event code: 201).
(3) When the record adopts the door/alarm status, the door status contained in all records
actually is the door status (four doors at most) of all doors of the device. 4 bytes are respectively
represents four door status, arranged in an ascending order separately represent doors 1 to 4.
For example, if this value is 0x01020001, door No.1 is closed, door No.2 is not configured with
the DSS, door No.3 is door opened, and door No.4 is door closed. Contained in the alarm status
(and Opening Timeout) (The Second place) the same that 4 bytes are respectively represents four
door status, behind two place of Each byte respectively represents whether that have alarm or
door open is overtime, arranged in an ascending order separately represent alarm or door
opening timeout. For example, if this value is 0x01020001, door No.1 is closed, door No.3 means
door opening timeout, door No.2 and No.4 means alarm.
(4)When the record adopts “realtime event” status and type of event is Triggered Linkage Event
(the code of type event: 6), the sixth place saved Linkage Event Triggered, and the second is for
reuse of Linkage ID, It have software for the device synchronous linkage setting (usually the
linkage in the ID value of software end database).
(5)The values of the three types in the event point number can be corresponding to the
silkscreen on the access control panel. For example, door number 1 corresponds to Lock1 on the
control panel, auxiliary input 1 corresponds to Aux In1 on the control panel, and auxiliary output
2 corresponds to Aux Out2 on the control panel (Note: The screen printing contents may be
different depending on the device model, but the numbers correspond.
The data in Buffer is a string record in PUSH format. If the record is a real-time event record,
it contains multiple single records separated by '\r\n'. If the data Type obtained is the door state
A single record is divided into two string formats of real-time event record and door state
alarm state, and each format is divided into multiple fields segmented by '\ t'.The two string
String format
type=rtstate\ttime=%s\tsensor=%02X\trelay=%02X\talarm=%02X%02X%02X%02X%\r\n
Description:
type=rtstate\ttime=xx\tsensor=AA\trelay=CC\talarm=DDEEFFGGHHIIJJKK\r\n
‘sensor’ represents the status of door status, each door occupies two binary bits, AA
represents 1-4 doors, and 1 occupies the first and second bits of the first byte, and so on.
0b00 indicates that the Type of the current door status is set to no door status, 0b01
indicates that the current door is closed (with door status), and 0b10 is open (without door
status).
‘relay’ represents the relay state, each door occupies a binary bit, 0b0 represents the
Door/Alarm
Status relay closing, 0b1 represents the relay disconnection, the first digit is the relay state of 1
‘Alarm’ indicates the alarm status. Each door occupies one byte and can express up to
8 alarms. DD is the alarm status of one door, and so on. At present, the alarm is defined as
follows:
type=rtlog\ttime=%s\tpin=%u\tcardno=%u\teventaddr=%d\tevent=%d\tinoutstatus=
%d\tverifytype=%d\r\n
event ‘time’ indicates the current time in the format of %04d-%02d-%02d %02d:%02d:%02d;
‘Eventaddr’ indicates the event point number,Including door number (i.e. lock
number), auxiliary input number, auxiliary output number;
‘verifytype’ indicates the verification mode, which is the same as the opening mode in
(5) When parsing a single record, it is necessary to parse the string format records in the Buffer.