Device Network SDK (Queue Management) - Developer Guide - V6.0.2.X - 20230330
Device Network SDK (Queue Management) - Developer Guide - V6.0.2.X - 20230330
Device Network SDK (Queue Management) - Developer Guide - V6.0.2.X - 20230330
Developer Guide
Device Network SDK (Queue Management) Developer Guide
Legal Information
TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THE DOCUMENT IS PROVIDED "AS IS"
AND "WITH ALL FAULTS AND ERRORS". OUR COMPANY MAKES NO REPRESENTATIONS OR
WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. IN NO EVENT
WILL OUR COMPANY BE LIABLE FOR ANY SPECIAL, CONSEQUENTIAL, INCIDENTAL, OR INDIRECT
DAMAGES, INCLUDING, AMONG OTHERS, DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS
INTERRUPTION OR LOSS OF DATA, CORRUPTION OF SYSTEMS, OR LOSS OF DOCUMENTATION,
WHETHER BASED ON BREACH OF CONTRACT, TORT (INCLUDING NEGLIGENCE), OR OTHERWISE, IN
CONNECTION WITH THE USE OF THE DOCUMENT, EVEN IF OUR COMPANY HAS BEEN ADVISED OF
THE POSSIBILITY OF SUCH DAMAGES OR LOSS.
i
Device Network SDK (Queue Management) Developer Guide
Contents
Chapter 1 Overview .................................................................................................................... 1
1.1 Introduction ........................................................................................................................... 1
1.2 Update History ....................................................................................................................... 2
Chapter 2 Typical Applications .................................................................................................... 4
2.1 Alarm and Event Receiving ..................................................................................................... 4
2.1.1 Configure Queue Management Alarm .......................................................................... 4
2.1.2 Receive Alarm/Event in Arming Mode .......................................................................... 8
2.1.3 Receive Alarm/Event in Listening Mode ..................................................................... 11
2.2 Search Queue Management Report or Data ........................................................................ 14
Chapter 3 API Reference ........................................................................................................... 20
3.1 NET_DVR_Cleanup ............................................................................................................... 20
3.2 NET_DVR_GetErrorMsg ....................................................................................................... 20
3.3 NET_DVR_GetLastError ........................................................................................................ 21
3.4 NET_DVR_Init ....................................................................................................................... 21
3.5 NET_DVR_Login_V40 ........................................................................................................... 21
3.5.1 fLoginResultCallBack ................................................................................................... 22
3.6 NET_DVR_Logout ................................................................................................................. 23
3.7 NET_DVR_SetSDKInitCfg ...................................................................................................... 23
3.8 NET_DVR_GetSTDAbility ...................................................................................................... 25
3.9 NET_DVR_GetSTDConfig ...................................................................................................... 25
3.10 NET_DVR_MIME_UNIT ...................................................................................................... 26
3.11 NET_DVR_SetSTDConfig .................................................................................................... 27
3.12 NET_DVR_STDXMLConfig ................................................................................................... 28
3.13 NET_DVR_CloseAlarmChan_V30 ....................................................................................... 29
3.14 NET_DVR_GetDVRConfig ................................................................................................... 29
3.15 NET_DVR_SetDVRConfig .................................................................................................... 31
ii
Device Network SDK (Queue Management) Developer Guide
iii
Device Network SDK (Queue Management) Developer Guide
iv
Device Network SDK (Queue Management) Developer Guide
v
Device Network SDK (Queue Management) Developer Guide
Chapter 1 Overview
This manual provides the integration methods and flows based on HCNetSDK for queue
management applications.
1.1 Introduction
Queue management is applicable to analyze the queuing status of public places (e.g., market,
ticket office), it provides the functions of people queuing-up detection and waiting time detection.
You can configure these two kinds of alarms for receiving the alarm information in the third-party
platform or system, and search for the detection reports or data.
1
Device Network SDK (Queue Management) Developer Guide
when the queuing-up duration of target person A is longer than or equal to 30 minutes, the alarm
will be triggered and uploaded according to the configured uploading time interval.
2
Device Network SDK (Queue Management) Developer Guide
added two sub nodes "countTriggerType" (triggering type of people queuing-up alarm) and
"durationTime" (queuing-up status (number of queuing-up persons) keeping duration) to the
node "rule" (rule properties).
3
Device Network SDK (Queue Management) Developer Guide
4
Device Network SDK (Queue Management) Developer Guide
Steps
5
Device Network SDK (Queue Management) Developer Guide
Note
The queue management parameters, alarm linkage actions, and arming schedules can be directly
configured by logging in to device via web browser.
1. Call NET_DVR_STDXMLConfig to pass through the request URL: GET /ISAPI/Intelligent/
channels/<ID>/capabilities for getting intelligent channel capability to check if the device
supports queue management.
The intelligent channel capability is returned in the message XML_IntelliCap by output pointer
(lpOutputParam).
If the node <isSupportPersonQueueDetection> is returned in the capability message, it
indicates that queue management function is supported and you can perform the following
steps.
Otherwise, this function is not supported, please end this task.
2. Optional: Call NET_DVR_STDXMLConfig to pass through the request URL: GET /ISAPI/
Intelligent/channels/<ID>/personQueueDetection/capabilities?format=json for getting the
queue management capability to check the supported configuration parameters.
The queue management capability is returned in the message
JSON_PersonQueueDetectionInfoCap by output pointer (lpOutputParam).
3. Optional: Call NET_DVR_STDXMLConfig to pass through the request URL: GET /ISAPI/
Intelligent/channels/<ID>/personQueueDetection?format=json for getting default or
configured queue management parameters for reference.
The queue management parameters are returned in the message
JSON_PersonQueueDetectionInfo by the output pointer (lpOutputParam).
4. Call NET_DVR_STDXMLConfig to pass through the request URL: PUT /ISAPI/Intelligent/
channels/<ID>/personQueueDetection?format=json and set the input pointer (lpInputParam)
to the message JSON_PersonQueueDetectionInfo for setting queue management parameters.
5. Configure linkage action for queue management alarm.
1) Call NET_DVR_GetSTDAbility with
NET_DVR_GET_EVENT_TRIGGERS_CAPABILITIES
(command No.: 3501) to get alarm linkage capability of device.
The alarm linkage capability is returned in the message XML_EventTriggersCap by the output
buffer (lpOutBuffer) in structure NET_DVR_STD_ABILITY .
2) Optional: Call NET_DVR_GetSTDConfig with
NET_DVR_GET_PERSONQUEUE_TRIGGER
(command No.: 4406) to get the default or configured linkage actions of queue management
alarm for reference.
The linkage actions are returned in the structure NET_DVR_EVENT_TRIGGER by the output
buffer (lpOutBuffer) in structure NET_DVR_STD_CONFIG .
3) Call NET_DVR_SetSTDConfig with
NET_DVR_SET_PERSONQUEUE_TRIGGER
6
Device Network SDK (Queue Management) Developer Guide
(command No.: 4407), and then set condition buffer (lpCondBuffer) and input buffer
(lpInBuffer) in structure NET_DVR_STD_CONFIG to 4-byte channel No. and
NET_DVR_EVENT_TRIGGER , respectively, for setting the linkage actions of queue
management alarm.
Note
To receive alarms in arming mode via platform, the linkage action must be set to "center"
(upload to alarm center).
6. Configure arming schedule of queue management alarm.
1) Call NET_DVR_GetSTDAbility with
NET_DVR_GET_PERSONQUEUE_SCHEDULE_CAPABILITIES
(command No.: 4408) to get the arming schedule capability of queue management device.
The arming schedule capability is returned in the message XML_Cap_Schedule by the output
buffer (lpOutBuffer) of structure NET_DVR_STD_ABILITY .
2) Optional: Call NET_DVR_GetSTDConfig with
NET_DVR_GET_PERSONQUEUE_SCHEDULE
(command No.: 4409) and set condition buffer (lpCondBuffer) in structure
NET_DVR_STD_CONFIG to 4-byte channel No. for getting the default or configured arming
schedule of queue management for reference.
The arming schedule parameters are returned in the structure NET_DVR_EVENT_SCHEDULE
by the output buffer (lpOutBuffer) in structure NET_DVR_STD_CONFIG .
3) Call NET_DVR_SetSTDConfig with
NET_DVR_SET_PERSONQUEUE_SCHEDULE
(command No.: 4410), and then set condition buffer (lpCondBuffer) and input buffer
(lpInBuffer) in structure NET_DVR_STD_CONFIG to 4-byte channel No. and
NET_DVR_EVENT_SCHEDULE , respectively, for setting arming schedule of queue
management.
7. Optional: Set the uploading message type (lCommand) in alarm callback function to
"COMM_VCA_ALARM" (macro definition value: 0x4993) for receiving queue management
alarms, i.e., people queuing-up alarm, waiting time detection alarm, and real-time queue
management alarm, in arming mode (refer to Receive Alarm/Event in Arming Mode ) or
listening mode (refer to Receive Alarm/Event in Listening Mode ).
The people queuing-up alarm is uploaded in the message
JSON_EventNotificationAlert_PeopleQueuingUpAlarmMsg ; the waiting time detection alarm is
uploaded in the message JSON_EventNotificationAlert_WaitingTimeDetectionAlarmMsg ; and
the real-time queue management alarm is uploaded in the message
JSON_EventNotificationAlert_RealTimeQueueManagementDataMsg .
What to do next
Call NET_DVR_Logout and NET_DVR_Cleanup to log out from device and release the resources.
7
Device Network SDK (Queue Management) Developer Guide
● Make sure you have configured the alarm/event parameters, refer to the typical alarm/event
8
Device Network SDK (Queue Management) Developer Guide
Note
● If the configured alarm is triggered or event occurred, the alarm/event information will be
uploaded by device and returned in the callback function. You can view the alarm/event and
do some processing operations.
● For the integration via device network SDK (HCNetSDK), to receive different types of alarm/
event information, the parameter lCommand (data type to be uploaded) in the configured
callback function should be different (refer to the typical alarm/event configurations). For the
integration via text protocol, the lCommand should be set to "COMM_ISAPI_ALARM"
(command No.: 0x6009) and the input parameter pAlarmInfo in the callback function
MSGCallBack should be set to NET_DVR_ALARM_ISAPI_INFO .
2. Call NET_DVR_SetupAlarmChan_V50 to set up uploading channel.
3. Call NET_DVR_CloseAlarmChan_V30 to close uploading channel and stop receiving alarm or
event information.
Example
Sample Code of Receiving Alarm or Event in Arming Mode
#include <stdio.h>
#include <iostream>
#include "Windows.h"
#include "HCNetSDK.h"
using namespace std;
void main() {
//---------------------------------------
// Initialize
NET_DVR_Init();
//Set connection time and reconnection time
NET_DVR_SetConnectTime(2000, 1);
NET_DVR_SetReconnect(10000, true);
//---------------------------------------
// Log in to device
LONG lUserID;
//Login parameters, including device IP address, user name, password, and so on.
NET_DVR_USER_LOGIN_INFO struLoginInfo = {0};
struLoginInfo.bUseAsynLogin = 0; //Synchronous login mode
strcpy(struLoginInfo.sDeviceAddress, "192.0.0.64"); //Device IP address
struLoginInfo.wPort = 8000; //Service port No.
strcpy(struLoginInfo.sUserName, "admin"); //User name
strcpy(struLoginInfo.sPassword, "abcd1234"); //Password
//Device information, output parameter
NET_DVR_DEVICEINFO_V40 struDeviceInfoV40 = {0};
lUserID = NET_DVR_Login_V40(&struLoginInfo, &struDeviceInfoV40);
if (lUserID < 0)
{
printf("Login failed, error code: %d\n", NET_DVR_GetLastError());
NET_DVR_Cleanup();
return;
}
9
Device Network SDK (Queue Management) Developer Guide
//Enable arming
NET_DVR_SETUPALARM_PARAM_V50 struSetupParamV50={0};
struSetupParamV50.dwSize=sizeof(NET_DVR_SETUPALARM_PARAM_V50);
//Alarm category to be uploaded
struSetupParamV50.byAlarmInfoType=1;
//Arming level
struSetupParamV50.byLevel=1;
if (lHandle < 0)
{
printf("NET_DVR_SetupAlarmChan_V50 error, %d\n", NET_DVR_GetLastError());
NET_DVR_Logout(lUserID);
NET_DVR_Cleanup();
return;
}
Sleep(20000);
//Disarm the uploading channel
if (!NET_DVR_CloseAlarmChan_V30(lHandle))
{
printf("NET_DVR_CloseAlarmChan_V30 error, %d\n", NET_DVR_GetLastError());
NET_DVR_Logout(lUserID);
NET_DVR_Cleanup();
return;
}
//Log out
NET_DVR_Logout(lUserID);
//Release resources
NET_DVR_Cleanup();
10
Device Network SDK (Queue Management) Developer Guide
return;
}
What to do next
Call NET_DVR_Logout and NET_DVR_Cleanup to log out and release resources.
● Make sure you have configured the alarm/event parameters, refer to the typical alarm/event
11
Device Network SDK (Queue Management) Developer Guide
Steps
12
Device Network SDK (Queue Management) Developer Guide
Note
For the integration via device network SDK (HCNetSDK), to receive different types of alarm/
event information, the parameter lCommand (data type to be uploaded) in the configured
callback function should be different (refer to the typical alarm/event configurations). For the
integration via text protocol, the lCommand should be set to "COMM_ISAPI_ALARM" and the
input parameter pAlarmInfo in the callback function MSGCallBack should be set to
NET_DVR_ALARM_ISAPI_INFO .
The alarm/event information is automatically uploaded by the device when the configured
alarm is triggered or event occurred, and the third-party platform or system gets the alarm/
event information from the configured callback function.
5. Call NET_DVR_StopListen_V30 to stop listening and receiving alarm or event information.
Example
Sample Code of Receiving Alarm/Event in Listening Mode
#include <stdio.h>
#include <iostream>
#include "Windows.h"
#include "HCNetSDK.h"
using namespace std;
void main() {
//---------------------------------------
// Initialize
NET_DVR_Init();
//Set connection time and reconnection time
NET_DVR_SetConnectTime(2000, 1);
NET_DVR_SetReconnect(10000, true);
//---------------------------------------
// Log in to device
LONG lUserID;
NET_DVR_DEVICEINFO_V30 struDeviceInfo;
lUserID = NET_DVR_Login_V30("172.0.0.100", 8000, "admin", "12345", &struDeviceInfo);
if (lUserID < 0)
{
printf("Login error, %d\n", NET_DVR_GetLastError());
NET_DVR_Cleanup();
return;
}
//Enable listening
LONG lHandle;
lHandle = NET_DVR_StartListen_V30(NULL,7200, MessageCallback, NULL);
if (lHandle < 0)
{
printf("NET_DVR_StartListen_V30 error, %d\n", NET_DVR_GetLastError());
NET_DVR_Logout(lUserID);
NET_DVR_Cleanup();
return;
}
Sleep(5000);
13
Device Network SDK (Queue Management) Developer Guide
//Disable listening
if (!NET_DVR_StopListen_V30(lHandle))
{
printf("NET_DVR_StopListen_V30 error, %d\n", NET_DVR_GetLastError());
NET_DVR_Logout(lUserID);
NET_DVR_Cleanup();
return;
}
//Log out
NET_DVR_Logout(lUserID);
//Release SDK resource
NET_DVR_Cleanup();
return;
}
What to do next
Call NET_DVR_Logout (if logged in) and NET_DVR_Cleanup to log out and release resources.
14
Device Network SDK (Queue Management) Developer Guide
15
Device Network SDK (Queue Management) Developer Guide
Note
● When setting search time period, the previous search end time returned by device should be
specified as the start time of next search.
● The raw data will be paged and returned by file URL, and the records are sorted from earliest to
latest in the file.
● Up to 4000 records can be returned after searching for once.
Example
16
Device Network SDK (Queue Management) Developer Guide
Figure 2-6 Compare Queuing-Up People Amount for Different Waiting Times
17
Device Network SDK (Queue Management) Developer Guide
18
Device Network SDK (Queue Management) Developer Guide
19
Device Network SDK (Queue Management) Developer Guide
3.1 NET_DVR_Cleanup
Release the resources after the program is ended.
API Definition
BOOL NET_DVR_Cleanup(
);
Return Values
Returns TURE for success, and returns FALSE for failure.
If FALSE is returned, you can call NET_DVR_GetLastError to get the error code.
The available error codes may be returned by this API are 0 and 3. See details in Device Network
SDK Errors .
Remarks
● When calling this API, you cannot call other APIs at the same time.
● NET_DVR_Init and this API should be called by pair. That is, once the NET_DVR_Init is called, you
should call NET_DVR_Cleanup to release the resources when exiting the program.
3.2 NET_DVR_GetErrorMsg
Return the error information of the last operation.
API Definition
char *NET_DVR_GetErrorMsg(
LONG *pErrorNo
);
Parameters
pErrorNo
[OUT] Error code pointer.
Return Values
The return values are the pointers of error information, see Device Network SDK Errors for details.
Remarks
You can call NET_DVR_GetLastError to get the error codes.
20
Device Network SDK (Queue Management) Developer Guide
3.3 NET_DVR_GetLastError
Return the error code of the last operation.
API Definition
DWORD NET_DVR_GetLastError(
);
Return Values
The return values are error codes, see Device Network SDK Errors for details.
Remarks
You can also call NET_DVR_GetErrorMsg to directly get the error information.
3.4 NET_DVR_Init
Initialize the programming environment before calling other APIs.
API Definition
BOOL NET_DVR_Init(
);
Return Values
Returns TURE for success, and returns FALSE for failure.
If FALSE is returned, you can call NET_DVR_GetLastError to get the error code.
The available error codes of this API are 0, 41, and 53. See details in Device Network SDK Errors .
Remarks
Before initializing, you can call NET_DVR_SetSDKInitCfg to set the initialization parameters, such as
supported capabilities, loading path of component libraries (only supported by Linux system), and
so on.
See Also
NET_DVR_Cleanup
3.5 NET_DVR_Login_V40
Log in to the device (supports asynchronous login).
21
Device Network SDK (Queue Management) Developer Guide
API Definition
LONG NET_DVR_Login_V40(
NET_DVR_USER_LOGIN_INFO pLoginInfo,
NET_DVR_DEVICEINFO_V40 lpDeviceInfo
);
Parameters
pLoginInfo
[IN] Login parameters, including device address, user name, password, and so on. See details in
the structure NET_DVR_USER_LOGIN_INFO .
lpDeviceInfo
[OUT] Device information. See details in the structure NET_DVR_DEVICEINFO_V40 .
Return Values
● For asynchronous login, the callback function ( fLoginResultCallBack ) configured in the
structure ( NET_DVR_USER_LOGIN_INFO ) returns the asynchronous login status, user ID and
device information.
● For synchronous login, this API returns -1 for logging failed, and returns other values for the
returned user IDs. The user ID is unique, and it helps to realize the further device operations.
● If -1 is returned, you can call NET_DVR_GetLastError to get the error code.
Remarks
● When bUseAsynLogin in pLoginInfo is 0, it indicates that login is in synchronous mode; when
bUseAsynLogin in pLoginInfo is 1, it indicates that login is in asynchronous mode.
● Up to 2048 users are allowed to log in to HCNetSDK at same time, and the values of returned
UserID are ranging from 0 to 2047.
See Also
NET_DVR_Logout
3.5.1 fLoginResultCallBack
22
Device Network SDK (Queue Management) Developer Guide
3.6 NET_DVR_Logout
Log out from devices.
API Definitions
BOOL NET_DVR_Logout(
LONG lUserID
);
Parameters
lUserID
[IN] User ID, which is returned by NET_DVR_Login_V40 .
Return Values
Returns TURE for success, and returns FALSE for failure.
If FALSE is returned, you can call NET_DVR_GetLastError to get the error code.
The available error codes may be returned by this API are 0, 3, 7, 8, 9, 10, 14, 17, 41, 44, 47, 72,
and 73. See details in Device Network SDK Errors .
3.7 NET_DVR_SetSDKInitCfg
Set initialization parameters.
API Parameters
BOOL NET_DVR_SetSDKInitCfg(
NET_SDK_INIT_CFG_TYPE enumType,
23
Device Network SDK (Queue Management) Developer Guide
Parameters
enumType
[IN] Initialization parameter type. Different type values correspond to different parameters, see
details in the table below.
Return Values
Returns TURE for success, and returns FALSE for failure.
If FALSE is returned, you can call NET_DVR_GetLastError to get the error code.
24
Device Network SDK (Queue Management) Developer Guide
Remarks
This API should be called before calling NET_DVR_Init to initialize and check the dependent
libraries or capabilities.
3.8 NET_DVR_GetSTDAbility
Get the device capabilities.
API Definition
BOOL NET_DVR_GetSTDAbility(
LONG lUserID,
DWORD dwAbilityType,
NET_DVR_STD_ABILITY lpAbilityParam
);
Parameters
lUserID
[IN] Value returned by NET_DVR_Login_V40 .
dwAbilityType
[IN] Capability types, which are different according to different functions.
lpAbilityParam
[IN/OUT] Capability details, including condition parameter, input parameter, output parameter,
and so on (see details in the structure NET_DVR_STD_ABILITY ), which are different according
to different capability types.
Return Values
Returns TRUE for success, and returns FALSE for failure.
If FALSE is returned, you can call NET_DVR_GetLastError to get the error code.
3.9 NET_DVR_GetSTDConfig
Get the device configuration information.
API Definition
BOOL NET_DVR_GetSTDConfig(
LONG lUserID,
DWORD dwCommand,
NET_DVR_STD_CONFIG lpConfigParam
);
25
Device Network SDK (Queue Management) Developer Guide
Parameters
lUserID
[IN] Value returned by NET_DVR_Login_V40 .
dwCommand
[IN] Device configuration commands, which are different according to different configuration
functions.
lpConfigParam
[IN][OUT] Set input and output parameters, which are different according to different
configuration functions. For different configuration functions, the lpCondBuffer and lpOutBuffer
in the IpConfigParam are also different. See the structure NET_DVR_STD_CONFIG for details.
Note
When getting configuration parameters, the lpInBuffer in the lpConfigParam is invalid, you can
set it to NULL.
Return Values
Returns TRUE for success, and returns FALSE for failure.
If FALSE is returned, you can call NET_DVR_GetLastError to get the error code.
See Also
NET_DVR_SetSTDConfig
3.10 NET_DVR_MIME_UNIT
26
Device Network SDK (Queue Management) Developer Guide
See Also
NET_DVR_XML_CONFIG_INPUT
3.11 NET_DVR_SetSTDConfig
Set the device parameters.
API Definition
BOOL NET_DVR_SetSTDConfig(
LONG lUserID,
DWORD dwCommand,
NET_DVR_STD_CONFIG lpConfigParam
);
Parameters
lUserID
[IN] Value returned by NET_DVR_Login_V40 .
dwCommand
[IN] Device configuration commands, which are different according to different configuration
functions.
lpConfigParam
[IN][OUT] Set input and output parameters, which are different according to different
configuration functions. For different configuration functions, the lpCondBuffer and lpInBuffer
in the IpConfigParam are also different. See the structure NET_DVR_STD_CONFIG for details.
Note
When getting configuration parameters, the lpOutBuffer in the lpConfigParam is invalid, you
can set it to "NULL".
27
Device Network SDK (Queue Management) Developer Guide
Return Values
Returns TRUE for success, and returns FALSE for failure.
If FALSE is returned, you can call NET_DVR_GetLastError to get the error code.
See Also
NET_DVR_GetSTDConfig
3.12 NET_DVR_STDXMLConfig
Transmit request URL with XML or JSON format to implement some typical functions.
API Definition
BOOL NET_DVR_STDXMLConfig(
LONG lUserID,
const NET_DVR_XML_CONFIG_INPUT *lpInputParam,
NET_DVR_XML_CONFIG_OUTPUT *lpOutputParam
);
Parameters
lUserID
[IN] Value returned by NET_DVR_Login_V40 .
lpInputParam
[IN] Input parameters, refer to the structure NET_DVR_XML_CONFIG_INPUT for details.
lpOutputParam
[IN][OUT] Output parameters, refer to the structure NET_DVR_XML_CONFIG_OUTPUT for
details.
Return Values
Return TRUE for success, and return FALSE for failure.
If FALSE is returned, you can call NET_DVR_GetLastError to get the error code.
Remarks
The input parameter lpInputParam and output parameter lpOutputParam are different when
transmitting text protocol for implementing different functions, and each parameter corresponds
to a component of text protocol, see the relations below:
28
Device Network SDK (Queue Management) Developer Guide
3.13 NET_DVR_CloseAlarmChan_V30
Close alarm uploading channel.
API Definition
BOOL NET_DVR_CloseAlarmChan_V30(
LONG lAlarmHandle
);
Parameters
lAlarmHandle
Value returned by NET_DVR_SetupAlarmChan_V50 .
Return Values
Return TURE for success, and return FALSE for failure.
If FALSE is returned, you can call NET_DVR_GetLastError to get the error code.
The available error codes of this API are 0, 3, 6, 12, 17, 41, and 47. See details in the Device
Network SDK Errors .
3.14 NET_DVR_GetDVRConfig
Get the device configuration information.
29
Device Network SDK (Queue Management) Developer Guide
API Definition
BOOL NET_DVR_GetDVRConfig(
LONG lUserID,
DWORD dwCommand,
LONG lRuleID,
LONG lChannel,
LPVOID lpOutBuffer,
DWORD dwOutBufferSize,
LPDWORD lpBytesReturned
);
Parameters
lUserID
[IN] Value returned by NET_DVR_Login_V40 .
dwCommand
[IN] Device getting commands, which are different according to different getting functions.
lRuleID
[IN] Rule ID.
lChannel
[IN] Channel No. (NIC No.), which varies with different commands. 0xffffffff-invalid or all
channels, 1-main NIC, 2-extended NIC.
lpOutBuffer
[OUT] Pointer of buffer to receive data. For different getting functions, the structures of this
parameter are different.
dwOutBufferSize
[IN] Size of buffer to receive data (unit: byte). It cannot be 0.
lpBytesReturned
[OUT] Pointer of actually received data size. It cannot be NULL.
Return Values
Returns TRUE for success, and returns FALSE for failure.
If FALSE is returned, you can call NET_DVR_GetLastError to get the error code.
The following error codes may be returned by this API: 0, 3, 6, 7, 8, 9, 10, 12, 17, 41, 43, 44, 47, 72,
73, and 76. See the corresponding error types and descriptions in the Device Network SDK Errors .
See Also
NET_DVR_SetDVRConfig
30
Device Network SDK (Queue Management) Developer Guide
3.15 NET_DVR_SetDVRConfig
Set the device parameters.
API Definition
BOOL NET_DVR_SetDVRConfig(
LONG lUserID,
DWORD dwCommand,
LONG lChannel,
LPVOID lpInBuffer,
DWORD dwInBufferSize
);
Parameters
lUserID
[IN] Value returned by NET_DVR_Login_V40 .
dwCommand
[IN] Device configuration commands, which are different according to different configuration
functions.
lChannel
[IN] Channel No. (NIC No.), which varies with different commands. 0xFFFFFFFF-invalid, 1-main
NIC, 2-extended NIC.
lpInBuffer
[IN] Pointer of input data buffer. For different configuration functions, the structures of this
parameter are different.
dwInBufferSize
[IN] Size of input data buffer (unit: byte).
Return Values
Returns TRUE for success, and returns FALSE for failure.
If FALSE is returned, you can call NET_DVR_GetLastError to get the error code.
The following error codes may be returned by this API: 0, 3, 6, 7, 8, 9, 10, 12, 17, 41, 43, 44, 47, 72,
73, and 76. See the corresponding error types and descriptions in the Device Network SDK Errors .
See Also
NET_DVR_GetDVRConfig
31
Device Network SDK (Queue Management) Developer Guide
3.16 NET_DVR_SetDVRMessageCallBack_V50
Set callback functions for getting the video data.
API Definition
BOOL NET_DVR_SetDVRMessageCallBack_V50(
int iIndex,
MSGCallBack fMessageCallBack,
void *pUser
);
Parameters
iIndex
[IN] Callback function index No., which ranges from 0 to 15.
fMessageCallBack
[IN] Callback function, see details in MSGCallBack .
pUser
[IN] User data.
Return Values
Return TRUE for success, and return FALSE for failure.
If FALSE returned, call NET_DVR_GetLastError to get the error code.
Remarks
● This API supports setting multiple callback functions for different channels (up to 16 channels are
supported) at same time, and the configured callback functions are distinguished by the index
No.
● All alarm/event information will be returned in each configured callback function, and you can
distinguish the devices via the pAlarmInfo in the callback function ( MSGCallBack ).
Example
Sample Code of Setting Multiple Callback Functions to Receive Different Alarms/Events in Arming
Mode
#include <stdio.h>
#include <iostream>
#include "Windows.h"
#include "HCNetSDK.h"
using namespace std;
int iNum=0;
void CALLBACK MessageCallbackNo1(LONG lCommand, NET_DVR_ALARMER *pAlarmer, char *pAlarmInfo, DWORD
dwBufLen, void* pUser)
{
32
Device Network SDK (Queue Management) Developer Guide
int i=0;
char filename[100];
FILE *fSnapPic=NULL;
FILE *fSnapPicPlate=NULL;
//This sample code is for reference only. Actually, it is not recommended to process the data and save file in the
callback function directly.
//You'd better process the data in the message response funcion via message mode (PostMessage).
switch(lCommand)
{
case COMM_ALARM:
{
NET_DVR_ALARMINFO struAlarmInfo;
memcpy(&struAlarmInfo, pAlarmInfo, sizeof(NET_DVR_ALARMINFO));
switch (struAlarmInfo.dwAlarmType)
{
case 3: //Motion detection alarm
for (i=0; i<16; i++) //#define MAX_CHANNUM 16 //The maximum number of channels
{
if (struAlarmInfo.dwChannel[i] == 1)
{
printf("Channel Number with Motion Detection Alarm %d\n", i+1);
}
}
break;
default:
break;
}
break;
}
case COMM_UPLOAD_PLATE_RESULT:
{
NET_DVR_PLATE_RESULT struPlateResult={0};
memcpy(&struPlateResult, pAlarmInfo, sizeof(struPlateResult));
printf("License Plate Number: %s\n", struPlateResult.struPlateInfo.sLicense);//License plate number
33
Device Network SDK (Queue Management) Developer Guide
break;
}
//Scene picture
if (struPlateResult.dwPicLen != 0 && struPlateResult.byResultType == 1 )
{
sprintf(filename,"testpic_%d.jpg",iNum);
fSnapPic=fopen(filename,"wb");
fwrite(struPlateResult.pBuffer1,struPlateResult.dwPicLen,1,fSnapPic);
iNum++;
fclose(fSnapPic);
}
//License plate picture
if (struPlateResult.dwPicPlateLen != 0 && struPlateResult.byResultType == 1)
{
sprintf(filename,"testPicPlate_%d.jpg",iNum);
fSnapPicPlate=fopen(filename,"wb");
fwrite(struPlateResult.pBuffer1,struPlateResult.dwPicLen,1,fSnapPicPlate);
iNum++;
fclose(fSnapPicPlate);
}
//Processing other data...
break;
}
case COMM_ITS_PLATE_RESULT:
{
NET_ITS_PLATE_RESULT struITSPlateResult={0};
memcpy(&struITSPlateResult, pAlarmInfo, sizeof(struITSPlateResult));
for (i=0;i<struITSPlateResult.dwPicNum;i++)
{
printf("License Plate Number: %s\n", struITSPlateResult.struPlateInfo.sLicense);//License plate number
switch(struITSPlateResult.struPlateInfo.byColor)//License plate color
{
case VCA_BLUE_PLATE:
printf("Vehicle Color: Blue\n");
break;
case VCA_YELLOW_PLATE:
printf("Vehicle Color: Yellow\n");
break;
case VCA_WHITE_PLATE:
printf("Vehicle Color: White\n");
break;
case VCA_BLACK_PLATE:
printf("Vehicle Color: Black\n");
break;
default:
break;
}
//Save scene picture
if ((struITSPlateResult.struPicInfo[i].dwDataLen != 0)&&(struITSPlateResult.struPicInfo[i].byType== 1)||
(struITSPlateResult.struPicInfo[i].byType == 2))
{
34
Device Network SDK (Queue Management) Developer Guide
sprintf(filename,"testITSpic%d_%d.jpg",iNum,i);
fSnapPic=fopen(filename,"wb");
fwrite(struITSPlateResult.struPicInfo[i].pBuffer, struITSPlateResult.struPicInfo[i].dwDataLen,1,fSnapPic);
iNum++;
fclose(fSnapPic);
}
//License plate thumbnails
if ((struITSPlateResult.struPicInfo[i].dwDataLen != 0)&&(struITSPlateResult.struPicInfo[i].byType == 0))
{
sprintf(filename,"testPicPlate%d_%d.jpg",iNum,i);
fSnapPicPlate=fopen(filename,"wb");
fwrite(struITSPlateResult.struPicInfo[i].pBuffer, struITSPlateResult.struPicInfo[i].dwDataLen, 1, \
fSnapPicPlate);
iNum++;
fclose(fSnapPicPlate);
}
//Processing other data...
}
break;
}
default:
break;
}
}
//This sample code is for reference only. Actually, it is not recommended to process the data and save file in the
callback function directly.
//You'd better process the data in the message response funcion via message mode (PostMessage).
switch(lCommand)
{
case COMM_ALARM:
{
NET_DVR_ALARMINFO struAlarmInfo;
memcpy(&struAlarmInfo, pAlarmInfo, sizeof(NET_DVR_ALARMINFO));
switch (struAlarmInfo.dwAlarmType)
{
case 3: //Motion detection alarm
for (i=0; i<16; i++) //#define MAX_CHANNUM 16 //The maximum number of channel
{
if (struAlarmInfo.dwChannel[i] == 1)
{
printf("Channel No. with Motion Detection Alarm %d\n", i+1);
}
35
Device Network SDK (Queue Management) Developer Guide
}
break;
default:
break;
}
break;
}
case COMM_UPLOAD_PLATE_RESULT:
{
NET_DVR_PLATE_RESULT struPlateResult={0};
memcpy(&struPlateResult, pAlarmInfo, sizeof(struPlateResult));
printf("License Plate Number: %s\n", struPlateResult.struPlateInfo.sLicense);//License plate number
36
Device Network SDK (Queue Management) Developer Guide
{
NET_ITS_PLATE_RESULT struITSPlateResult={0};
memcpy(&struITSPlateResult, pAlarmInfo, sizeof(struITSPlateResult));
for (i=0;i<struITSPlateResult.dwPicNum;i++)
{
printf("License Plate Number: %s\n", struITSPlateResult.struPlateInfo.sLicense);//License plate number
switch(struITSPlateResult.struPlateInfo.byColor)//License plate color
{
case VCA_BLUE_PLATE:
printf("Vehicle Color: Blue\n");
break;
case VCA_YELLOW_PLATE:
printf("Vehicle Color: Yellow\n");
break;
case VCA_WHITE_PLATE:
printf("Vehicle Color: White\n");
break;
case VCA_BLACK_PLATE:
printf("Vehicle Color: Black\n");
break;
default:
break;
}
//Save scene picture
if ((struITSPlateResult.struPicInfo[i].dwDataLen != 0)&&(struITSPlateResult.struPicInfo[i].byType== 1)||
(struITSPlateResult.struPicInfo[i].byType == 2))
{
sprintf(filename,"testITSpic%d_%d.jpg",iNum,i);
fSnapPic=fopen(filename,"wb");
fwrite(struITSPlateResult.struPicInfo[i].pBuffer, struITSPlateResult.struPicInfo[i].dwDataLen,1,fSnapPic);
iNum++;
fclose(fSnapPic);
}
//License plate thumbnails
if ((struITSPlateResult.struPicInfo[i].dwDataLen != 0)&&(struITSPlateResult.struPicInfo[i].byType == 0))
{
sprintf(filename,"testPicPlate%d_%d.jpg",iNum,i);
fSnapPicPlate=fopen(filename,"wb");
fwrite(struITSPlateResult.struPicInfo[i].pBuffer, struITSPlateResult.struPicInfo[i].dwDataLen, 1, \
fSnapPicPlate);
iNum++;
fclose(fSnapPicPlate);
}
//Processing other data...
}
break;
}
default:
break;
}
}
37
Device Network SDK (Queue Management) Developer Guide
void main() {
//---------------------------------------
//Initialize
NET_DVR_Init();
//Set the connection time and reconnection time
NET_DVR_SetConnectTime(2000, 1);
NET_DVR_SetReconnect(10000, true);
//---------------------------------------
//Log in to device
LONG lUserID;
NET_DVR_DEVICEINFO_V30 struDeviceInfo;
lUserID = NET_DVR_Login_V30("172.0.0.100", 8000, "admin", "12345", &struDeviceInfo);
if (lUserID < 0)
{
printf("Login error, %d\n", NET_DVR_GetLastError());
NET_DVR_Cleanup();
return;
}
//Enable arming
NET_DVR_SETUPALARM_PARAM struSetupParam={0};
struSetupParam.dwSize=sizeof(NET_DVR_SETUPALARM_PARAM);
Sleep(20000);
//Disarm uploading channel
if (!NET_DVR_CloseAlarmChan_V30(lHandle))
{
printf("NET_DVR_CloseAlarmChan_V30 error, %d\n", NET_DVR_GetLastError());
NET_DVR_Logout(lUserID);
NET_DVR_Cleanup();
38
Device Network SDK (Queue Management) Developer Guide
return;
}
//User logout
NET_DVR_Logout(lUserID);
//Release SDK resource
NET_DVR_Cleanup();
return;
}
See Also
NET_DVR_SetupAlarmChan_V50
3.16.1 MSGCallBack
Alarm/event information callback function.
Parameters
lCommand
[OUT] Uploaded message type. You can distinguish the alarm/event information via the type.
pAlarmer
[OUT] Alarm device information, including serial No., IP address, login handle, and so on, see
details in NET_DVR_ALARMER .
pAlarmInfo
[OUT] Alarm/event information, the details are returned in different structures according to
lCommand.
dwBufLen
[OUT] Size of alarm/event information buffer.
pUser
[OUT] User data.
39
Device Network SDK (Queue Management) Developer Guide
3.17 NET_DVR_SetupAlarmChan_V50
Set up persistent connection to receive alarm/event information (supports alarm/event
subscription).
API Definition
LONG NET_DVR_SetupAlarmChan_V50(
LONG lUserID,
NET_DVR_SETUPALARM_PARAM_V50 lpSetupParam,
char *pData,
DWORD dwDataLen,
);
Parameters
lUserID
[IN] Value returned by NET_DVR_Login_V40 .
lpSetupParam
[IN] Arming parameters, refer to the structure NET_DVR_SETUPALARM_PARAM_V50 for
details.
pData
[IN] Alarm/event subscription conditions.
dwDataLen
[IN] Length of alarm/event subscription conditions.
Return Values
Return -1 for failure, and return other values as the handles of NET_DVR_CloseAlarmChan_V30 .
If -1 is returned, you can call NET_DVR_GetLastError to get the error code.
Remarks
This API supports alarm/event subscription, you can specify the types of alarm or event to be
uploaded by device by setting pData and dwDataLen.
3.18 NET_DVR_StartListen_V30
Register callback function for receiving alarm/event information and start listening (supports
multiple threads).
API Definition
LONG NET_DVR_StartListen_V30(
char *sLocalIP,
40
Device Network SDK (Queue Management) Developer Guide
WORD wLocalPort,
MSGCallBack DataCallback,
void *pUserData
);
Parameters
sLocalIP
[IN] IP address of local PC. It can be set to null.
wLocalPort
[IN] Listening port No. of local PC. It is configured by user, and it should be the same with that of
device.
DataCallback
[IN] Alarm/event information callback function, see details in MSGCallBack .
pUserData
[IN] User data.
Return Values
Return -1 for failure, and return other values for the handle parameters of
NET_DVR_StopListen_V30 .
If -1 is returned, you can call NET_DVR_GetLastError to get the error code.
The available error codes of this API are 0, 3, 6, 12, 17, 41, 44, 47, 72, and 75. See details in the
Device Network SDK Errors .
Remarks
● To receive the alarm/event information sent by device, you should set the management host
server address or listening host server address of device to the IP address of PC (which is same
with the sLocalIP), or set the management host server port or listening host server port to the
listening port No. of PC (which is same with the wLocalPort).
● The callback function in this API is prior to other callback functions, that is, if the callback
function is configured in this API, other callback functions will not receive the alarm information.
All the device alarm information is returned in same callback function, and you can distinguish
the devices via the alarm device information (pAlarmInfo).
3.19 NET_DVR_StopListen_V30
Stop listening (supports multiple threads).
API Definition
BOOL NET_DVR_StopListen_V30(
LONG lListenHandle
);
41
Device Network SDK (Queue Management) Developer Guide
Parameters
lListenHandle
Listening handle, which is returned by NET_DVR_StartListen_V30 .
Return Values
Return TRUE for success, and return FALSE for failure.
If FALSE is returned, you can call NET_DVR_GetLastError to get the error code.
The available error codes of this API are 0, 3, 12, and 17. See details in the Device Network SDK
Errors .
42
Device Network SDK (Queue Management) Developer Guide
4.1 /ISAPI/Intelligent/channels/<ID>/capabilities
Get the intelligent capability of device.
Remarks
The <ID> in the URI refers to the intelligent channel ID.
4.2 /ISAPI/Intelligent/channels/<ID>/personQueueDetection/
capabilities?format=json
Get the configuration capability of queue management by channel.
43
Device Network SDK (Queue Management) Developer Guide
Request None
Response Succeeded: JSON_PersonQueueDetectionInfoCap
Failed: JSON_ResponseStatus
Remarks
The <ID> in the URI refers to the channel ID.
4.3 /ISAPI/Intelligent/channels/<ID>/personQueueDetection/
queueCountingFile?format=json
Search for and get the people queuing-up detection report file.
Remarks
The <ID> in the URI refers to the intelligent channel ID.
4.4 /ISAPI/Intelligent/channels/<ID>/personQueueDetection/
queueCountingResult?format=json
Search for and get the people queuing-up detection report details.
44
Device Network SDK (Queue Management) Developer Guide
Remarks
The <ID> in the URI refers to the intelligent channel ID.
4.5 /ISAPI/Intelligent/channels/<ID>/personQueueDetection/
queueTimeFile?format=json
Search for and get the waiting time detection report file.
Remarks
The <ID> in the URI refers to the intelligent channel ID.
45
Device Network SDK (Queue Management) Developer Guide
4.6 /ISAPI/Intelligent/channels/<ID>/personQueueDetection/
queueTimeResult?format=json
Search for and get the waiting time detection report details.
Remarks
The <ID> in the URI refers to the intelligent channel ID.
4.7 /ISAPI/Intelligent/channels/<ID>/personQueueDetection/
rawDataFile?format=json
Search for and get the queue management raw data in file format.
46
Device Network SDK (Queue Management) Developer Guide
Remarks
The <ID> in the URI refers to the intelligent channel ID.
4.8 /ISAPI/Intelligent/channels/<ID>/personQueueDetection?
format=json
Get or set parameters of queue management alarm by channel.
Remarks
The <ID> in the URI refers to the intelligent channel ID.
47
Device Network SDK (Queue Management) Developer Guide
5.1 JSON_EventNotificationAlert_Alarm/EventInfo
EventNotificationAlert message with alarm or event information in JSON format.
{
"ipAddress": "",
/*required, device IPv4 address , string, the maximum size is 32 bytes*/
"ipv6Address": "",
/*optional, device IPv6 address, string, the maximum size is 128 bytes*/
"portNo": ,
/*optional, device port No., integer32*/
"protocol": "",
/*optional, protocol type, "HTTP, HTTPS", string, the maximum size is 32 bytes*/
"macAddress": "",
/*optional, MAC address, string, the maximum size is 32 bytes, e.g., 01:17:24:45:D9:F4*/
"channelID": "",
/*optional, device channel No., integer32*/
"dateTime": "",
/*optional, string, alarm/event triggered or occurred time based on ISO8601, the maximum size is 32 bytes, e.g.,
2009-11-14T15:27Z*/
"activePostCount": "",
/*required, alarm/event frequency, integer32*/
"eventType": "",
/*required, alarm/event type, "captureResult, faceCapture,...", string, the maximum size is 128 bytes*/
"eventState": "",
/*required, string, the maximum size is 32 bytes, durative alarm/event status: "active"-valid, "inactive"-invalid*/
"eventDescription": "",
/*required, event description, string, the maximum size is 128 bytes*/
"deviceID":"",
/*string type, device ID*/
"uuid":"",
/*string type, event UUID, which is used to uniquely identify an event, the standard UUID format is xxxxxxxx-xxxx-xxxx-
xxxx-xxxxxxxxxxxx*/
...
/*optional, for different alarm/event types, the nodes are different, see the message examples in different
applications*/
}
5.2 JSON_EventNotificationAlert_PeopleQueuingUpAlarmMsg
JSON message about regional people queuing-up alarm details
48
Device Network SDK (Queue Management) Developer Guide
49
Device Network SDK (Queue Management) Developer Guide
"durationTime":
/*optional, integer type, queuing-up status (number of queuing-up persons) keeping duration, which is between 0 and
3600, the default duration is 300, unit: second; the people queuing-up alarm is triggered if the number of queuing-up
persons keeps for the configured duration*/
}
}
"contentID": ""
/*background picture*/
}
--MIME_boundary
Content-Type: image/jpeg
Content-Length: 42569
Content-ID: human_image
fefefwageegfqaeg…
--MIME_boundary--
50
Device Network SDK (Queue Management) Developer Guide
/*required, string, rule region color, "blue", "red", and "yellow" are available*/
"Region": [{
/*required, rule region coordinates, it is polygonal (3 to 10 edges)*/
"x": ,
/*required, float, x-coordinate, it is ranging from 0.000 to 1*/
"y":
/*required, float, y-coordinate, it is ranging from 0.000 to 1*/
}]
"countTriggerType": "",
/*optional, string type, triggering type of people queuing-up alarm: "greater", "less", "equal", "unequal"-the alarm is
triggered when the number of queuing-up persons is larger than, smaller than, equal to, or not equal to the value of
alarmCount; "range"-the alarm is triggered when the number of queuing-up person is in the range between
maxAlarmCount and alarmCount*/
"durationTime":
/*optional, integer type, queuing-up status (number of queuing-up persons) keeping duration, which is between 0 and
3600, the default duration is 300, unit: second; the people queuing-up alarm is triggered if the number of queuing-up
persons keeps for the configured duration*/
}
}
"backgroundImageURL": ""
/*background picture URL*/
}
5.3 JSON_EventNotificationAlert_RealTimeQueueManagementDataMsg
JSON message about details of real-time regional people queuing-up alarm
{
"ipAddress": "",
/*required, string, IPv4 address of alarm device, the maximum value size is 32 bytes, e.g., 172.6.64.7*/
"ipv6Address": "",
/*required, string, IPv6 address of alarm device, the maximum value size is 128 bytes*/
"portNo": ,
/*optional, integer32, port No. of alarm device*/
"protocol": "",
/*optional, string, protocol type: "HTTP"-for device network SDK, "HTTPS", "EHome"-for ISUP SDK; the maximum
value size is 32 bytes*/
"macAddress": "",
/*optional, string, MAC address, the maximum value size is 32 bytes, e.g., 01:17:24:45:D9:F4*/
"channelID": ,
/*optional, integer32, No. of alarm triggered channel*/
"releatedChannelList": [1,2,3],
/*optional, array of integers, list of alarm related channels, which are of the same camera with channelID; this
parameter is used for live view or playback on the platform*/
"dateTime": "",
/*required, string, alarm triggered time (ISO 8601 format), the maximum value size is 32 bytes, e.g.,
2004-05-03T17:30:08+08:00*/
"activePostCount": ,
/*required, integer32, uploaded times of one alarm*/
"eventType": "",
51
Device Network SDK (Queue Management) Developer Guide
/*required, string, occurred event type, here it should be set to "personQueueRealTime", and the maximum value size
is 128 bits*/
"eventState": "",
"eventDescription": "",
/*see the description of above nodes in JSON_EventNotificationAlert_Alarm/EventInfo*/
"deviceID": "",
/*optional, device ID (PUID), which is returned in the alarm based on ISUP (Intelligent Security Uplink Protocol)*/
"PersonQueueRealTimeData": {
/*real-time information of queue management*/
"targetID": ,
/*required, integer type, target ID*/
"ruleID": ,
/*required, integer type, rule ID*/
"personState": "",
/*required, string type, people status: "enter"-region entrance, "leave"-region exiting*/
"waitTime": ,
/*dependent, integer32 type, actual waiting time, this node is valid only when personState is "leave", whose value is
between 0 and 3600s*/
"peopleNum": ,
/*required, integer type, total number of people in this region*/
"enterTime": ""
/*dependent, target entered time, which is in ISO8601 time format, this node is valid only when personState is
"leave"*/
}
}
5.4 JSON_EventNotificationAlert_WaitingTimeDetectionAlarmMsg
JSON message about details of waiting time detection alarm
52
Device Network SDK (Queue Management) Developer Guide
"releatedChannelList": [1,2,3],
/*optional, array of integers, list of alarm related channels, which are of the same camera with channelID; this
parameter is used for live view or playback on the platform*/
"dateTime": "",
/*required, string, alarm triggered time (ISO 8601 format), the maximum value size is 32 bytes, e.g.,
2004-05-03T17:30:08+08:00*/
"activePostCount": ,
/*required, integer32, uploaded times of one alarm*/
"eventType": "",
/*required, string, occurred event type, here it should be set to "personQueueTime", and the maximum value size is
128 bytes*/
"eventState": "",
"eventDescription": "",
"deviceID": "",
"humanCapture": {
/*captured human information*/
"human":{
/*human attributes*/
"targetID": ,
/*required, integer, person target ID, whose waiting time is longer than the configured alarm threshold. The ID is
generated by DSP, and corresponds to the person position*/
"waitTime": ,
/*required, integer, actual waiting time, it is ranging from 0 to 3600s*/
"Region": [{
/*required, target person region coordinates, it is quadrilateral*/
"x": ,
/*required, float, x-coordinate, it is ranging from 0.000 to 1*/
"y":
/*required, float, y-coordinate, it is ranging from 0.000 to 1*/
}]
contentID": ""
/*captured human thumbnail*/
},
"rule":{
/*rule properties*/
"ruleID": ,
/*required, integer, rule ID, which corresponds to the target person region ID*/
"alarmTime": ,
/*required, integer, configured waiting time alarm threshold, it is ranging from 0 to 3600s*/
"regionColor": "",
/*required, string, rule region color, "blue", "red", and "yellow" are available*/
"Region": [{
/*required, rule region coordinates, it is polygonal (3 to 10 edges)*/
"x": ,
/*required, float, x-coordinate, it is ranging from 0.000 to 1*/
"y":
/*required, float, y-coordinate, it is ranging from 0.000 to 1*/
}]
"timeTriggerType": ""
/*optional, string type, triggering type of waiting time detection alarm: "greater", "less", "equal", "unequal"-the alarm
is triggered when waiting time is larger than, smaller than, equal to, or not equal to the value of alarmTime*/
}
53
Device Network SDK (Queue Management) Developer Guide
},
"contentID": ""
/*background picture*/
}
--MIME_boundary
Content-Type: image/jpeg
Content-Length: 42569
Content-ID: human_image
fefefwageegfqaeg…
--MIME_boundary
Content-Type: image/jpeg
Content-Length: 516876
Content-ID: background_image
fefefwageegfqaeg…
--MIME_boundary--
54
Device Network SDK (Queue Management) Developer Guide
5.5 JSON_PersonQueueCountingDescription
JSON message about conditions of searching for people queuing-up reports
{
"PersonQueueCountingDescription": {
/*required, search condition of people queuing-up report*/
"fileType": "",
/*optional, string, file type, opt="excel, txt"*/
"reportType": "",
/*required, string, report type, opt="daily, weekly, monthly, custom"*/
"startTime": "",
/*required, IOS8601 time, search start time, e.g., "2004-05-03T00:00:00+08:00" or "2004-05-03T00:00:00.000Z"*/
"RuleList": [{
/*required, rule information, up to 3 rules can be supported*/
"ruleID": ,
/*required, integer, rule ID, which corresponds to the region ID when configuring rule*/
}],
"CountRangeList" : [{
/*required, array, people queuing-up data of all regions under a rule, up to 3 regions are supported*/
"minCount": ,
55
Device Network SDK (Queue Management) Developer Guide
Note
At least one of the minCount and maxCount fields is required, if only minCount is configured, it
indicates no upper-limit, e.g., minCount = 10, maxCount is reserved, the statistics data more than
10 people will be searched; if only maxCount is configured, it indicates no lower-limit, e.g.,
maxCount = 10, minCount is reserved, the statistics data less than 10 persons will be searched.
Example
Message Example
{
"PersonQueueTimeDescription":{
"fileType":"excel",
"reportType":"daily",
"startTime":"2017-1-14T00:00:00Z",
"searchType":"rule",
"RuleList":[{
"ruleID":1
}],
"CountList":[{
"minCount":0,
"maxCount":20
},
{
"minCount":20,
"maxCount":40
}]
}
}
5.6 JSON_PersonQueueCountingFileResult
JSON message about results of searching for people queuing-up report files
{
"PersonQueueCountingFileResult":
/*required, search result of people queuing-up report*/
{
56
Device Network SDK (Queue Management) Developer Guide
"fileURL": ""
/*file URL of people queuing-up report*/
}
}
Example
Message Example
{
"PersonQueueCountingFileResult": {
"fileURL": "http://10.10.36.163/ISAPI/Intelligent/DownloadFile?filePath=/home/
Day_CountFile_2017-01-14T00:00:00.xls&"
}
}
5.7 JSON_PersonQueueCountingResult
JSON message about results of searching for people queuing-up report details
{
"PersonQueueCountingResult": {
/*required, search result of people queuing-up detection report*/
"RuleList" : [{
/*required, array, people queuing-up detection reports of all regions under multiple rules, up to 3 rules are
supported*/
"ruleID": ,
/*required, integer, rule ID, which corresponds to the region ID when configuring rules*/
"CountRangeList" : [{
/*required, array, people queuing-up data of all regions under a single rule, up to 3 regions are supported*/
"minCount": ,
/*optional, integer, minimum number of queuing-up people, range: from 0 to 60*/
"maxCount": ,
/*optional, integer, maximum number of queuing-up people, range: from 0 to 60*/
"CountingInfoList": [{
/*required, people queuing-up report details*/
"startTime": "",
/*required, IOS8601 time, start time of the time period, e.g., 2004-05-03T00:00:00+08:00 or
2004-05-03T00:00:00.000Z*/
"endTime": "",
/*required, IOS8601 time, end time of the time period, e.g., 2004-05-03T00:00:00+08:00 or
2004-05-03T00:00:00.000Z*/
"count":
/*required, integer, number of queuing-up persons: between 0 to 60*/
}]
}]
}]
}
}
57
Device Network SDK (Queue Management) Developer Guide
Note
● At least one of the minCount and maxCount fields is required, if only minCount is configured, it
indicates no upper-limit, e.g., minCount = 10, maxCount is reserved, the statistics data more
than 10 persons will be searched; if only maxCount is configured, it indicates no lower-limit, e.g.,
maxCount = 10, minCount is reserved, the statistics data less than 10 persons will be searched.
● For daily report, one result will be returned at each hour, total 24 results; for weekly report, one
result will be returned at each day, total 7 results; for monthly report, one result will be returned
at each day, total 30 results.
Example
Message Example
{
"PersonQueueCountingDescription":{
"reportType":"daily",
"startTime":"2017-12-21T00:00:00Z",
"searchType":"rule",
"RuleList":[{
"ruleID":1
}],
"WaitTimeList":[{
"minWaitTime":600,
"maxWaitTime":1000
}]
}
}
5.8 JSON_PersonQueueDetectionInfo
JSON message about people queuing-up parameters
{
"PersonQueueDetectionInfo": {
/*required, queue management configuration information*/
"countingEnabled": ,
/*required, boolean, enable people queuing-up detection*/
"queueTimeEnabled": ,
/*required, boolean, enable waiting time detection*/
"RuleInfo": [{
/*required, queue management rule information, the number of rules is ranging from 1 to 3*/
"ruleID": ,
/*required, integer, rule ID*/
"ruleName": "",
/*required, string, rule name, string size: between 0 and 32*/
"OSDOverlayEnabled": ,
/*required, boolean, enable OSD*/
"alarmIntervalTime": ,
/*required, integer, alarm time interval, range: between 0 to 3600s, default: 300s*/
58
Device Network SDK (Queue Management) Developer Guide
"PersonQueueCounting":{
/*required, people queuing-up parameters*/
"alarmCount": ,
/*required, integer, number threshold of persons for triggering alarm, range: between 0 and 60 persons, default: 10*/
"countTriggerType": "",
/*optional, string type, triggering type of people queuing-up alarm: "greater", "less", "equal", "unequal"-the alarm is
triggered when the number of queuing-up persons is larger than, smaller than, equal to, or not equal to the value of
alarmCount; "range"-the alarm is triggered when the number of queuing-up person is in the range between
maxAlarmCount and alarmCount*/
"maxAlarmCount": ,
/*dep, integer type, maximum number of queuing-up persons to trigger alarm, it is valid when countTriggerType is
"range"*/
"durationTime":
/*optional, integer type, queuing-up status (number of queuing-up persons) keeping duration, which is between 0 and
3600, the default duration is 300, unit: second; the people queuing-up alarm is triggered if the number of queuing-up
persons keeps for the configured duration*/
},
"PersonQueueTime":{
/*required, waiting time detection parameters*/
"alarmTime": ,
/*required, integer, waiting time threshold for triggering alarm, range: between 0 and 3600s, default: 600s*/
"timeTriggerType": ""
/*optional, string type, triggering type of waiting time detection alarm: "greater", "less", "equal", "unequal"-the alarm
is triggered when waiting time is larger than, smaller than, equal to, or not equal to the value of alarmTime*/
},
"regionColor": "",
/*required, string, color of region that configured with rule, "blue, red, yellow"*/
"Region": [{
/*required, coordinates of region (polygon, 3 to 10 sides) that configured with rule*/
"x": ,
/*required, float, x-coordinate, range: between 0.000 and 1*/
"y":
/*required, float, y-coordinate, range: between 0.000 and 1*/
}]
}]
"alarmPicEnabled": ,
/*optional, boolean, whether to upload pictures (i.e., background picture and human body thumbnail) when alarm is
triggered, if this node is not supported by device, the alarm pictures will be uploaded by default*/
"realTimeEnabled":
/*optional, boolean, whether to upload real-time data of queue management, the corresponding event type is
"personQueueRealTime"*/
}
}
Example
Message Example
{
"PersonQueueDetectionInfo": {
"countingEnabled": false,
"queuetimeEnabled": true,
"RuleInfo": [{
59
Device Network SDK (Queue Management) Developer Guide
"ruleID": 1,
"ruleName": "East Window",
"OSDOverlayEnabled": true,
"alarmIntervalTime": 300,
"PersonQueueCounting":{
"alarmCount": 5,
"countTriggerType": "range",
"maxAlarmCount": 5,
"durationTime": 300
},
"PersonQueueTime": {
"alarmTime": 300,
"timeTriggerType": "greater"
},
"regionColor": "yellow",
"Region": [{
"x": 0.411000,
"y": 0.325000
},
{
"x": 0.250000,
"y": 0.643000
},
{
"x": 0.435000,
"y": 0.751000
},
{
"x": 0.576000,
"y": 0.675000
},
{
"x": 0.647000,
"y": 0.501000
}]
},
{
"ruleID": 2,
"ruleName": "Area2",
"OSDOverlayEnabled": true,
"alarmIntervalTime": 300,
"PersonQueueCounting":{
"alarmCount": 5
},
"PersonQueueTime":{
"alarmTime": 300
},
"regionColor": "yellow",
"Region":[{
"x":0.106000,
"y":0.218000
},
60
Device Network SDK (Queue Management) Developer Guide
{
"x": 0.078000,
"y": 0.383000
},
{
"x": 0.282000,
"y": 0.429000
},
{
"x": 0.369000,
"y": 0.204000
},
{
"x": 0.188000,
"y": 0.019000
}]
}]
"alarmPicEnabled": true,
"realTimeEnabled": true
}
}
5.9 JSON_PersonQueueDetectionInfoCap
JSON message about configuration capability of people queuing-up
{
"PersonQueueDetectionInfoCap": {
/*required, queue management capability*/
"countingEnabled": "true,false",
/*required, boolean, whether to enable people queuing-up*/
"queueTimeEnabled": "true,false",
/*required, boolean, whether to enable waiting time detection*/
"RuleInfoCap": {
/*required, queue management rule information, the number of rules is ranging from 1 to 3*/
"maxSize": 3,
/*required, integer, capability of maximum number of supported queue management rules*/
"ruleID": {
/*required, integer, rule ID*/
"@min": 1,
"@max": 3
},
"ruleName": {
/*required, string, rule name, the string size is ranging from 0 to 32*/
"@min": 0,
"@max": 32
},
"OSDOverlayEnabled": "true,false", /*required, boolean, enable OSD*/
"alarmIntervalTime": {
/*required, integer, alarm time interval, range: between 0 and 3600s, default: 300s*/
61
Device Network SDK (Queue Management) Developer Guide
"@min": 0,
"@max": 3600,
"#text": 300
},
"PersonQueueCounting":{
/*required, people queuing-up parameters*/
"alarmCount": {
/*required, integer, number threshold of persons for triggering alarm, range: between 0 and 60 persons, default: 10*/
"@min": 0,
"@max": 60,
"#text": 10
}
"countTriggerType": {
/*optional, string type, triggering type of people queuing-up alarm: "greater", "less", "equal", "unequal"-the alarm is
triggered when the number of queuing-up persons is larger than, smaller than, equal to, or not equal to the value of
alarmCount; "range"-the alarm is triggered when the number of queuing-up person is in the range between
maxAlarmCount and alarmCount*/
"@opt": "greater,less,equal,unequal,range",
"@def": "greater"
},
"maxAlarmCount": {
/*dep, integer type, maximum number of queuing-up persons to trigger alarm, it is valid when countTriggerType is
"range"*/
"@min": 0,
"@max": 60,
"#text": 5
},
"durationTime": {
/*optional, integer type, queuing-up status (number of queuing-up persons) keeping duration, which is between 0 and
3600, the default duration is 300, unit: second; the people queuing-up alarm is triggered if the number of queuing-up
persons keeps for the configured duration*/
"@min": 0,
"@max": 3600,
"#text": 300
}
},
"PersonQueueTime":{
/*required, waiting time detection parameters*/
"alarmTime": {
/*required, integer, waiting time threshold for triggering alarm, range: between 0 and 3600s, default: 600s*/
"@min": 0,
"@max": 3600,
"#text": 600
}
"timeTriggerType": {
/*optional, string type, triggering type of waiting time detection alarm: "greater", "less", "equal", "unequal"-the alarm
is triggered when waiting time is larger than, smaller than, equal to, or not equal to the value of alarmTime*/
"@opt": "greater,less,equal,unequal",
"@def": "greater"
},
},
"regionColor": {
62
Device Network SDK (Queue Management) Developer Guide
/*required, string, color of region that configured with rule, "blue, red, yellow"*/
"@opt": "blue,red,yellow",
"#text": "yellow"
},
"RegionCap": {
/*required, coordinates of region (polygon, 3 to 10 sides) that configured with rule*/
"minSize": 3,
/*required, integer, capability of minimum region sides*/
"maxSize": 10,
/*required, integer, capability of maximum region sides*/
"x": {
/*required, float, x-coordinate, range: between 0.000 and 1*/
"@min": 0.000,
"@max": 1.000,
"#text": 0.120
},
"y": {
/*required, float, y-coordinate, range: between 0.000 and 1*/
"@min": 0.000,
"@max": 1.000,
"#text": 0.120
}
}
"alarmPicEnabled":{
/*optional, boolean, whether to upload pictures (i.e., background picture and human body thumbnail) when alarm is
triggered, if this node is not supported by device, the alarm pictures will be uploaded by default*/
"@opt": "true,false",
/*"true"-upload alarm picture (default), "false"-not upload alarm pictures*/
"@def": "true"
},
"realTimeEnabled":{
/*optional, boolean, whether to upload real-time data of queue management, the corresponding event type is
"personQueueRealTime"*/
"@opt": "true,false", /*"true"-upload real-time data (default), "false"-not upload*/
"@def": "true"
}
}
},
"PersonQueueCountingCap": {
/*optional, capability of getting people queuing-up result and report*/
"fileType": {
/*optional, string, file type, "excel, txt"*/
"@opt": "excel,txt",
"#text": "excel"
},
"reportType": {
/*required, string, report type, "daily, weekly, monthly, custom"*/
"@opt": "daily,weekly,monthly,custom",
"#text": "daily"
},
"isSupportStartTime": "true,false",
/*required, bool, whether supports setting start time of searching reports*/
63
Device Network SDK (Queue Management) Developer Guide
"RuleListCap": {
/*required, rule information, up to 3 rules can be supported*/
"maxSize": 3,
/*required, integer, capability of capability of maximum number of supported queue management rules*/
"ruleID": {
/*required, integer, rule ID*/
"@min": 1,
"@max": 3
}
},
"WaitTimeListCap": {
/*required, waiting time information, up to 3 time durations are supported*/
"maxSize": 3,
/*required, integer, supported maximum number of time durations*/
"minWaitTime": {
/*required, integer, minimum waiting time, it ranges from 0s to 3600s*/
"@min": 0,
"@max": 3600
},
"maxWaitTime": {
/*required, integer, maximum waiting time, it ranges from 0s to 3600s*/
"@min": 0,
"@max": 3600
}
},
"isSupportEndTime": "true,false",
/*dep, boolean, whether support the end time of report search, and it is valid only when reportType is custom*/
"customReportAccuracy": {
/*dep, custom report accuracy, currently, it corrects to day. And it is valid only when reportType is custom*/
"@opt": "day",
"@def": "day"
}
"isSupportAverageTime": "true,false"
/*optional, boolean type, whether supports calculating average waiting time duration in people queuing-up statistics*/
},
"PersonQueueTimeCap": {
/*optional, capability of getting waiting time detection result and report*/
"fileType": {
/*optional, string, file type, "excel, txt"*/
"@opt": "excel,txt",
"#text": "excel"
},
"reportType": {
/*required, string, report types, "daily, weekly, monthly, custom"*/
"@opt": "daily,weekly,monthly, custom",
"#text": "daily"
},
"isSupportStartTime": "true,false",
/*required, bool, whether supports setting start time of searching reports*/
"RuleListCap": {
/*required, rule information, up to 3 rules can be supported*/
"maxSize": 3,
64
Device Network SDK (Queue Management) Developer Guide
/*required, integer, capability of capability of maximum number of supported queue management rules*/
"ruleID": {
/*required, integer, rule ID*/
"@min": 1,
"@max": 3
}
},
"CountListCap": {
/*required, queuing-up people amount information, up to 3 queues are supported*/
"maxSize": 3,
/*required, integer, supported maximum number of queues*/
"minCount": {
/*required, integer, minimum number of queuing-up people, it ranges from 0 to 60*/
"@min": 0,
"@max": 60
},
"maxCount": {
/*required, integer, maximum number of queuing-up people, it ranges from 0 to 60*/
"@min": 0,
"@max": 60
}
},
"isSupportEndTime": "true,false",
/*dep, boolean, whether support the end time of report search, and it is valid only when reportType is custom*/
"customReportAccuracy": {
/*dep, custom report accuracy, currently, it corrects to day. And it is valid only when reportType is custom*/
"@opt": "day",
"@def": "day"
}
}
"isSupportRawDataFile": "true,false"
/*required, boolean, whether supports getting queue management raw data*/
"isSupportAlgParam": "true,false"
/*optional, boolean type, whether supports configuring advanced parameters for algorithm library*/
}
5.10 JSON_PersonQueueRawDataFileDescription
JSON message about conditions of searching for queue management raw data
{
"PersonQueueRawDataFileDescription": { /*required, search condition of queue management raw data files*/
"searchID": , /*required, integer, search ID, which is used to save the search history for fast search at next time*/
"searchResultPosition": , /*required, integer, start position of in the search result list*/
"maxResults": , /*required, integer, number of matched records, up to 4000 records can be searched for once*/
"startTime": "", /*required, ios_8601 time, start time of search, e.g., 2004-05-03T00:00:00+08:00 or
2004-05-03T00:00:00.000Z*/
"endTime": "" /*required, ios_8601 time, end time of search, e.g., 2004-05-03T00:00:00+08:00 or
2004-05-03T00:00:00.000Z*/
}
65
Device Network SDK (Queue Management) Developer Guide
}
}
Example
Message Example
{
"PersonQueueRawDataFileDescription":{
"searchID":1,
"searchResultPosition":1,
"maxResults":4000,
"startTime":"2017-01-14T00:00:00.000Z",
"endTime":"2017-01-15T00:00:00.000Z"
}
}
5.11 JSON_PersonQueueRawDataFileResult
JSON message about results of searching for queue management raw data
{
"PersonQueueRawDataFileResult": /*required, search result of queue management raw file*/
{
"searchID": , /*required, integer, search ID, which is used to save the search history for fast search at next
time*/
"responseStatus": "", /*required, string, search status, "OK"-receiving completed, "NO MATCHES"-no data found,
"MORE"-more data to be received at next time*/
"numOfMatches": , /*required, integer, number of returned records*/
"totalMatches": , /*required, integer, total number of matched records*/
"endTime": "", /*required, ios_8601 time, time of returning the last data record, e.g., 2004-05-03T00:00:00+08:00
or 2004-05-03T00:00:00.000Z*/
"fileURL": "" /*required, string, file URL*/
}
}
Example
Message Example
{
"PersonQueueRawDataFileResult": {
"searchID": 1,
"responseStatus": "NO MATCHES",
"numOfMatches": 0,
"totalMatches": 0,
"endTime": "1970-01-01T00:00:00",
"fileURL": "http://10.10.36.163/ISAPI/Intelligent/DownloadFile?filePath=/home/
RawFile_2017-01-14T00:00:00_1970-01-01T00:00:00.xls&"
}
}
66
Device Network SDK (Queue Management) Developer Guide
5.12 JSON_PersonQueueTimeDescription
JSON message about conditions of searching for waiting time detection reports
{
"PersonQueueTimeDescription": { /*required, search condition of waiting time detection report*/
"fileType": "", /*optional, string, file type, "excel, txt"*/
"reportType": "", /*required, string, report type, "daily, weekly, monthly, custom"*/
"startTime": "", /*required, IOS8601 time, start time of searching report, e.g., 2004-05-03T00:00:00+08:00 or
2004-05-03T00:00:00.000Z*/
"RuleList": [{ /*required, rule information, up to 3 rules can be supported*/
"ruleID": , /*required, integer, rule ID, which corresponds to the region ID when configuring rule*/
}],
"WaitTimeRangeList" : [{ /*required, array, waiting time of all time periods under a single rule, up to 3 time periods
are supported*/
"minWaitTime": , /*Optional, integer, minimum waiting time, range: from 0 to 3600s*/
"maxWaitTime": , /*Optional, integer, maximum waiting time, range: from 0 to 3600s*/
}]
"endTime": "", /*dep, IOS8601t type, end time of report search, e.g., 2004-05-03T00:00:00+08:00, it is valid only
when the reportType is "custom"*/
"customReportAccuracy": "day" /*dep, cuatom report accuracy, currently, it only corrects to day, and it is valid only
when the reportType is "custom"*/
}
}
Note
At least one of minWaitTime and maxWaitTime fields is required, if only minWaitTime is
configured, it indicates no upper-limit, e.g., minWaitTime=600, maxWaitTime is reserved, the
waiting time which is longer than 600s will be searched; if only maxWaitTime is configured, it
indicates no lower-limit, e.g., maxWaitTime=600, minWaitTime is reserved, the waiting time which
is shorter than 600s will be searched.
Example
Message Example
{
"PersonQueueTimeDescription":{
"reportType":"daily","startTime":"2017-1-14T00:00:00Z",
"searchType":"rule",
"RuleList":[{
"ruleID":1
}],
"CountList":[{
"minCount":0,
"maxCount":20
}]
}
}
67
Device Network SDK (Queue Management) Developer Guide
5.13 JSON_PersonQueueTimeFileResult
JSON message about results of searching for waiting time detection report files
{
"PersonQueueTimeFileResult": /*required, search result of waiting time detection report*/
{
"fileURL": "" //file URL of waiting time detection report
}
}
Example
Message Example
{
"PersonQueueTimeFileResult": {
"fileURL": "http://10.10.36.163/ISAPI/Intelligent/DownloadFile?filePath=/home/
Day_TimeFile_2017-01-14T00:00:00.xls&"
}
}
5.14 JSON_PersonQueueTimeResult
JSON message about results of searching for waiting time detection report details
{
"PersonQueueTimeResult": { /*required, search results of waiting time detection report*/
"RuleList" : [{ /*required, array, waiting time of all time periods under multiple rules, up to 3 rules are
supported*/
"ruleID": , /*required, integer, rule ID, which corresponds to the time period ID when configuring rules*/
"WaitTimeRangeList" : [{ /*required, array, waiting time of all time periods under a single rule, up to 3 time
periods are supported*/
"minWaitTime": , /*Optional, integer, minimum waiting time, range: from 0 to 3600s*/
"maxWaitTime": 600, /*Optional, integer, maximum waiting time, range: from 0 to 3600s*/
"TimeInfoList": [{ /*required, waiting time detection report details*/
"startTime": "", /*required, IOS8601 time, start time of the time period, e.g., 2004-05-03T00:00:00+08:00 or
2004-05-03T00:00:00.000Z*/
"endTime": "", /*required, IOS8601 time, end time of the time period, e.g., 2004-05-03T00:00:00+08:00 or
2004-05-03T00:00:00.000Z*/
"time": 60 /*required, integer, waiting time: from 0 to 3600s*/
}]
}]
}]
}
}
68
Device Network SDK (Queue Management) Developer Guide
Note
● At least one of minWaitTime and maxWaitTime fields is required, if only minWaitTime is
configured, it indicates no upper-limit, e.g., minWaitTime=600, maxWaitTime is reserved, the
waiting time which is longer than 600s will be searched; if only maxWaitTime is configured, it
indicates no lower-limit, e.g., maxWaitTime=600, minWaitTime is reserved, the waiting time
which is shorter than 600s will be searched.
● For daily report, one result will be returned at each hour, total 24 results; for weekly report, one
result will be returned at each day, total 7 results; for monthly report, one result will be returned
at each day, total 30 results.
Example
Message Example
{
"PersonQueueTimeResult": {
"RuleList": [{
"ruleID": 1,
"CountRangeList": [{
"minCount": 0,
"maxCount": 20,
"TimeInfoList": [{
"time": 0,
"startTime": "2017-01-14T00:00:00",
"endTime": "2017-01-14T00:59:59"
},
{
"time": 0,
"startTime": "2017-01-14T01:00:00",
"endTime": "2017-01-14T01:59:59"
},
{
"time": 0,
"startTime": "2017-01-14T02:00:00",
"endTime": "2017-01-14T02:59:59"
},
{
"time": 0,
"startTime": "2017-01-14T03:00:00",
"endTime": "2017-01-14T03:59:59"
},
{
"time": 0,
"startTime": "2017-01-14T04:00:00",
"endTime": "2017-01-14T04:59:59"
},
{
"time": 0,
"startTime": "2017-01-14T05:00:00",
"endTime": "2017-01-14T05:59:59"
69
Device Network SDK (Queue Management) Developer Guide
},
{
"time": 0,
"startTime": "2017-01-14T06:00:00",
"endTime": "2017-01-14T06:59:59"
},
{
"time": 0,
"startTime": "2017-01-14T07:00:00",
"endTime": "2017-01-14T07:59:59"
},
{
"time": 0,
"startTime": "2017-01-14T08:00:00",
"endTime": "2017-01-14T08:59:59"
},
{
"time": 0,
"startTime": "2017-01-14T09:00:00",
"endTime": "2017-01-14T09:59:59"
},
{
"time": 0,
"startTime": "2017-01-14T10:00:00",
"endTime": "2017-01-14T10:59:59"
},
{
"time": 0,
"startTime": "2017-01-14T11:00:00",
"endTime": "2017-01-14T11:59:59"
},
{
"time": 0,
"startTime": "2017-01-14T12:00:00",
"endTime": "2017-01-14T12:59:59"
},
{
"time": 0,
"startTime": "2017-01-14T13:00:00",
"endTime": "2017-01-14T13:59:59"
},
{
"time": 0,
"startTime": "2017-01-14T14:00:00",
"endTime": "2017-01-14T14:59:59"
},
{
"time": 0,
"startTime": "2017-01-14T15:00:00",
"endTime": "2017-01-14T15:59:59"
},
{
70
Device Network SDK (Queue Management) Developer Guide
"time": 0,
"startTime": "2017-01-14T16:00:00",
"endTime": "2017-01-14T16:59:59"
},
{
"time": 0,
"startTime": "2017-01-14T17:00:00",
"endTime": "2017-01-14T17:59:59"
},
{
"time": 0,
"startTime": "2017-01-14T18:00:00",
"endTime": "2017-01-14T18:59:59"
},
{
"time": 0,
"startTime": "2017-01-14T19:00:00",
"endTime": "2017-01-14T19:59:59"
},
{
"time": 0,
"startTime": "2017-01-14T20:00:00",
"endTime": "2017-01-14T20:59:59"
},
{
"time": 0,
"startTime": "2017-01-14T21:00:00",
"endTime": "2017-01-14T21:59:59"
},
{
"time": 0,
"startTime": "2017-01-14T22:00:00",
"endTime": "2017-01-14T22:59:59"
},
{
"time": 0,
"startTime": "2017-01-14T23:00:00",
"endTime": "2017-01-14T23:59:59"
}]
}]
}]
}
}
5.15 JSON_ResponseStatus
JSON message about response status
{
"requestURL":"",
71
Device Network SDK (Queue Management) Developer Guide
5.16 XML_Cap_Schedule
Schedule capability message in XML format
<Schedule version="2.0" xmlns="http://www.isapi.org/ver20/XMLSchema">
<id><!--req, xs:string, ID--></id>
<eventType
opt="IO,VMD,videoloss,PIR,linedetection,fielddetection,audioexception,facedetection,regionEntrance,regionExiting,loi
tering,group,rapidMove,parking,unattendedBaggage,attendedBaggage,storageDetection,shipsDetection,HUMANATTRI
BUTE,humanAttribute,faceContrast,faceSnap, mixedTargetDetection">
<!--opt, xs:string, event type-->
</eventType>
<inputIOPortID><!--ro, dep, xs:string, alarm input ID--></inputIOPortID>
<outputIOPortID><!--ro, dep, xs:string, alarm output ID--></inputIOPortID>
<videoInputChannelID><!--ro, dep, xs:string, video input channel ID--></videoInputChannelID>
<TimeBlockList size="8"><!--req-->
<TimeBlock>
<dayOfWeek opt="1,2,3,4,5,6,7">
<!--opt, xs:integer, days of the week in ISO8601 time format, 1-Monday, 2-Tuesday, 3-Wednesday, 4-Thursday, 5-
Friday, 6-Saturday, 7-Sunday-->
</dayOfWeek>
<TimeRange><!--req, time periods in arming schedule-->
<beginTime><!--req, xs:time, start time of time period, in ISO8601 time format--></beginTime>
<endTime><!--req, xs:time, end time of time period, in ISO8601 time format--></endTime>
</TimeRange>
</TimeBlock>
</TimeBlockList>
<HolidayBlockList><!--opt, holiday arming period-->
<TimeBlock>
<TimeRange><!--req, time period-->
<beginTime><!--req, xs:time, start time, in ISO8601 time format--></beginTime>
72
Device Network SDK (Queue Management) Developer Guide
5.17 XML_EventNotificationAlert_AlarmEventInfo
EventNotificationAlert message with alarm/event information in XML format.
<EventNotificationAlert version="2.0" xmlns="http://www.isapi.org/ver20/XMLSchema">
<ipAddress><!--dep, xs:string, device IPv4 address--></ipAddress>
<ipv6Address><!--dep, xs:string, device IPv6 address--></ipv6Address>
<portNo><!--opt, xs:integer, device port number--></portNo>
<protocol><!--opt, xs:string, protocol type for uploading alarm/event information, "HTTP,HTTPS"--></protocol>
<macAddress><!--opt, xs:string, MAC address--></macAddress>
<channelID><!--dep, xs:string, device channel No., starts from 1--></channelID>
<dateTime><!--req, alarm/event triggered or occurred time, format: 2017-07-19T10:06:41+08:00--></dateTime>
<activePostCount><!--req, xs:integer, alarm/event frequency, starts from 1--></activePostCount>
<eventType><!--req, xs:string, alarm/event type, "peopleCounting, ANPR,..."--></eventType>
<eventState>
<!--req, xs:string, durative alarm/event status: "active"-valid, "inactive"-invalid, e.g., when a moving target is
detected,
the alarm/event information will be uploaded continuously unit the status is set to "inactive"-->
</eventState>
<eventDescription><!--req, xs:string, alarm/event description--></eventDescription>
<...><!--opt, for different alarm/event types, the nodes are different, see the message examples in different
applications--></...>
</EventNotificationAlert>
5.18 XML_EventTriggersCap
XML message about linkage capabilities of different alarm categories
<EventTriggersCap version="2.0" xmlns="http://www.isapi.org/ver20/XMLSchema">
<DiskfullTriggerCap><!--optional, xs: EventTriggerCapType--></DiskfullTriggerCap>
<DiskerrorTriggerCap><!--optional, xs: EventTriggerCapType--></DiskerrorTriggerCap>
<NicbrokenTriggerCap><!--optional, xs: EventTriggerCapType--></NicbrokenTriggerCap>
<IpconflictTriggerCap><!--optional, xs: EventTriggerCapType--></IpconflictTriggerCap>
<IllaccesTriggerCap><!--optional, xs: EventTriggerCapType--></IllaccesTriggerCap>
<BadvideoTriggerCap><!--optional, xs: EventTriggerCapType--></BadvideoTriggerCap>
<VideomismatchTriggerCap><!--optional, xs: EventTriggerCapType--></VideomismatchTriggerCap>
<IOTriggerCap><!--optional, xs: EventTriggerCapType--></IOTriggerCap>
<LineDetectTriggerCap><!--optional, xs: EventTriggerCapType--></LineDetectTriggerCap>
<RegionEntranceTriggerCap><!--optional, xs: EventTriggerCapType--></RegionEntranceTriggerCap>
<RegionExitingTriggerCap><!--optional, xs: EventTriggerCapType--></RegionExitingTriggerCap>
<LoiteringTriggerCap><!--optional, xs: EventTriggerCapType--></LoiteringTriggerCap>
<GroupDetectionTriggerCap><!--optional, xs: EventTriggerCapType--></GroupDetectionTriggerCap>
<RapidMoveTriggerCap><!--optional, xs: EventTriggerCapType--></RapidMoveTriggerCap>
73
Device Network SDK (Queue Management) Developer Guide
74
Device Network SDK (Queue Management) Developer Guide
75
Device Network SDK (Queue Management) Developer Guide
See Also
XML_EventTriggerCapType
5.19 XML_EventTriggerCapType
XML message about capability of alarm linkage action types
<EventTriggerCapType version="2.0" xmlns="http://www.isapi.org/ver20/XMLSchema">
<isSupportCenter><!--optional, xs:boolean--></isSupportCenter>
<isSupportRecord><!--optional, xs:boolean--></isSupportRecord>
<isSupportMonitorAlarm><!--optional, xs:boolean--></isSupportMonitorAlarm>
<isSupportBeep><!--optional, xs: boolean, whether it supports audible warning--></isSupportBeep>
<isSupportIO><!--optional, xs:boolean--></isSupportIO>
<isSupportFTP><!--optional, xs:boolean--></isSupportFTP>
<isSupportEmail><!--optional, xs:boolean--></isSupEmail>
<isSupportLightAudioAlarm><!--optional, xs:boolean--></isSupportLightAudioAlarm>
<isSupportFocus><!--optional, xs:boolean--></isSupportFocus>
<isSupportPTZ><!--optional, xs:boolean--></isSupportPTZ>
<maxPresetActionNum>
<!--dependent, xs:integer, it is valid only when <isSupportPTZ> is "true"-->
</maxPresetActionNum>
<maxPatrolActionNum>
<!--dependent, xs:integer, it is valid only when <isSupportPTZ> is "true"-->
</maxPatrolActionNum>
<maxPatternActionNum>
<!--dependent, xs:integer, it is valid only when <isSupportPTZ> is "true"-->
</maxPatternActionNum>
<isSupportTrack><!--optional, xs:boolean, whether it supports PTZ linked tracking--></isSupportTrack>
<isSupportWhiteLight>
76
Device Network SDK (Queue Management) Developer Guide
5.20 XML_IntelliCap
XML message about intelligent capability
77
Device Network SDK (Queue Management) Developer Guide
78
Device Network SDK (Queue Management) Developer Guide
form--></isSupportUploadHumanPictureByForm>
<isSupportMisinfoFilterStatisticalMode><!--optioal, xs:boolean, whether it supports statistics of filtering face
comparison--></isSupportMisinfoFilterStatisticalMode>
<isSupportFaceScore><!--optional, xs:boolean, whether it supports face grading configuration (camera)--></
isSupportFaceScore>
<HumanRecognitionModeSearchCap>
<searchTargetsNumMax><!--optional, xs:integer, maximum number of sample pictures that can be imported for
searching by picture--></searchTargetsNumMax>
<HumanMode>
<searchCond opt="age_group,gender,jacet_color,glass,bag,ride,unlimit"/><!--setting multiple search conditions is
supported-->
<similarity min="0.0" max="100.0"/><!--optional, xs:float, similarity, range: [0.0,100.0]-->
</HumanMode>
<HumanInfo><!--optional, person attribute information, it is required when searching for picture by attributes-->
<age_group opt="child,infant,kid,middle,middleAged,old,prime,teenager,unknown,young">
<!--optional, xs:string, age group: "child,infant,kid,middle,middleAged,old,prime,teenager,unknown,young"-->
</age_group>
<gender opt="female,male,unknown"><!--optional, xs:string, gender: "female,male,unknown"--></gender>
<jacet_color
opt="black,black,blue,brown,cyan,deepBlue,deepGray,gray,green,mixture,orange,pink,purple,red,silver,unknown,whit
e,yellow">
<!--optional, xs:string, tops color-->
</jacet_color>
<glass opt="yes,no,unknown,sunglasses"><!--optional, xs:string, whether the person is wearing glasses--></glass>
<bag opt="yes,no,unknown"><!--optional, xs:string, whether the person is carrying a bag--></bag>
<ride opt="yes,no,unknown"><!--optional, xs:string, whether the person is riding--></ride>
</HumanInfo>
<positive opt="true,false"/><!--optional, xs:boolean, whether it is false human body recognition alarm: "true"-yes,
"false"-no-->
<eventType opt="unlimit,humanRecognition">
<!--optional, xs:string, event type: "unlimit"-no limit, "humanRecognition"-human body detection alarm-->
</eventType>
<isSupportMultiChannelSearch>
<!--optional, xs:boolean, whether it supports multi-channel search-->
</isSupportMultiChannelSearch>
<isSupportTotalSearchResult>
<!--optional, xs:boolean, whether it supports limiting number of results that can be obtained after a single search--
>
</isSupportTotalSearchResult>
</HumanRecognitionModeSearchCap>
<VehicleRecognitionModeSearchCap>
<searchTargetsNumMax><!--optional, xs:integer, maximum number of sample pictures that can be imported for
searching by picture--></searchTargetsNumMax>
<eventType opt="unlimit,vehicleBlackList,vehicleWhiteList"/><!--xs:string, event type: "unlimit"-no limit,
"vehicleBlackList"-vehicle blocklist, "vehicleWhiteList"-vehicle allowlist-->
<VehicleMode>
<searchCond opt="licensePlate,vehicleLogo,vehicleSubLogoRecog,vehicleType,vehicleColor,unlimit"/>
<similarity min="0.0" max="100.0"/><!--optional, xs:float, similarity, range: [0.0,100.0]-->
</VehicleMode>
<isSupportMultiChannelSearch>
<!--optional, xs:boolean, whether it supports multi-channel search-->
</isSupportMultiChannelSearch>
79
Device Network SDK (Queue Management) Developer Guide
<isSupportTotalSearchResult>
<!--optional, xs:boolean, whether it supports limiting number of results that can be obtained after a single search--
>
</isSupportTotalSearchResult>
</VehicleRecognitionModeSearchCap>
<FaceContrastAnalyzeCap><!--capability of manual comparison and analysis of face pictures-->
<isSupportTrigger opt="false,true"><!--optional, xs:boolean--></isSupportTrigger>
<SearchCondition><!--optional-->
<startTime><!--required, xs:time, ISO8601 time--></startTime>
<endTime><!--required, xs:time, ISO8601 time--></endTime>
</SearchCondition>
</FaceContrastAnalyzeCap>
<FramesPeopleCountingCap><!--capability of people counting statistics in a single frame-->
<Statistics>
<SearchCondition>
<startTime><!--required, xs:time,ISO8601 time--></startTime>
<endTime><!--required, xs:time,ISO8601 time--></endTime>
</SearchCondition>
</Statistics>
<MaskRegion><!--optional, shielded region-->
<maxRegionNum><!--optional, xs:integer, number of regions--></maxRegionNum>
<Region>
<vertexNum min="3" max="10"><!--optional, xs:integer, number of region vertexes--></vertexNum>
</Region>
</MaskRegion>
</FramesPeopleCountingCap>
<FaceContrastPersonInfoExtend><!--configuration capability of face comparison tag-->
<personInfoCap>
<maxPersonInfo min="0" max="4">
<!--optional, xs:integer, maximum number of person tags-->
</maxPersonInfo>
</personInfoCap>
<personInfoFDlibCap>
<maxPersonInfo min="0" max="4">
<!--optional, xs:integer, maximum number of person tags-->
</maxPersonInfo>
</personInfoFDlibCap>
</FaceContrastPersonInfoExtend>
<isSupportSafetyHelmetDetection>
<!-- opt, xs:boolean, whether it supports hard hat detection-->
</isSupportSafetyHelmetDetection>
<isSupportDistanceRecognition><!--optional, xs:boolean, whether supports distance measurement--></
isSupportDistanceRecognition>
<isSupportATM><!--optional, xs:boolean, ATM intelligent configuraiton, corresponds to URI: /ISAPI/Intelligent/ATM/
capabilities?format=json--></isSupportATM>
<isSupportFaceTemperature><!--optional, xs:boolean, whether the device supports face thermography, corresponds
to URI: /ISAPI/Intelligent/faceTemperature/capabilities?format=json--></isSupportFaceTemperature>
<isSupportFireEscapeDetectionSearch>
<!--optional, xs:boolean, whether the device supports searching for fire engine access detection events of multiple
channels (related URI: URI/ISAPI/Intelligent/fireEscapeDetection/search/capabilities?format=json)-->
</isSupportFireEscapeDetectionSearch>
<isSupportTakingElevatorDetectionSearch>
80
Device Network SDK (Queue Management) Developer Guide
<!--optional, xs:boolean, whether the device supports searching for elevator detection events of multiple channels
(related URI: /ISAPI/Intelligent/takingElevatorDetection/search/capabilities?format=json)-->
</isSupportTakingElevatorDetectionSearch>
<isSupportCityManagementSearch>
<!--optional, xs:boolean, whether the device supports searching for city management events of multiple channels
(related URI: /ISAPI/Intelligent/cityManagement/search/capabilities?format=json)-->
</isSupportCityManagementSearch>
<isSupportSafetyHelmetDetectionSearch>
<!--optional, xs:boolean, whether the device supports searching for hard hat detection events of multiple channels
(related URI: /ISAPI/Intelligent/safetyHelmetDetection/search/capabilities?format=json)-->
</isSupportSafetyHelmetDetectionSearch>
<isSupportFramesPeopleCountingSearch>
<!--optional, boolean, ro, whether it supports searching for the regional people counting event (related URI: /ISAPI/
Intelligent/framesPeopleCounting/search/capabilities?format=json)-->true
</isSupportFramesPeopleCountingSearch>
<isSupportChannelPollingSchedules>
<!--optional, xs:boolean, whether the device supports channel polling configuration: "true,false"-->
</isSupportChannelPollingSchedules>
<AnalysisImageFaceCap>
<!--optional, face picture analysis type (related URI:/ISAPI/Intelligent/analysisImage/face)-->
<modeling opt="false"><!--optional,xs:boolean, whether the device supports modeling: "true,false"--></
modeling>
</AnalysisImageFaceCap>
</IntelliCap>
5.21 XML_ResponseStatus
XML message about response status
<?xml version="1.0" encoding="utf-8"?>
<ResponseStatus version="2.0" xmlns="http://www.std-cgi.org/ver20/XMLSchema">
<requestURL>
<!--required, read-only, xs:string, request URL-->
</requestURL>
<statusCode>
<!--required, read-only, xs:integer, status code: 0,1-OK, 2-Device Busy, 3-Device Error, 4-Invalid Operation, 5-Invalid
XML Format, 6-Invalid XML Content, 7-Reboot Required, 9-Additional Error-->
</statusCode>
<statusString>
<!--required, read-only, xs:string, status description: OK, Device Busy, Device Error, Invalid Operation, Invalid XML
Format, Invalid XML Content, Reboot, Additional Error-->
</statusString>
<subStatusCode>
<!--required, read-only, xs:string, describe the error reason in detail-->
</subStatusCode>
<MErrCode>
<!--optional, xs:string, error code categorized by functional modules, e.g., 0x12345678-->
</MErrCode>
<MErrDevSelfEx>
<!--optional, xs:string, extension field of MErrCode. It is used to define the custom error code, which is categorized
81
Device Network SDK (Queue Management) Developer Guide
by functional modules-->
</MErrDevSelfEx>
</ResponseStatus>
82
Device Network SDK (Queue Management) Developer Guide
A.1 DATE_TIME
A.2 NET_DVR_DEVICEINFO_V30
Device parameter structure (V30).
83
Device Network SDK (Queue Management) Developer Guide
search.
● bySupport&0x2: whether supports backup.
encoding parameters.
● bySupport&0x8: whether supports dual-NIC.
SADP.
● bySupport&0x20: whether supports RAID
card.
● bySupport&0x40: whether supports
RTSP.
bySupport1 BYTE Extended capabilities, if the result of bitwise
operation is 0, it refers that the capability is not
supported, if the result is 1, it indicates that the
capability is supported.
● bySupport1&0x1: whether supports SNMP
84
Device Network SDK (Queue Management) Developer Guide
version 40.
● bySupport2&0x4: whether supports ANR.
device status.
● bySupport2&0x40: whether supports
encrypting stream.
wDevType WORD Device model
bySupport3 BYTE Extended capabilities, if the result of bitwise
operation is 0, it refers that the capability is not
supported, while, if the result is 1, it indicates
that the capability is supported.
● bySupport3&0x1: whether supports multi-
stream.
● bySupport3&0x4: whether supports
85
Device Network SDK (Queue Management) Developer Guide
third-stream.
● byMultiStreamProto&0x2: whether supports
fourth-stream.
● byMultiStreamProto&0x40: whether
supports sub-stream.
byStartDChan BYTE Start No. of digital channel, 0-no digital channel
(e.g., DVR, network camera).
byStartDTalkChan BYTE Start No. of two-way audio channel, 0-no two-
way audio channel.
byHighDChanNum BYTE Number of digital channels, high 8-bit.
bySupport4 BYTE Extended capabilities, if the result of bitwise
operation is 0, it refers that the capability is not
supported, if the result is 1, it indicates that the
capability is supported.
● bySupport4&0x01: whether all stream types
supported by device.
● byLanguageType&0x1: whether supports
Chinese.
● byLanguageType&0x2: whether supports
English.
byVoiceInChanNum BYTE Number of audio input channels
86
Device Network SDK (Queue Management) Developer Guide
Remarks
● The maximum number of digital channels equal to byIPChanNum+byHighDChanNum*256.
● For login via text protocol, the following parameters are not supported: byMainProto,
bySubProto, bySupport, bySupport1, bySupport2, bySupport3, bySupport4, bySupport5,
bySupport6, bySupport7, byMultiStreamProto, byStartDTalkChan, byVoiceInChanNum,
byStartVoiceInChanNo, byMirrorChanNum, and wStartMirrorChanNo.
See Also
NET_DVR_DEVICEINFO_V40
A.3 NET_DVR_DEVICEINFO_V40
87
Device Network SDK (Queue Management) Developer Guide
88
Device Network SDK (Queue Management) Developer Guide
Remarks
● Four character types are allowed in the password, including digits, lowercase letters, uppercase
letters and symbols. The maximum password length is 16 bits, and there are four password
strength levels, see details below:
89
Device Network SDK (Queue Management) Developer Guide
○ Level 0 (Risky Password): The password length is less than 8 bits, or only contains one kind of
the character types. Or the password is the same with the user name, or is the mirror writing
of the user name.
○ Level 1 (Weak Password): The password length is more than or equal to 8 bits, and contains
two kinds of the character types. Meanwhile, the combination should be (digits + lowercase
letters) or (digits + uppercase letters).
○ Level 2 (Medium Password): The password length is more than or equal to 8 bits, and contains
two kinds of the character types. Meanwhile, the combination cannot be (digits + lowercase
letters) and (digits + uppercase letters).
○ Level 3 (Strong Password): The password length is more than or equal to 8 bits, and at least
A.4 NET_DVR_INIT_CFG_ABILITY
90
Device Network SDK (Queue Management) Developer Guide
Remarks
By default, up to 2048 channels are supported. More channels require higher computer
performance and network bandwidth.
See Also
NET_DVR_SetSDKInitCfg
A.5 NET_DVR_LOCAL_SDK_PATH
Remarks
If the path of HCNetSDKCom folder and HCNetSDK libraries are same, but the path of executable
programs are different, you can call NET_DVR_SetSDKInitCfg to specify the path of HCNetSDKCom
folder to make sure the component libraries are loaded normally.
A.6 NET_DVR_USER_LOGIN_INFO
91
Device Network SDK (Queue Management) Developer Guide
A.7 NET_SDK_CALLBACK_STATUS_NORMAL
92
Device Network SDK (Queue Management) Developer Guide
A.8 NET_VCA_RECT
A.9 NET_DVR_CRUISECHAN_INFO
93
Device Network SDK (Queue Management) Developer Guide
A.10 NET_DVR_EVENT_SCHEDULE
A.11 NET_DVR_EVENT_TRIGGER
94
Device Network SDK (Queue Management) Developer Guide
A.12 NET_DVR_HANDLEEXCEPTION_V41
mail
● 0x20: trigger wireless sound and light alarm
only)
● 0x200: capture picture and upload to FTP
detection)
● 0x800: PTZ linkage (speed dome tracks the
target)
● 0x1000: capture picture and upload to cloud
storage.
● 0x10000: message alarm
95
Device Network SDK (Queue Management) Developer Guide
A.13 NET_DVR_MIME_UNIT
See Also
NET_DVR_XML_CONFIG_INPUT
A.14 NET_DVR_PRESETCHAN_INFO
96
Device Network SDK (Queue Management) Developer Guide
A.15 NET_DVR_PTZTRACKCHAN_INFO
A.16 NET_DVR_SCHEDTIME
A.17 NET_DVR_STD_ABILITY
97
Device Network SDK (Queue Management) Developer Guide
Remarks
For different capability types (which depend on the parameter dwAbilityType in the API
NET_DVR_GetSTDAbility ), the condition parameter lpCondBuffer and output parameter
lpOutBuffer are different. For details, refer to the typical applications.
A.18 NET_DVR_STD_CONFIG
98
Device Network SDK (Queue Management) Developer Guide
A.19 NET_DVR_XML_CONFIG_INPUT
99
Device Network SDK (Queue Management) Developer Guide
Related API
NET_DVR_STDXMLConfig
A.20 NET_DVR_XML_CONFIG_OUTPUT
100
Device Network SDK (Queue Management) Developer Guide
Related API
NET_DVR_STDXMLConfig
A.21 NET_ALARM_CVR_SUBINFO_UNION
A.22 NET_ALARM_RECORD_EXCEPTION
101
Device Network SDK (Queue Management) Developer Guide
A.23 NET_ALARM_RECORDFILE_LOSS
102
Device Network SDK (Queue Management) Developer Guide
A.24 NET_ALARM_RESOURCE_USAGE
A.25 NET_ALARM_STREAM_EXCEPTION
A.26 NET_DVR_ALARMER
103
Device Network SDK (Queue Management) Developer Guide
A.27 NET_DVR_ALARMINFO_DEV
104
Device Network SDK (Queue Management) Developer Guide
Remarks
For pNO: if dwAlarmType is 0, 3, 6, or 7, it may be channel No.; if dwAlarmType is 5, it may be disk
No.
A.28 NET_DVR_ALARMINFO_DEV_V40
105
Device Network SDK (Queue Management) Developer Guide
Remarks
For pNO: if dwAlarmType is 0, 3, 6, or 7, it may be channel No.; if dwAlarmType is 5, it may be disk
No.
A.29 NET_DVR_ALARMINFO_V30
106
Device Network SDK (Queue Management) Developer Guide
Remarks
The time interval to upload the alarm of face picture library changed is 1 hour; for other alarm
type, the alarm information is uploaded in real-time, and the time interval is 1s. Currently, editing
the time interval is not supported.
A.30 NET_DVR_ALARMINFO_V40
Remarks
● The time interval to upload the alarm of face picture library changed is 1 hour; for other alarm
type, the alarm information is uploaded in real-time, and the time interval is 1s. Currently,
editing the time interval is not supported.
● The content of pAlarmData varies with the value of dwAlarmType in the structure
NET_DVR_ALRAM_FIXED_HEADER , see details in the table below:
107
Device Network SDK (Queue Management) Developer Guide
A.31 NET_DVR_ALRAM_FIXED_HEADER
108
Device Network SDK (Queue Management) Developer Guide
109
Device Network SDK (Queue Management) Developer Guide
110
Device Network SDK (Queue Management) Developer Guide
Table A-6 Structure about Alarm Parameters of Education Sharing System (struRecordingHost)
Member Data Type Description
bySubAlarmType BYTE Alarm minor type: 1-one-touch post-record
byRes1 Array of BYTE Reserved, set to 0. The maximum size is 3 bytes.
struRecordEndTime NET_DVR_TIME_EX Recording end time.
Table A-7 Structure about Alarm Parameters of Supply Voltage Exception (struVoltageInstable)
Member Data Type Description
fVoltageValue float Supply voltage, unit: V, corrects to one decimal
place.
byVoltageAlarmType BYTE Supply voltage exception type: 0-high supply
voltage, 1-low supply voltage
byRes1 Array of BYTE Reserved, set to 0. The maximum size is 3 bytes.
Remarks
dwAlarmType==0, 23 corresponds to the structure struIOAlarm; dwAlarmType==
2/3/6/9/10/11/13/15/16/28 corresponds to the structure struAlarmChannel; dwAlarmType==
111
Device Network SDK (Queue Management) Developer Guide
A.32 NET_DVR_ALARM_ISAPI_INFO
Remarks
When enabling the listening mode, you should call the network configuration API based on text
protocol to set the IP address for the listening service.
112
Device Network SDK (Queue Management) Developer Guide
A.33 NET_DVR_ALARM_ISAPI_PICDATA
A.34 NET_DVR_ETHERNET_V30
113
Device Network SDK (Queue Management) Developer Guide
A.35 NET_DVR_IPADDR_UNION
IP Address Union
A.36 NET_DVR_NETCFG_V50
114
Device Network SDK (Queue Management) Developer Guide
Remarks
● For device only supports the private protocol with version 3.0 or lower, when the parameter
byUseDhcp="0xff", you should set the device IP address to null, and then the device will
automatically get the DHCP information.
● When the parameter byIPv6Mode is set to 0 or 2, setting IPv6 address in the parameter
struEtherNet is not required, it will be obtained automatically by the device; when byIPv6Mode
is set to 1, you should set IPv6 address. As there are multiple IPv6 addresses, the IPv6 address of
current logged-in device may be different with that in struEtherNet.
A.37 NET_DVR_PPPOECFG
115
Device Network SDK (Queue Management) Developer Guide
A.38 NET_DVR_SETUPALARM_PARAM_V50
116
Device Network SDK (Queue Management) Developer Guide
1-yes.
● bit1-whether to enable ANR for people
no, 1-yes.
● bit3-whether to enable ANR for face capture:
0-no, 1-yes.
● bit4-whether to enable ANR for face picture
117
Device Network SDK (Queue Management) Developer Guide
data, 1-URL
● bit1-type of picture uploaded in message: 0-
binary, 1-URL
● bit2-type of picture uploaded for face picture
118
Device Network SDK (Queue Management) Developer Guide
Remarks
● The parameters byLevel and byAlarmInfoType are available for traffic cameras. Up to 1 cameras
can be armed in the priority of level 0, up to 3 cameras can be armed in the priority of level 1,
and up to 5 cameras can be armed in the priority of level 3, the alarm/event information from
the camera in highest priority will be uploaded first.
● For arming via client software, only supports arming one channel, and supports uploading the
alarm/event when device is offline; for real-time arming, up to four channels can be armed at
same time, but uploading alarm/event when device is offline is not supported.
● The parameter wTaskNo is used to distinguish different arming connections. If the value of this
parameter in different arming connections is same, error will be returned.
A.39 NET_DVR_TIME
A.40 NET_DVR_TIME_EX
119
Device Network SDK (Queue Management) Developer Guide
120
Device Network SDK (Queue Management) Developer Guide
Appendix B. Appendixes
General Errors
121
Device Network SDK (Queue Management) Developer Guide
122
Device Network SDK (Queue Management) Developer Guide
123
Device Network SDK (Queue Management) Developer Guide
124
Device Network SDK (Queue Management) Developer Guide
125
Device Network SDK (Queue Management) Developer Guide
126
Device Network SDK (Queue Management) Developer Guide
127
Device Network SDK (Queue Management) Developer Guide
128
Device Network SDK (Queue Management) Developer Guide
129
Device Network SDK (Queue Management) Developer Guide
130
Device Network SDK (Queue Management) Developer Guide
131
Device Network SDK (Queue Management) Developer Guide
132
Device Network SDK (Queue Management) Developer Guide
133
Device Network SDK (Queue Management) Developer Guide
134
Device Network SDK (Queue Management) Developer Guide
135
Device Network SDK (Queue Management) Developer Guide
136
Device Network SDK (Queue Management) Developer Guide
137
Device Network SDK (Queue Management) Developer Guide
138
Device Network SDK (Queue Management) Developer Guide
139
Device Network SDK (Queue Management) Developer Guide
140
Device Network SDK (Queue Management) Developer Guide
141
Device Network SDK (Queue Management) Developer Guide
142
Device Network SDK (Queue Management) Developer Guide
143
Device Network SDK (Queue Management) Developer Guide
144
Device Network SDK (Queue Management) Developer Guide
145
Device Network SDK (Queue Management) Developer Guide
146
Device Network SDK (Queue Management) Developer Guide
147
Device Network SDK (Queue Management) Developer Guide
148
Device Network SDK (Queue Management) Developer Guide
149
Device Network SDK (Queue Management) Developer Guide
150
Device Network SDK (Queue Management) Developer Guide
151
Device Network SDK (Queue Management) Developer Guide
152
Device Network SDK (Queue Management) Developer Guide
153
Device Network SDK (Queue Management) Developer Guide
154
Device Network SDK (Queue Management) Developer Guide
155
Device Network SDK (Queue Management) Developer Guide
156
Device Network SDK (Queue Management) Developer Guide
157
Device Network SDK (Queue Management) Developer Guide
158
Device Network SDK (Queue Management) Developer Guide
159
Device Network SDK (Queue Management) Developer Guide
160
Device Network SDK (Queue Management) Developer Guide
161
Device Network SDK (Queue Management) Developer Guide
162
Device Network SDK (Queue Management) Developer Guide
163
Device Network SDK (Queue Management) Developer Guide
StatusCode=1
164
Device Network SDK (Queue Management) Developer Guide
StatusCode=2
StatusCode=3
165
Device Network SDK (Queue Management) Developer Guide
166
Device Network SDK (Queue Management) Developer Guide
167
Device Network SDK (Queue Management) Developer Guide
168
Device Network SDK (Queue Management) Developer Guide
StatusCode=4
169
Device Network SDK (Queue Management) Developer Guide
170
Device Network SDK (Queue Management) Developer Guide
171
Device Network SDK (Queue Management) Developer Guide
172
Device Network SDK (Queue Management) Developer Guide
173
Device Network SDK (Queue Management) Developer Guide
174
Device Network SDK (Queue Management) Developer Guide
175
Device Network SDK (Queue Management) Developer Guide
176
Device Network SDK (Queue Management) Developer Guide
177
Device Network SDK (Queue Management) Developer Guide
178
Device Network SDK (Queue Management) Developer Guide
179
Device Network SDK (Queue Management) Developer Guide
180
Device Network SDK (Queue Management) Developer Guide
181
Device Network SDK (Queue Management) Developer Guide
182
Device Network SDK (Queue Management) Developer Guide
183
Device Network SDK (Queue Management) Developer Guide
184
Device Network SDK (Queue Management) Developer Guide
185
Device Network SDK (Queue Management) Developer Guide
186
Device Network SDK (Queue Management) Developer Guide
187
Device Network SDK (Queue Management) Developer Guide
188
Device Network SDK (Queue Management) Developer Guide
189
Device Network SDK (Queue Management) Developer Guide
190
Device Network SDK (Queue Management) Developer Guide
191
Device Network SDK (Queue Management) Developer Guide
192
Device Network SDK (Queue Management) Developer Guide
193
Device Network SDK (Queue Management) Developer Guide
194
Device Network SDK (Queue Management) Developer Guide
StatusCode=5
StatusCode=6
195
Device Network SDK (Queue Management) Developer Guide
196
Device Network SDK (Queue Management) Developer Guide
197
Device Network SDK (Queue Management) Developer Guide
198
Device Network SDK (Queue Management) Developer Guide
199
Device Network SDK (Queue Management) Developer Guide
200
Device Network SDK (Queue Management) Developer Guide
201
Device Network SDK (Queue Management) Developer Guide
StatusCode=7
202