NetSDK - JAVA Programming Manual (Intelligent AI)
NetSDK - JAVA Programming Manual (Intelligent AI)
Welcome to use NetSDK (hereinafter referred to be "SDK") programming manual (hereinafter referred
to be "the Manual").
SDK, also known as network device SDK, is a development kit for developer to develop the interfaces
for network communication among surveillance products such as Network Video Recorder (NVR),
Network Video Server (NVS), IP camera (IPC), Speed Dome (SD), and intelligence devices.
The Manual describes the SDK interfaces and calling processes of the general function modules for
NVR, EVS, HDCVI and other storage products. For more function interfaces and data structures, refer
to NetSDK Development Manual.chm.
The example codes provided in the Manual are only for demonstrating the procedure and not
Intended readers
Programming Manual
Software development engineers, product managers and project managers who use SDK.
Safety Instructions
The following categorized signs and words with defined meaning might appear in the Manual.
Identification Description
Indicates a high potential hazard which, if not avoided, will result in
death or serious injury.
Indicates a medium or low potential hazard which, if not avoided,
could result in slight or moderate injury.
Indicates a potential risk which, if not avoided, could result in
property damage, data loss, lower performance, or unpredictable
result.
V1.0.3
I
Foreword
Safety Instructions
The following categorized signs and words with defined meaning might appear in the Manual.
Signal Words Meaning
TIPS Provides methods to help you solve a problem or save you time.
Revision History
II
Glossary
This chapter provides the definitions to some of the terms appearing in the Manual to help you
understand the function of each module.
Term Explanation
Detect the faces and their feature information (age, gender, and
Target detection
expression) through the intelligent analysis of videos.
Detect whether the faces are in the armed face library through the
Target recognition
intelligent analysis of videos, including target detection.
Detect whether the faces are in the face library in real time by importing
Face library some face images into IVSS, NVR, camera IPC, and other devices in
advance.
Intelligent Traffic Camera, which can capture vehicle images and
ITC
automatically analyze traffic events.
Tripwire detection Detection of crossing the warning line.
Detection of objects intruding into the warning zone, including
Intrusion detection
"Crossing region" and "In the region".
People counting Number of people in the camera calibration region.
III
Table of Contents
Foreword ........................................................................................................................................................... II
Glossary ........................................................................................................................................................... III
1 Overview ........................................................................................................................................................ 1
General ........................................................................................................................................................................................... 1
Applicability ................................................................................................................................................................................. 2
Application Scenarios ............................................................................................................................................................... 2
1.3.1 Target Detection/ Target Recognition/Human Detection ............................................................................. 2
1.3.2 People Counting ........................................................................................................................................................... 2
1.3.3 Intelligent Traffic ........................................................................................................................................................... 3
1.3.4 General Behavior........................................................................................................................................................... 4
1.3.5 Turnstile ............................................................................................................................................................................ 5
2 General Functions ......................................................................................................................................... 7
NetSDK Initialization ................................................................................................................................................................. 7
2.1.1 Introduction .................................................................................................................................................................... 7
2.1.2 Interface Overview ....................................................................................................................................................... 7
2.1.3 Process Description ...................................................................................................................................................... 7
2.1.4 Sample Code................................................................................................................................................................... 8
Device Login ..............................................................................................................................................................................10
2.2.1 Introduction ..................................................................................................................................................................10
2.2.2 Interface Overview .....................................................................................................................................................10
2.2.3 Process Description ....................................................................................................................................................11
2.2.4 Sample Code.................................................................................................................................................................12
Real-Time Monitoring.............................................................................................................................................................14
2.3.1 Introduction ..................................................................................................................................................................14
2.3.2 Interface Overview .....................................................................................................................................................14
2.3.3 Process Description ....................................................................................................................................................14
2.3.4 Sample Code.................................................................................................................................................................18
Subscription to Intelligent Event........................................................................................................................................20
2.4.1 Introduction ..................................................................................................................................................................20
2.4.2 Interface Overview .....................................................................................................................................................20
2.4.3 Process Description ....................................................................................................................................................21
2.4.4 Sample Code.................................................................................................................................................................22
3 Target Detection .......................................................................................................................................... 25
Subscription to Event .............................................................................................................................................................25
3.1.1 Introduction ..................................................................................................................................................................25
3.1.2 Process Description ....................................................................................................................................................25
3.1.3 Enumeration and Structure ....................................................................................................................................25
Sample Code ..............................................................................................................................................................................25
4 Target Recognition ...................................................................................................................................... 27
Subscription to Event .............................................................................................................................................................27
4.1.1 Introduction ..................................................................................................................................................................27
4.1.2 Process Description ....................................................................................................................................................27
4.1.3 Enumeration and Structure ....................................................................................................................................27
Sample Code ..............................................................................................................................................................................27
IV
5 General Behavior ......................................................................................................................................... 30
Subscription to Event .............................................................................................................................................................30
5.1.1 Introduction ..................................................................................................................................................................30
5.1.2 Process Description ....................................................................................................................................................30
5.1.3 Enumeration and Structure ....................................................................................................................................30
Sample Code ..............................................................................................................................................................................30
6 Human Detection ........................................................................................................................................ 33
Subscription to Event .............................................................................................................................................................33
6.1.1 Introduction ..................................................................................................................................................................33
6.1.2 Process Description ....................................................................................................................................................33
6.1.3 Enumeration and Structure ....................................................................................................................................33
Sample Code ..............................................................................................................................................................................33
7 Thermal Temperature Event........................................................................................................................ 36
Subscription to Event .............................................................................................................................................................36
7.1.1 Introduction ..................................................................................................................................................................36
7.1.2 Process Description ....................................................................................................................................................36
7.1.3 Enumeration and Structure ....................................................................................................................................36
Sample Code ..............................................................................................................................................................................36
8 Access Control Event ................................................................................................................................... 38
Event Subscription...................................................................................................................................................................38
8.1.1 Introduction ..................................................................................................................................................................38
8.1.2 Process Description ....................................................................................................................................................38
8.1.3 Enumeration and Structure ....................................................................................................................................38
Sample Code ..............................................................................................................................................................................38
9 People Counting .......................................................................................................................................... 40
Introduction ...............................................................................................................................................................................40
Interface Overview ..................................................................................................................................................................40
Process Description .................................................................................................................................................................41
Sample Code ..............................................................................................................................................................................41
10 Intelligent Traffic Event ............................................................................................................................. 44
Subscription to Event ...........................................................................................................................................................44
10.1.1 Introduction ...............................................................................................................................................................44
10.1.2 Process Description .................................................................................................................................................44
10.1.3 Enumeration and Structure ..................................................................................................................................44
Sample Code ...........................................................................................................................................................................46
11 Person and ID Card Comparison............................................................................................................... 67
Subscription to Event ...........................................................................................................................................................67
11.1.1 Introduction ...............................................................................................................................................................67
11.1.2 Process Description .................................................................................................................................................67
11.1.3 Enumeration and Structure ..................................................................................................................................67
Sample Code ...........................................................................................................................................................................67
12 Interface ..................................................................................................................................................... 71
SDK Initialization ....................................................................................................................................................................71
12.1.1 CLIENT_Init .................................................................................................................................................................71
12.1.2 CLIENT_Cleanup .......................................................................................................................................................71
12.1.3 CLIENT_SetAutoReconnect ..................................................................................................................................71
12.1.4 CLIENT_SetNetworkParam ...................................................................................................................................72
V
Device Login ............................................................................................................................................................................72
12.2.1 CLIENT_LoginWithHighLevelSecurity...............................................................................................................72
12.2.2 CLIENT_Logout..........................................................................................................................................................72
Real-time Monitoring ...........................................................................................................................................................73
12.3.1 CLIENT_RealPlayEx...................................................................................................................................................73
12.3.2 CLIENT_StopRealPlayEx .........................................................................................................................................73
Subscribing Intelligent Event ............................................................................................................................................74
12.4.1 CLIENT_RealLoadPictureEx ...................................................................................................................................74
12.4.2 CLIENT_StopLoadPic ...............................................................................................................................................75
Subscribing People Counting ...........................................................................................................................................75
12.5.1 CLIENT_AttachVideoStatSummary ....................................................................................................................75
12.5.2 CLIENT_DetachVideoStatSummary...................................................................................................................76
13 Callback...................................................................................................................................................... 77
Note ............................................................................................................................................................................................77
fDisConnectCallBack ............................................................................................................................................................77
fHaveReConnectCallBack ...................................................................................................................................................77
fRealDataCallBackEx .............................................................................................................................................................77
fAnalyzerDataCallBack .........................................................................................................................................................78
fVideoStatSumCallBack .......................................................................................................................................................78
Cybersecurity Recommendations ............................................................................................. 80
Intelligent Event ......................................................................................................................... 82
VI
1 Overview
General
This manual mainly introduces the reference information for SDK intrefaces, including main functions,
interface functions, and callback.
The main functions include general functions, target detection, target recognition, general behavior
event, human detection, thermal temperature, access control event, people counting statistics,
intelligent traffic, and person and ID card comparison.
For files included in Windows , see Table 1-1.
The function library and configuration library of NetSDK are necessary libraries.
The function library is the main body of NetSDK, which is used for communication interaction
between client and products, remote control, search, configuration, acquisition and processing
of stream data.
Configuration library packs and parses according to the structural body of the configuration
function.
It is recommended use play library to parse stream and play.
If the function library includes avnetsdk.dll or libavnetsdk.so, the corresponding auxiliary library
is required.
1
Applicability
Recommended memory: No less than 512 M.
Jdk version: jdk1.6; jdk1.8.
Systems supported by SDK:
Windows 10/Windows 8.1/Windows 7/ 2000 and Windows Server 2008/2003.
Linux
General Linux system like Red Hat/SUSE
Application Scenarios
2
People counting scenario
ITC at the entrance and exit of the parking lot is used for controlling vehicles for entering and
exiting the parking lot and monitoring whether there are parking spaces available. See Figure
1-4.
3
Applications of ITC at the entrance and exit of the parking lot
4
General behavior scenario—tripwire
1.3.5 Turnstile
The access control turnstile is mainly applied in parks, scenic areas, schools, residence areas, and
office buildings. After the collected face images and personnel information is uploaded to the
platform, the platform issues the data to the turnstile system.
For the appearance of the access control turnstile, see Figure 1-7.
5
Swing turnstile appearance
You can unlock the turnstile by face or swiping card. For unlocking by face, see Figure 1-8.
Unlocking by face
6
2 General Functions
NetSDK Initialization
2.1.1 Introduction
Initialization is the first step of SDK to conduct all the function modules. It does not have the
surveillance function but can set some parameters that affect the SDK overall functions.
Initialization occupies some memory.
Only the first initialization is valid within one process.
After initialization, call the SDK cleaning up interface to release resource.
Start
End Optional
Process Description
7
(Optional) Call CLIENT_SetAutoReconnect to set reconnection callback to allow the auto
reconnecting after disconnection within SDK.
(Optional) Call CLIENT_SetNetworkParam to set network login parameter that includes the
timeout period for device login and the number of attempts.
After using all SDK functions, call CLIENT_Cleanup to release SDK resource.
Notes
You need to call the interfaces CLIENT_Init and CLIENT_Cleanup in pairs. It supports
single-thread multiple calling in pairs, but it is suggested to call for only once overall.
Initialization: Internally calling the interface CLIENT_Init multiple times is only for internal count
without repeating applying resources.
Cleaning up: The interface CLIENT_Cleanup clears all the opened processes, such as login,
real-time monitoring, and alarm subscription.
Reconnection: SDK can set the reconnection function for the situations such as network
disconnection and power off. SDK will keep logging until succeeded. Only the real-time
monitoring and playback function modules can be restored after reconnection.
import main.java.com.netsdk.lib.NetSDKLib;
import main.java.com.netsdk.lib.NetSDKLib.LLong;
import main.java.com.netsdk.lib.ToolKits;
import com.sun.jna.ptr.IntByReference;
/**
* login interface realization
* mainly includes: initialization, login, logout
*/
public class LoginModule {
// login handle
public static LLong m_hLoginHandle = new LLong(0);
//initialization
public static boolean init(NetSDKLib.fDisConnect disConnect,
NetSDKLib.fHaveReConnect haveReConnect) {
bInit = netsdk.CLIENT_Init(disConnect, null);
8
if(!bInit) {
System.out.println("Initialize SDK failed");
return false;
}
9
return true;
}
//clearing environment
public static void cleanup() {
if(bLogopen) {
netsdk.CLIENT_LogClose();
}
if(bInit) {
netsdk.CLIENT_Cleanup();
}
}
}
Device Login
2.2.1 Introduction
Device login, also called user authentication, is the precondition of all the other function modules.
You can obtain a unique login ID upon logging in to the device and should pass in login ID before
using other SDK interfaces. The login ID becomes invalid once logged out.
10
2.2.3 Process Description
Login process
Start
Log ou t
CLIENT_Log out
End
Process Description
Notes
Login handle: When the login is successful, the returned value of the interface is not 0 (even the
handle is smaller than 0, the login is also successful). One device can log in multiple times with
different handle at each login. If there is not special function module, it is suggested to log in
only one time. The login handle can be repeatedly used on other function modules.
Handle repetition: The login handle might be the same as an existing handle, which is normal.
For example, if you log in to Device A and get loginIDA, then cancel loginIDA. When you log in
again, you might get LoginIDA again. However, throughout the life cycle of a handle, the same
handle will not appear.
Logout: The interface will release the opened functions in the login session internally, but it is
not suggested to rely on the cleaning up function of the logout interface. For example, if you
11
enable the monitoring function, you should call the interface that disables the monitoring
function when it is no longer required.
Use login and logout in pairs: The login consumes some memory and socket information and
releases sources once logged out.
Login failure: It is suggested to check the failure through the error parameter (login error code)
of the login interface. For common error codes, see Table 2-3.
Log in to multiple devices: After SDK initialization, you can log in to multiple devices, but the
corresponding login handle and information need to be adjusted.
import main.java.com.netsdk.lib.NetSDKLib;
import main.java.com.netsdk.lib.NetSDKLib.LLong;
import main.java.com.netsdk.lib.ToolKits;
import com.sun.jna.ptr.IntByReference;
// device info
12
public static NetSDKLib.NET_DEVICEINFO_Ex m_stDeviceInfo = new
NetSDKLib.NET_DEVICEINFO_Ex();
//login handle
public static LLong m_hLoginHandle = new LLong(0);
//Logout of device
public static boolean logout() {
if(m_hLoginHandle.longValue() == 0) {
return false;
}
return bRet;
}
}
13
Real-Time Monitoring
2.3.1 Introduction
Real-time monitoring obtains the real-time stream from the storage device or front-end device,
which is an important part of the surveillance system.
SDK can get the main stream and sub stream from the device once logged in.
Pass in the window handle for SDK to directly decode and play the stream (Windows system
only).
Call back the real-time stream data to users for independent treatment.
Save the real-time record to the specific file through saving the callback stream or calling the
SDK interface.
Call PlaySDK library from the SDK auxiliary library to realize real-time play. For the process of SDK
decoding play, see Figure 2-3.
14
SDK decoding play flowchart
Start
Log ou t
CLIENT_Log out
Required
End Optional
Process Description
15
After using the function module, call CLIENT_Logout to log out of the device.
After using all SDK functions, call CLIENT_Cleanup to release SDK resource.
Notes
SDK decoding play only supports Windows system. You need to call the decoding after getting
the stream for display in other systems.
Multi-thread calling: Multi-thread calling is not supported for the functions within the same
login session; however, multi-thread calling can deal with the functions of different login
sessions although such calling is not recommended.
Timeout: The application for monitoring resources in the interface should make some
agreements with the device before requesting the monitoring data. There are some timeout
settings (see "NET_PARAM structure"), and the field related to monitoring is nGetConnInfoTime.
If there is timeout due to the reasons such as poor network connection, you can modify the
value of nGetConnInfoTime bigger. The example code is as follows. Call it for only one time
after having called the CLIENT_Init function.
NET_PARAM stuNetParam = new NET_PARAM();
stuNetParam. nGetConnInfoTime = 5000; if the value is 0, it is 1000 ms by default
CLIENT_SetNetworkParam (stuNetParam);
Failed to repeat opening: Because some devices do not support opening the monitoring
function on the same channel for multiple times, these devices might fail from the second
opening. In this case, you can try the following:
Close the opened channel first. For example, if you already opened the main stream video
on the channel 1 and still want to open the sub stream video on the same channel, you can
close the main stream video first and then open the sub stream video.
Log in twice to obtain two login handles to deal with the main stream and sub stream
respectively.
Calling succeeded but no image: SDK decoding needs to use dhplay.dll. It is suggested to check
if dhplay.dll and its auxiliary library are missing under the running directory.
If the system resource is insufficient, the device might return error instead of recovering stream.
You can receive an event DH_REALPLAY_FAILD_EVENT in the alarm callback that is set in
CLIENT_SetDVRMessCallBack. This event includes the detailed error codes. See
"DEV_PLAY_RESULT Structure" in Network SDK Development Manual.
SDK calls back the real-time monitoring stream to you and then you call PlaySDK to perform
decoding play. For the process of calling the private play library for decoding play, see Figure 2-4.
16
Third-party decoding play flowchart
Start
Log ou t
CLIENT_Log out
End
Process Description
17
Notes
import java.awt.Panel;
import main.java.com.netsdk.lib.NetSDKLib.LLong;
import main.java.com.netsdk.lib.ToolKits;
import com.sun.jna.Native;
/**
* functions realized when real-time live view
* Mainly includes: Start pulling stream and stop pulling stream.
*/
public class RealPlayModule {
// start live view
public static LLong startRealPlay(int channel, int stream, Panel
realPlayWindow) {
LLong m_hPlayHandle =
LoginModule.netsdk.CLIENT_RealPlayEx(LoginModule.m_hLoginHandl
e, channel, Native.getComponentPointer(realPlayWindow), stream);
if(m_hPlayHandle.longValue() == 0) {
System.err.println("start real-time monitoring failed,
errorcode" + ToolKits.getErrorCodePrint());
} else {
System.out.println("Success to start realplay");
//custom stream saving file, optional. Use it when need to save videos.
String outFile="example/outputfile";
LoginModule.netsdk.CLIENT_SaveRealData(m_hPlayHandle,outFile);
}
return m_hPlayHandle;
18
}
}
}
private DataCallBackEx m_DataCallBackEx = new DataCallBackEx();
public LLong startRealPlay(int channel, int stream, Panel
realPlayWindow) {
LLong m_hPlayHandle =
LoginModule.netsdk.CLIENT_RealPlayEx(LoginModule.m_hLoginHandl
e, channel, Native.getComponentPointer(realPlayWindow), stream);
LoginModule.netsdk.CLIENT_SetRealDataCallBackEx(m_hPlayHand
le,m_DataCallBackEx, null, 0x00000001);
if(m_hPlayHandle.longValue() == 0) {
System.err.println("start real-time monitoring failed, error
code" + ToolKits.getErrorCodePrint());
} else {
System.out.println("Success to start realplay");
19
}
return m_hPlayHandle;
}
2.4.1 Introduction
Intelligent subscription: Based on the analysis of real-time streams, when detecting the preset event,
the intelligence device will send the event to users. Intelligent events include traffic violations,
whether there is any park space in the parking lot, and other events.
Intelligent subscription implementation: SDK automatically connects to the device and subscribes to
the intelligent event function from the device. When the device detects an intelligent event, it will
send the event to SDK immediately.
For supported intelligent subscription events, see the constants starting with EVENT_IVS_ in
NetSDKLib.java, including general events such as occupied lane and vehicle violations.
20
2.4.3 Process Description
Process of reporting intelligent subscription events
Start
Sub scribe to i nte lligent i ma ge alarm from the de vice Call back fAnalyzerData Ca llBack to g et intellige nt
CLIENT_RealLo adPictureEx traffic e ven t information
Log ou t
CLIENT_Log out
End
Process Description
Notes
Subscription event type: If you need to report different intelligent events at the same time, you
can subscribe to all intelligent events (EVENT_IVS_ALL) or a single intelligent event.
21
Set whether to receive images: Because some devices are in 3G or 4G network environment,
when SDK connects to the device, if you do not need to receive images, you can set the
parameter bNeedPicFile in CLIENT_ RealLoadPictureEx interface to False, for only receiving
intelligent traffic event information without images.
Sending -1 through channel will subscribe all channels. Some intelligent trafficproducts do not
support subscribing all channels. If the subscription failed by sending -1, please subscribe one
channel.
22
clearPanel();
}
});
}
//access control system intelligent callback, inherit fAnalyzerDataCallBack and use its own logic
private class AnalyzerDataCB implements NetSDKLib.fAnalyzerDataCallBack {
private BufferedImage gateBufferedImage = null;
@Override
public int invoke(LLong lAnalyzerHandle, int dwAlarmType,
Pointer pAlarmInfo, Pointer pBuffer, int dwBufSize,
Pointer dwUser, int nSequence, Pointer reserved)
{
if (lAnalyzerHandle.longValue() == 0 || pAlarmInfo == null) {
return -1;
}
try {
gateBufferedImage = ImageIO.read(byteArrInputGlobal);
if(gateBufferedImage != null) {
ImageIO.write(gateBufferedImage, "jpg", new
File(snapPicPath));
}
} catch (IOException e2) {
e2.printStackTrace();
}
23
if (eventQueue != null) {
eventQueue.postEvent( new AccessEvent(target, gateBufferedImage, msg));
}
}
return 0;
}
}
24
3 Target Detection
Subscription to Event
3.1.1 Introduction
When the camera detects the appearance of faces in the specified region, an intelligent event
message is generated and reported to NetSDK.
Sample Code
* static to avoid recycle
*/
private static class AnalyzerDataCB implements
NetSDKLib.fAnalyzerDataCallBack {
private AnalyzerDataCB() {}
25
switch(dwAlarmType)
{
case NetSDKLib.EVENT_IVS_FACEDETECT: ///< target
detection
{
DEV_EVENT_FACEDETECT_INFO msg = new
DEV_EVENT_FACEDETECT_INFO();
ToolKits.GetPointerData(pAlarmInfo, msg);
// release memory
msg = null;
System.gc();
break;
}
}
//stop subscription
if(m_hAttachHandle.longValue() != 0) {
LoginModule.netsdk.CLIENT_StopLoadPic(m_hAttachHandle);
m_hAttachHandle.setValue(0);
}
26
4 Target Recognition
Subscription to Event
4.1.1 Introduction
Target recognition: When the server compares the faces detected in the video with face images in its
internal database and the faces match, the server will report the event to the platform.
Information in the target recognition event includes: Recognized person information, image files of
each person, and similarity with the current face.
Sample Code
* static to avoid recycle
*/
private static class AnalyzerDataCB implements
NetSDKLib.fAnalyzerDataCallBack {
private AnalyzerDataCB() {}
27
if (lAnalyzerHandle.longValue() == 0 || pAlarmInfo == null) {
return -1;
}
switch(dwAlarmType)
{
case NetSDKLib.EVENT_IVS_FACERECOGNITION: ///<
target recognition event
{
// DEV_EVENT_FACERECOGNITION_INFO structural body toolarge,
new object will consume too much time, ToolKits.GetPointerData
content copy does not consume time
// if too many devices, change static
DEV_EVENT_FACERECOGNITION_INFO msg = new
DEV_EVENT_FACERECOGNITION_INFO(); change to global
// change to global because new each time takes too much time,
ifchanged to global, you need to lock process iof the case
28
// release memory
msg = null;
System.gc();
break;
}
}
//stop subscription
if(m_hAttachHandle.longValue() != 0) {
LoginModule.netsdk.CLIENT_StopLoadPic(m_hAttachHandle);
m_hAttachHandle.setValue(0);
}
29
5 General Behavior
Subscription to Event
5.1.1 Introduction
General behaviors mainly include intrusion and tripwire. Intrusion indicates that an alarm is triggered
when a person who intrudes into the specified region is detected. Tripwire indicates that an alarm is
triggered when a person who crosses the line set by the camera is detected.
Sample Code
/**
* IVS callback
*/
public class AnalyzerDataCB implements NetSDKLib.fAnalyzerDataCallBack{
private AnalyzerDataCB() {
picturePath = new File("./AnalyzerPicture/");
if (!picturePath.exists()) {
picturePath.mkdir();
}
}
30
public static AnalyzerDataCB getInstance() {
return CallBackHolder.instance;
}
// callback
public int invoke(NetSDKLib.LLong lAnalyzerHandle, int dwAlarmType, Pointer pAlarmInfo,
Pointer pBuffer, int dwBufSize, Pointer dwUser, int nSequence, Pointer reserved)
{
if (lAnalyzerHandle == null || lAnalyzerHandle.longValue() == 0) {
return -1;
}
switch(dwAlarmType)
{
case NetSDKLib.EVENT_IVS_CROSSLINEDETECTION : // warning
line event
{
NetSDKLib.DEV_EVENT_CROSSLINE_INFO msg = new
NetSDKLib.DEV_EVENT_CROSSLINE_INFO();
ToolKits.GetPointerData(pAlarmInfo, msg);
stuFileInfo = msg.stuFileInfo;
stPicInfo = msg.stuObject.stPicInfo;
System.out.printf("【warning line event】 time (UTC):%s channel No.:%d
start time:%s end time:%s event occurrence times:%d event source
device ID:%s \n",
msg.UTC, msg.nChannelID, msg.stuObject.stuStartTime,
msg.stuObject.stuEndTime,
msg.nOccurrenceCount, new String(msg.szSourceDevice));
break;
}
case NetSDKLib.EVENT_IVS_CROSSREGIONDETECTION: ///< warning area event
{
NetSDKLib.DEV_EVENT_CROSSREGION_INFO msg = new
NetSDKLib.DEV_EVENT_CROSSREGION_INFO();
ToolKits.GetPointerData(pAlarmInfo, msg);
String Picture = picturePath + "\\" + System.currentTimeMillis() + ".jpg";
ToolKits.savePicture(pBuffer, 0, dwBufSize, Picture);
System.out.println("warning area event time(UTC):" + msg.UTC + "
channel No.:" + msg.nChannelID + "start time:" +
msg.stuObject.stuStartTime + "End time:" +
msg.stuObject.stuEndTime);
// PrintStruct.print(msg);
break;
31
}
}
}
32
6 Human Detection
Subscription to Event
6.1.1 Introduction
When the camera detects human features in the specified region, an intelligent event message is
generated and reported to NetSDK.
Sample Code
/**
* human detetion callback
*/
public class AnalyzerDataCB implements NetSDKLib.fAnalyzerDataCallBack{
private AnalyzerDataCB() {
picturePath = new File("./AnalyzerPicture/");
if (!picturePath.exists()) {
picturePath.mkdir();
}
}
// callback
public int invoke(NetSDKLib.LLong lAnalyzerHandle, int dwAlarmType, Pointer pAlarmInfo,
33
Pointer pBuffer, int dwBufSize, Pointer dwUser, int nSequence, Pointer reserved)
{
if (lAnalyzerHandle == null || lAnalyzerHandle.longValue() == 0) {
return -1;
}
switch(dwAlarmType)
{
case NetSDKLib.EVENT_IVS_HUMANTRAIT: // body
feature event
{
DEV_EVENT_HUMANTRAIT_INFO msg = new
DEV_EVENT_HUMANTRAIT_INFO();
ToolKits.GetPointerData(pAlarmInfo, msg);
PrintStruct.print(msg);
34
if(msg.stuFaceSceneImage.nLength>0)
{
String strFileName = path + "\\" + System.currentTimeMillis() +
"HumanTrait_face panoramaic image.jpg";
ToolKits.savePicture(pBuffer, msg.stuFaceSceneImage.nOffSet,
msg.stuFaceSceneImage.nLength, strFileName);
}
else
{
System.out.println("no panoramaic face
image");
}
break;
}
35
7 Thermal Temperature Event
Subscription to Event
7.1.1 Introduction
When the thermal camera detects human in the specified region, it will report body temperature
through the thermal technology.
Sample Code
public class AnalyzerDataCB implements NetSDKLib.fAnalyzerDataCallBack{
private AnalyzerDataCB() {
picturePath = new File("./AnalyzerPicture/");
if (!picturePath.exists()) {
picturePath.mkdir();
}
}
// Callback
public int invoke(NetSDKLib.LLong lAnalyzerHandle, int dwAlarmType, Pointer pAlarmInfo,
Pointer pBuffer, int dwBufSize, Pointer dwUser, int nSequence, Pointer reserved)
{
if (lAnalyzerHandle == null || lAnalyzerHandle.longValue() == 0) {
36
return -1;
}
switch(dwAlarmType)
{
case NetSDKLib.EVENT_IVS_ANATOMY_TEMP_DETECT :
// Intelligent human temperature event
{
NetSDKLib.DEV_EVENT_ANATOMY_TEMP_DETECT_INFO msg = new
NetSDKLib.DEV_EVENT_ANATOMY_TEMP_DETECT_INFO();
ToolKits.GetPointerData(pAlarmInfo, msg);
37
8 Access Control Event
Event Subscription
8.1.1 Introduction
When the access control device is unlocked, the unlocking related event information is reported,
including event, unlocking mode, unlocking personnel, and other corresponding information.
Sample Code
private class AnalyzerDataCB implements NetSDKLib.fAnalyzerDataCallBack {
private BufferedImage gateBufferedImage = null;
38
// save image to get image buffer
String snapPicPath = path + "\\" + System.currentTimeMillis() +
"GateSnapPicture.jpg"; // image path
byte[] buffer = pBuffer.getByteArray(0, dwBufSize);
ByteArrayInputStream byteArrInputGlobal = new
ByteArrayInputStream(buffer);
try {
gateBufferedImage = ImageIO.read(byteArrInputGlobal);
if(gateBufferedImage != null) {
ImageIO.write(gateBufferedImage, "jpg", new
File(snapPicPath));
}
} catch (IOException e2) {
e2.printStackTrace();
}
return 0;
}
39
9 People Counting
Introduction
A camera is installed in the business region, and the intelligent analysis server accurately counts the
number of people entering and exiting each entrance in real time according to the video data
collected by the camera. Such products are widely used in large-scale business, tourism, public safety,
cultural industry expo, chain stores and other industries.
Through real-time subscription to people counting data, you can get reports related to total number
of people entered and exited in real time.
Interface Overview
Table 9-1 Description of people counting interface
Interface Description
CLIENT_AttachVideoStatSummary Subscribe to the people counting event.
CLIENT_DetachVideoStatSummary Unsubscribe from the people counting event.
40
Process Description
Process of subscribing to people counting
Start
Log ou t
CLIENT_Log out
End
Process Description
Sample Code
/**
* Subscribe
*/
public void attachVideoStatSummary() {
41
if (loginHandle.longValue() == 0) {
return;
}
videoStatHandle =
netsdkApi.CLIENT_AttachVideoStatSummary(loginHandle, videoStatIn,
videoStatOut, 5000);
if( videoStatHandle.longValue() == 0 ) {
System.err.printf("Attach Failed!LastError = %x\n",
netsdkApi.CLIENT_GetLastError());
return;
}
System.out.printf("Attach Success!Wait Device Notify
Information\n");
}
/**
* Stop the subscription
*/
public void detachVideoStatSummary() {
if (videoStatHandle.longValue() != 0) {
netsdkApi.CLIENT_DetachVideoStatSummary(videoStatHandle);
videoStatHandle.setValue(0);
}
}
}
/*
* People counting callback
*/
private static class VideoStatSumCallback implements
NetSDKLib.fVideoStatSumCallBack {
private static VideoStatSumCallback instance = new
VideoStatSumCallback();
private VideoStatSumCallback() {}
public static VideoStatSumCallback getInstance() {
return instance;
42
}
43
10 Intelligent Traffic Event
Subscription to Event
10.1.1 Introduction
Intelligent traffic event sending: Based on the analysis of real-time streams, when detecting the
preset traffic event, the intelligent traffic device will send the event to users. Intelligent traffic events
include traffic violations, parking space, and other events.
Intelligent traffic event sending: SDK automatically connects to the device and subscribes to the
intelligent event function from the device. When the device detects an intelligent event, it will send
the event to SDK immediately.
44
EVENT_IVS_TRAFFIC_TURNRIGHT
Structure corresponding to the event of traffic violation—illegal right turn:
DEV_EVENT_TRAFFIC_TURNRIGHT_INFO
The event of traffic violation—illegal U turn
Enumerated value corresponding to the event of traffic violation—illegal U turn:
EVENT_IVS_TRAFFIC_UTURN
Structure corresponding to the event of traffic violation—illegal U turn:
DEV_EVENT_TRAFFIC_UTURN_INFO
The event of traffic violation—underspeed
Enumerated value corresponding to the event of traffic violation—underspeed:
EVENT_IVS_TRAFFIC_UNDERSPEED
Structure corresponding to the event of traffic violation—underspeed:
DEV_EVENT_TRAFFIC_UNDERSPEED_INFO
The event of traffic violation—illegal parking
Enumerated value corresponding to the event of traffic violation—illegal parking:
EVENT_IVS_TRAFFIC_PARKING
Structure corresponding to the event of traffic violation—illegal parking:
DEV_EVENT_TRAFFIC_PARKING_INFO
The event of traffic violation—wrong lane
Enumerated value corresponding to the event of traffic violation—wrong lane:
EVENT_IVS_TRAFFIC_WRONGROUTE
Structure corresponding to the event of traffic violation—wrong lane:
DEV_EVENT_TRAFFIC_WRONGROUTE_INFO
The event of traffic violation—illegal lane change
Enumerated value corresponding to the event of traffic violation—illegal lane change:
EVENT_IVS_TRAFFIC_CROSSLANE
Structure corresponding to the event of traffic violation—illegal lane change:
DEV_EVENT_TRAFFIC_CROSSLANE_INFO
The event of traffic violation—crossing solid yellow line
Enumerated value corresponding to the event of traffic violation—crossing solid yellow line:
EVENT_IVS_TRAFFIC_OVERYELLOWLINE
Structure corresponding to the event of traffic violation—crossing solid yellow line:
DEV_EVENT_TRAFFIC_OVERYELLOWLINE_INFO
The event of traffic violation—vehicle with yellow plate in lane
Enumerated value corresponding to the event of traffic violation—vehicle with yellow plate in
lane: EVENT_IVS_TRAFFIC_YELLOWPLATEINLANE
Structure corresponding to the event of traffic violation—vehicle with yellow plate in lane:
DEV_EVENT_TRAFFIC_YELLOWPLATEINLANE_INFO
The event of traffic violation—pedestrian priority on zebra crossing
Enumerated value corresponding to the event of traffic violation—pedestrian priority on zebra
crossing: EVENT_IVS_TRAFFIC_PEDESTRAINPRIORITY
Structure corresponding to the event of traffic violation—pedestrian priority on zebra crossing:
DEV_EVENT_TRAFFIC_PEDESTRAINPRIORITY_INFO
The traffic event of manual capture
Enumerated value corresponding to the traffic event of manual capture:
EVENT_IVS_TRAFFIC_MANUALSNAP
45
Structure corresponding to the traffic event of manual capture:
DEV_EVENT_TRAFFIC_MANUALSNAP_INFO
The event of vehicle in lane
Enumerated value corresponding to the event of vehicle in lane:
EVENT_IVS_TRAFFIC_VEHICLEINROUTE
Structure corresponding to the event of vehicle in lane:
DEV_EVENT_TRAFFIC_VEHICLEINROUTE_INFO
The event of traffic violation—vehicle in bus lane
Enumerated value corresponding to the event of traffic violation—vehicle in bus lane:
EVENT_IVS_TRAFFIC_VEHICLEINBUSROUTE
Structure corresponding to the event of traffic violation—vehicle in bus lane:
DEV_EVENT_TRAFFIC_VEHICLEINBUSROUTE_INFO
The event of traffic violation—illegal backing
Enumerated value corresponding to the event of traffic violation—illegal backing:
EVENT_IVS_TRAFFIC_BACKING
Structure corresponding to the event of traffic violation—illegal backing:
DEV_EVENT_IVS_TRAFFIC_BACKING_INFO
The event of parking space occupied
Enumerated value corresponding to the event of parking space occupied:
EVENT_IVS_TRAFFIC_PARKINGSPACEPARKING
Structure corresponding to the event of parking space occupied:
DEV_EVENT_TRAFFIC_PARKINGSPACEPARKING_INFO
The event of parking space not occupied
Enumerated value corresponding to the event of parking space not occupied:
EVENT_IVS_TRAFFIC_PARKINGSPACENOPARKING
Structure corresponding to the event of parking space not occupied:
DEV_EVENT_TRAFFIC_PARKINGSPACENOPARKING_INFO
The event of traffic violation—not fastening seat belt
Enumerated value corresponding to the event of traffic violation—not fastening seat belt:
EVENT_IVS_TRAFFIC_WITHOUT_SAFEBELT
Structure corresponding to the event of traffic violation—not fastening seat belt:
DEV_EVENT_TRAFFIC_WITHOUT_SAFEBELT
Sample Code
/*
* intelligent alarm event callback
*/
private class AnalyzerDataCB implements
NetSDKLib.fAnalyzerDataCallBack {
public int invoke(LLong lAnalyzerHandle, int dwAlarmType,
Pointer pAlarmInfo, Pointer pBuffer, int
dwBufSize,
Pointer dwUser, int nSequence, Pointer
reserved)
{
46
if (lAnalyzerHandle.longValue() == 0) {
return -1;
}
if(dwAlarmType == NetSDKLib.EVENT_IVS_TRAFFICJUNCTION
|| dwAlarmType == NetSDKLib.EVENT_IVS_TRAFFIC_RUNREDLIGHT
|| dwAlarmType == NetSDKLib.EVENT_IVS_TRAFFIC_OVERLINE
|| dwAlarmType == NetSDKLib.EVENT_IVS_TRAFFIC_RETROGRADE
|| dwAlarmType == NetSDKLib.EVENT_IVS_TRAFFIC_TURNLEFT
|| dwAlarmType == NetSDKLib.EVENT_IVS_TRAFFIC_TURNRIGHT
|| dwAlarmType == NetSDKLib.EVENT_IVS_TRAFFIC_UTURN
|| dwAlarmType == NetSDKLib.EVENT_IVS_TRAFFIC_OVERSPEED
|| dwAlarmType == NetSDKLib.EVENT_IVS_TRAFFIC_UNDERSPEED
|| dwAlarmType == NetSDKLib.EVENT_IVS_TRAFFIC_PARKING
|| dwAlarmType == NetSDKLib.EVENT_IVS_TRAFFIC_WRONGROUTE
|| dwAlarmType == NetSDKLib.EVENT_IVS_TRAFFIC_CROSSLANE
|| dwAlarmType ==
NetSDKLib.EVENT_IVS_TRAFFIC_OVERYELLOWLINE
|| dwAlarmType ==
NetSDKLib.EVENT_IVS_TRAFFIC_YELLOWPLATEINLANE
|| dwAlarmType ==
NetSDKLib.EVENT_IVS_TRAFFIC_PEDESTRAINPRIORITY
|| dwAlarmType == NetSDKLib.EVENT_IVS_TRAFFIC_MANUALSNAP
|| dwAlarmType ==
NetSDKLib.EVENT_IVS_TRAFFIC_VEHICLEINROUTE
|| dwAlarmType ==
NetSDKLib.EVENT_IVS_TRAFFIC_VEHICLEINBUSROUTE
|| dwAlarmType == NetSDKLib.EVENT_IVS_TRAFFIC_BACKING
|| dwAlarmType ==
NetSDKLib.EVENT_IVS_TRAFFIC_PARKINGSPACEPARKING
|| dwAlarmType ==
NetSDKLib.EVENT_IVS_TRAFFIC_PARKINGSPACENOPARKING
|| dwAlarmType ==
NetSDKLib.EVENT_IVS_TRAFFIC_WITHOUT_SAFEBELT) {
EventQueue eventQueue
=Toolkit.getDefaultToolkit().getSystemEventQueue();
47
if (eventQueue != null)
{
eventQueue.postEvent(new
TrafficEvent(target,snapImage,plateImage,trafficInfo));
}
}
return 0;
}
// get recognition object, vehicle object event occurrence time and lane No., and more
private void GetStuObject(int dwAlarmType, Pointer pAlarmInfo) {
if(pAlarmInfo == null) {
return;
}
switch(dwAlarmType) {
case NetSDKLib.EVENT_IVS_TRAFFICJUNCTION: ///<
traffic checkpoint event
{
NetSDKLib.DEV_EVENT_TRAFFICJUNCTION_INFO msg = new
NetSDKLib.DEV_EVENT_TRAFFICJUNCTION_INFO();
ToolKits.GetPointerData(pAlarmInfo, msg);
trafficInfo.m_EventName =
Res.string().getEventName(NetSDKLib.EVENT_IVS_TRAFFICJUNCTION);
try {
trafficInfo.m_PlateNumber = new String(msg.stuObject.szText,
"GBK").trim();
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
trafficInfo.m_PlateType = new String(msg.stTrafficCar.szPlateType).trim();
trafficInfo.m_FileCount = String.valueOf(msg.stuFileInfo.bCount);
trafficInfo.m_FileIndex = String.valueOf(msg.stuFileInfo.bIndex);
trafficInfo.m_GroupID = String.valueOf(msg.stuFileInfo.nGroupId);
trafficInfo.m_IllegalPlace =
ToolKits.GetPointerDataToByteArr(msg.stTrafficCar.szDeviceAddress);
trafficInfo.m_LaneNumber = String.valueOf(msg.nLane);
trafficInfo.m_PlateColor = new String(msg.stTrafficCar.szPlateColor).trim();
trafficInfo.m_VehicleColor = new
String(msg.stTrafficCar.szVehicleColor).trim();
trafficInfo.m_VehicleType = new
String(msg.stuVehicle.szObjectSubType).trim();
trafficInfo.m_VehicleSize =
Res.string().getTrafficSize(msg.stTrafficCar.nVehicleSize);
48
trafficInfo.m_Utc = msg.UTC;
trafficInfo.m_bPicEnble = msg.stuObject.bPicEnble;
trafficInfo.m_OffSet = msg.stuObject.stPicInfo.dwOffSet;
trafficInfo.m_FileLength = msg.stuObject.stPicInfo.dwFileLenth;
trafficInfo.m_BoundingBox = msg.stuObject.BoundingBox;
break;
}
case NetSDKLib.EVENT_IVS_TRAFFIC_RUNREDLIGHT: ///<
running red light event
{
NetSDKLib.DEV_EVENT_TRAFFIC_RUNREDLIGHT_INFO msg = new
NetSDKLib.DEV_EVENT_TRAFFIC_RUNREDLIGHT_INFO();
ToolKits.GetPointerData(pAlarmInfo, msg);
trafficInfo.m_EventName =
Res.string().getEventName(NetSDKLib.EVENT_IVS_TRAFFIC_RUNREDLIG
HT);
try {
trafficInfo.m_PlateNumber = new String(msg.stuObject.szText,
"GBK").trim();
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
trafficInfo.m_PlateType = new String(msg.stTrafficCar.szPlateType).trim();
trafficInfo.m_FileCount = String.valueOf(msg.stuFileInfo.bCount);
trafficInfo.m_FileIndex = String.valueOf(msg.stuFileInfo.bIndex);
trafficInfo.m_GroupID = String.valueOf(msg.stuFileInfo.nGroupId);
trafficInfo.m_IllegalPlace =
ToolKits.GetPointerDataToByteArr(msg.stTrafficCar.szDeviceAddress);
trafficInfo.m_LaneNumber = String.valueOf(msg.nLane);
trafficInfo.m_PlateColor = new String(msg.stTrafficCar.szPlateColor).trim();
trafficInfo.m_VehicleColor = new
String(msg.stTrafficCar.szVehicleColor).trim();
trafficInfo.m_VehicleType = new
String(msg.stuVehicle.szObjectSubType).trim();
trafficInfo.m_VehicleSize =
Res.string().getTrafficSize(msg.stTrafficCar.nVehicleSize);
trafficInfo.m_Utc = msg.UTC;
trafficInfo.m_bPicEnble = msg.stuObject.bPicEnble;
trafficInfo.m_OffSet = msg.stuObject.stPicInfo.dwOffSet;
trafficInfo.m_FileLength = msg.stuObject.stPicInfo.dwFileLenth;
trafficInfo.m_BoundingBox = msg.stuObject.BoundingBox;
break;
49
}
case NetSDKLib.EVENT_IVS_TRAFFIC_OVERLINE: ///<
driving on lane event
{
NetSDKLib.DEV_EVENT_TRAFFIC_OVERLINE_INFO msg = new
NetSDKLib.DEV_EVENT_TRAFFIC_OVERLINE_INFO();
ToolKits.GetPointerData(pAlarmInfo, msg);
trafficInfo.m_EventName =
Res.string().getEventName(NetSDKLib.EVENT_IVS_TRAFFIC_OVERLINE);
try {
trafficInfo.m_PlateNumber = new String(msg.stuObject.szText,
"GBK").trim();
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
trafficInfo.m_PlateType = new String(msg.stTrafficCar.szPlateType).trim();
trafficInfo.m_FileCount = String.valueOf(msg.stuFileInfo.bCount);
trafficInfo.m_FileIndex = String.valueOf(msg.stuFileInfo.bIndex);
trafficInfo.m_GroupID = String.valueOf(msg.stuFileInfo.nGroupId);
trafficInfo.m_IllegalPlace =
ToolKits.GetPointerDataToByteArr(msg.stTrafficCar.szDeviceAddress);
trafficInfo.m_LaneNumber = String.valueOf(msg.nLane);
trafficInfo.m_PlateColor = new String(msg.stTrafficCar.szPlateColor).trim();
trafficInfo.m_VehicleColor = new
String(msg.stTrafficCar.szVehicleColor).trim();
trafficInfo.m_VehicleType = new
String(msg.stuVehicle.szObjectSubType).trim();
trafficInfo.m_VehicleSize =
Res.string().getTrafficSize(msg.stTrafficCar.nVehicleSize);
trafficInfo.m_Utc = msg.UTC;
trafficInfo.m_bPicEnble = msg.stuObject.bPicEnble;
trafficInfo.m_OffSet = msg.stuObject.stPicInfo.dwOffSet;
trafficInfo.m_FileLength = msg.stuObject.stPicInfo.dwFileLenth;
trafficInfo.m_BoundingBox = msg.stuObject.BoundingBox;
break;
}
case NetSDKLib.EVENT_IVS_TRAFFIC_RETROGRADE: ///<
wrong-way driving event
{
NetSDKLib.DEV_EVENT_TRAFFIC_RETROGRADE_INFO msg = new
NetSDKLib.DEV_EVENT_TRAFFIC_RETROGRADE_INFO();
ToolKits.GetPointerData(pAlarmInfo, msg);
trafficInfo.m_EventName =
50
Res.string().getEventName(NetSDKLib.EVENT_IVS_TRAFFIC_RETROGRA
DE);
try {
trafficInfo.m_PlateNumber = new String(msg.stuObject.szText,
"GBK").trim();
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
trafficInfo.m_PlateType = new String(msg.stTrafficCar.szPlateType).trim();
trafficInfo.m_FileCount = String.valueOf(msg.stuFileInfo.bCount);
trafficInfo.m_FileIndex = String.valueOf(msg.stuFileInfo.bIndex);
trafficInfo.m_GroupID = String.valueOf(msg.stuFileInfo.nGroupId);
trafficInfo.m_IllegalPlace =
ToolKits.GetPointerDataToByteArr(msg.stTrafficCar.szDeviceAddress);
trafficInfo.m_LaneNumber = String.valueOf(msg.nLane);
trafficInfo.m_PlateColor = new String(msg.stTrafficCar.szPlateColor).trim();
trafficInfo.m_VehicleColor = new
String(msg.stTrafficCar.szVehicleColor).trim();
trafficInfo.m_VehicleType = new
String(msg.stuVehicle.szObjectSubType).trim();
trafficInfo.m_VehicleSize =
Res.string().getTrafficSize(msg.stTrafficCar.nVehicleSize);
trafficInfo.m_Utc = msg.UTC;
trafficInfo.m_bPicEnble = msg.stuObject.bPicEnble;
trafficInfo.m_OffSet = msg.stuObject.stPicInfo.dwOffSet;
trafficInfo.m_FileLength = msg.stuObject.stPicInfo.dwFileLenth;
trafficInfo.m_BoundingBox = msg.stuObject.BoundingBox;
break;
}
case NetSDKLib.EVENT_IVS_TRAFFIC_TURNLEFT: ///<
illegal left turn
{
NetSDKLib.DEV_EVENT_TRAFFIC_TURNLEFT_INFO msg = new
NetSDKLib.DEV_EVENT_TRAFFIC_TURNLEFT_INFO();
ToolKits.GetPointerData(pAlarmInfo, msg);
trafficInfo.m_EventName =
Res.string().getEventName(NetSDKLib.EVENT_IVS_TRAFFIC_TURNLEFT);
try {
trafficInfo.m_PlateNumber = new String(msg.stuObject.szText,
"GBK").trim();
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
trafficInfo.m_PlateType = new String(msg.stTrafficCar.szPlateType).trim();
51
trafficInfo.m_FileCount = String.valueOf(msg.stuFileInfo.bCount);
trafficInfo.m_FileIndex = String.valueOf(msg.stuFileInfo.bIndex);
trafficInfo.m_GroupID = String.valueOf(msg.stuFileInfo.nGroupId);
trafficInfo.m_IllegalPlace =
ToolKits.GetPointerDataToByteArr(msg.stTrafficCar.szDeviceAddress);
trafficInfo.m_LaneNumber = String.valueOf(msg.nLane);
trafficInfo.m_PlateColor = new String(msg.stTrafficCar.szPlateColor).trim();
trafficInfo.m_VehicleColor = new
String(msg.stTrafficCar.szVehicleColor).trim();
trafficInfo.m_VehicleType = new
String(msg.stuVehicle.szObjectSubType).trim();
trafficInfo.m_VehicleSize =
Res.string().getTrafficSize(msg.stTrafficCar.nVehicleSize);
trafficInfo.m_Utc = msg.UTC;
trafficInfo.m_bPicEnble = msg.stuObject.bPicEnble;
trafficInfo.m_OffSet = msg.stuObject.stPicInfo.dwOffSet;
trafficInfo.m_FileLength = msg.stuObject.stPicInfo.dwFileLenth;
trafficInfo.m_BoundingBox = msg.stuObject.BoundingBox;
break;
}
case NetSDKLib.EVENT_IVS_TRAFFIC_TURNRIGHT: ///<
turning right illegally
{
NetSDKLib.DEV_EVENT_TRAFFIC_TURNRIGHT_INFO msg = new
NetSDKLib.DEV_EVENT_TRAFFIC_TURNRIGHT_INFO();
ToolKits.GetPointerData(pAlarmInfo, msg);
trafficInfo.m_EventName =
Res.string().getEventName(NetSDKLib.EVENT_IVS_TRAFFIC_TURNRIGHT
);
try {
trafficInfo.m_PlateNumber = new String(msg.stuObject.szText,
"GBK").trim();
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
trafficInfo.m_PlateType = new String(msg.stTrafficCar.szPlateType).trim();
trafficInfo.m_FileCount = String.valueOf(msg.stuFileInfo.bCount);
trafficInfo.m_FileIndex = String.valueOf(msg.stuFileInfo.bIndex);
trafficInfo.m_GroupID = String.valueOf(msg.stuFileInfo.nGroupId);
trafficInfo.m_IllegalPlace =
ToolKits.GetPointerDataToByteArr(msg.stTrafficCar.szDeviceAddress);
trafficInfo.m_LaneNumber = String.valueOf(msg.nLane);
trafficInfo.m_PlateColor = new String(msg.stTrafficCar.szPlateColor).trim();
trafficInfo.m_VehicleColor = new
52
String(msg.stTrafficCar.szVehicleColor).trim();
trafficInfo.m_VehicleType = new
String(msg.stuVehicle.szObjectSubType).trim();
trafficInfo.m_VehicleSize =
Res.string().getTrafficSize(msg.stTrafficCar.nVehicleSize);
trafficInfo.m_Utc = msg.UTC;
trafficInfo.m_bPicEnble = msg.stuObject.bPicEnble;
trafficInfo.m_OffSet = msg.stuObject.stPicInfo.dwOffSet;
trafficInfo.m_FileLength = msg.stuObject.stPicInfo.dwFileLenth;
trafficInfo.m_BoundingBox = msg.stuObject.BoundingBox;
break;
}
case NetSDKLib.EVENT_IVS_TRAFFIC_UTURN: ///< illegal
U turn
{
NetSDKLib.DEV_EVENT_TRAFFIC_UTURN_INFO msg = new
NetSDKLib.DEV_EVENT_TRAFFIC_UTURN_INFO();
ToolKits.GetPointerData(pAlarmInfo, msg);
trafficInfo.m_EventName =
Res.string().getEventName(NetSDKLib.EVENT_IVS_TRAFFIC_UTURN);
try {
trafficInfo.m_PlateNumber = new String(msg.stuObject.szText,
"GBK").trim();
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
trafficInfo.m_PlateType = new String(msg.stTrafficCar.szPlateType).trim();
trafficInfo.m_FileCount = String.valueOf(msg.stuFileInfo.bCount);
trafficInfo.m_FileIndex = String.valueOf(msg.stuFileInfo.bIndex);
trafficInfo.m_GroupID = String.valueOf(msg.stuFileInfo.nGroupId);
trafficInfo.m_IllegalPlace =
ToolKits.GetPointerDataToByteArr(msg.stTrafficCar.szDeviceAddress);
trafficInfo.m_LaneNumber = String.valueOf(msg.nLane);
trafficInfo.m_PlateColor = new String(msg.stTrafficCar.szPlateColor).trim();
trafficInfo.m_VehicleColor = new
String(msg.stTrafficCar.szVehicleColor).trim();
trafficInfo.m_VehicleType = new
String(msg.stuVehicle.szObjectSubType).trim();
trafficInfo.m_VehicleSize =
Res.string().getTrafficSize(msg.stTrafficCar.nVehicleSize);
trafficInfo.m_Utc = msg.UTC;
trafficInfo.m_bPicEnble = msg.stuObject.bPicEnble;
trafficInfo.m_OffSet = msg.stuObject.stPicInfo.dwOffSet;
trafficInfo.m_FileLength = msg.stuObject.stPicInfo.dwFileLenth;
53
trafficInfo.m_BoundingBox = msg.stuObject.BoundingBox;
break;
}
case NetSDKLib.EVENT_IVS_TRAFFIC_OVERSPEED: ///<
overspped
{
NetSDKLib.DEV_EVENT_TRAFFIC_OVERSPEED_INFO msg = new
NetSDKLib.DEV_EVENT_TRAFFIC_OVERSPEED_INFO();
ToolKits.GetPointerData(pAlarmInfo, msg);
trafficInfo.m_EventName =
Res.string().getEventName(NetSDKLib.EVENT_IVS_TRAFFIC_OVERSPEED
);
try {
trafficInfo.m_PlateNumber = new String(msg.stuObject.szText,
"GBK").trim();
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
trafficInfo.m_PlateType = new String(msg.stTrafficCar.szPlateType).trim();
trafficInfo.m_FileCount = String.valueOf(msg.stuFileInfo.bCount);
trafficInfo.m_FileIndex = String.valueOf(msg.stuFileInfo.bIndex);
trafficInfo.m_GroupID = String.valueOf(msg.stuFileInfo.nGroupId);
trafficInfo.m_IllegalPlace =
ToolKits.GetPointerDataToByteArr(msg.stTrafficCar.szDeviceAddress);
trafficInfo.m_LaneNumber = String.valueOf(msg.nLane);
trafficInfo.m_PlateColor = new String(msg.stTrafficCar.szPlateColor).trim();
trafficInfo.m_VehicleColor = new
String(msg.stTrafficCar.szVehicleColor).trim();
trafficInfo.m_VehicleType = new
String(msg.stuVehicle.szObjectSubType).trim();
trafficInfo.m_VehicleSize =
Res.string().getTrafficSize(msg.stTrafficCar.nVehicleSize);
trafficInfo.m_Utc = msg.UTC;
trafficInfo.m_bPicEnble = msg.stuObject.bPicEnble;
trafficInfo.m_OffSet = msg.stuObject.stPicInfo.dwOffSet;
trafficInfo.m_FileLength = msg.stuObject.stPicInfo.dwFileLenth;
trafficInfo.m_BoundingBox = msg.stuObject.BoundingBox;
break;
}
case NetSDKLib.EVENT_IVS_TRAFFIC_UNDERSPEED: ///<
underspeed
{
NetSDKLib.DEV_EVENT_TRAFFIC_UNDERSPEED_INFO msg = new
54
NetSDKLib.DEV_EVENT_TRAFFIC_UNDERSPEED_INFO();
ToolKits.GetPointerData(pAlarmInfo, msg);
trafficInfo.m_EventName =
Res.string().getEventName(NetSDKLib.EVENT_IVS_TRAFFIC_UNDERSPE
ED);
try {
trafficInfo.m_PlateNumber = new String(msg.stuObject.szText,
"GBK").trim();
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
trafficInfo.m_PlateType = new String(msg.stTrafficCar.szPlateType).trim();
trafficInfo.m_FileCount = String.valueOf(msg.stuFileInfo.bCount);
trafficInfo.m_FileIndex = String.valueOf(msg.stuFileInfo.bIndex);
trafficInfo.m_GroupID = String.valueOf(msg.stuFileInfo.nGroupId);
trafficInfo.m_IllegalPlace =
ToolKits.GetPointerDataToByteArr(msg.stTrafficCar.szDeviceAddress);
trafficInfo.m_LaneNumber = String.valueOf(msg.nLane);
trafficInfo.m_PlateColor = new String(msg.stTrafficCar.szPlateColor).trim();
trafficInfo.m_VehicleColor = new
String(msg.stTrafficCar.szVehicleColor).trim();
trafficInfo.m_VehicleType = new
String(msg.stuVehicle.szObjectSubType).trim();
trafficInfo.m_VehicleSize =
Res.string().getTrafficSize(msg.stTrafficCar.nVehicleSize);
trafficInfo.m_Utc = msg.UTC;
trafficInfo.m_bPicEnble = msg.stuObject.bPicEnble;
trafficInfo.m_OffSet = msg.stuObject.stPicInfo.dwOffSet;
trafficInfo.m_FileLength = msg.stuObject.stPicInfo.dwFileLenth;
trafficInfo.m_BoundingBox = msg.stuObject.BoundingBox;
break;
}
case NetSDKLib.EVENT_IVS_TRAFFIC_PARKING: ///<
illegally parking
{
NetSDKLib.DEV_EVENT_TRAFFIC_PARKING_INFO msg = new
NetSDKLib.DEV_EVENT_TRAFFIC_PARKING_INFO();
ToolKits.GetPointerData(pAlarmInfo, msg);
trafficInfo.m_EventName =
Res.string().getEventName(NetSDKLib.EVENT_IVS_TRAFFIC_PARKING);
try {
trafficInfo.m_PlateNumber = new String(msg.stuObject.szText,
"GBK").trim();
55
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
trafficInfo.m_PlateType = new String(msg.stTrafficCar.szPlateType).trim();
trafficInfo.m_FileCount = String.valueOf(msg.stuFileInfo.bCount);
trafficInfo.m_FileIndex = String.valueOf(msg.stuFileInfo.bIndex);
trafficInfo.m_GroupID = String.valueOf(msg.stuFileInfo.nGroupId);
trafficInfo.m_IllegalPlace =
ToolKits.GetPointerDataToByteArr(msg.stTrafficCar.szDeviceAddress);
trafficInfo.m_LaneNumber = String.valueOf(msg.nLane);
trafficInfo.m_PlateColor = new String(msg.stTrafficCar.szPlateColor).trim();
trafficInfo.m_VehicleColor = new
String(msg.stTrafficCar.szVehicleColor).trim();
trafficInfo.m_VehicleType = new
String(msg.stuVehicle.szObjectSubType).trim();
trafficInfo.m_VehicleSize =
Res.string().getTrafficSize(msg.stTrafficCar.nVehicleSize);
trafficInfo.m_Utc = msg.UTC;
trafficInfo.m_bPicEnble = msg.stuObject.bPicEnble;
trafficInfo.m_OffSet = msg.stuObject.stPicInfo.dwOffSet;
trafficInfo.m_FileLength = msg.stuObject.stPicInfo.dwFileLenth;
trafficInfo.m_BoundingBox = msg.stuObject.BoundingBox;
break;
}
case NetSDKLib.EVENT_IVS_TRAFFIC_WRONGROUTE:
///< driving on the wrong lane
{
NetSDKLib.DEV_EVENT_TRAFFIC_WRONGROUTE_INFO msg = new
NetSDKLib.DEV_EVENT_TRAFFIC_WRONGROUTE_INFO();
ToolKits.GetPointerData(pAlarmInfo, msg);
trafficInfo.m_EventName =
Res.string().getEventName(NetSDKLib.EVENT_IVS_TRAFFIC_WRONGRO
UTE);
try {
trafficInfo.m_PlateNumber = new String(msg.stuObject.szText,
"GBK").trim();
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
trafficInfo.m_PlateType = new String(msg.stTrafficCar.szPlateType).trim();
trafficInfo.m_FileCount = String.valueOf(msg.stuFileInfo.bCount);
trafficInfo.m_FileIndex = String.valueOf(msg.stuFileInfo.bIndex);
trafficInfo.m_GroupID = String.valueOf(msg.stuFileInfo.nGroupId);
trafficInfo.m_IllegalPlace =
56
ToolKits.GetPointerDataToByteArr(msg.stTrafficCar.szDeviceAddress);
trafficInfo.m_LaneNumber = String.valueOf(msg.nLane);
trafficInfo.m_PlateColor = new String(msg.stTrafficCar.szPlateColor).trim();
trafficInfo.m_VehicleColor = new
String(msg.stTrafficCar.szVehicleColor).trim();
trafficInfo.m_VehicleType = new
String(msg.stuVehicle.szObjectSubType).trim();
trafficInfo.m_VehicleSize =
Res.string().getTrafficSize(msg.stTrafficCar.nVehicleSize);
trafficInfo.m_Utc = msg.UTC;
trafficInfo.m_bPicEnble = msg.stuObject.bPicEnble;
trafficInfo.m_OffSet = msg.stuObject.stPicInfo.dwOffSet;
trafficInfo.m_FileLength = msg.stuObject.stPicInfo.dwFileLenth;
trafficInfo.m_BoundingBox = msg.stuObject.BoundingBox;
break;
}
case NetSDKLib.EVENT_IVS_TRAFFIC_CROSSLANE: ///<
changing lanes illegally
{
NetSDKLib.DEV_EVENT_TRAFFIC_CROSSLANE_INFO msg = new
NetSDKLib.DEV_EVENT_TRAFFIC_CROSSLANE_INFO();
ToolKits.GetPointerData(pAlarmInfo, msg);
trafficInfo.m_EventName =
Res.string().getEventName(NetSDKLib.EVENT_IVS_TRAFFIC_CROSSLAN
E);
try {
trafficInfo.m_PlateNumber = new String(msg.stuObject.szText,
"GBK").trim();
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
trafficInfo.m_PlateType = new String(msg.stuTrafficCar.szPlateType).trim();
trafficInfo.m_FileCount = String.valueOf(msg.stuFileInfo.bCount);
trafficInfo.m_FileIndex = String.valueOf(msg.stuFileInfo.bIndex);
trafficInfo.m_GroupID = String.valueOf(msg.stuFileInfo.nGroupId);
trafficInfo.m_IllegalPlace =
ToolKits.GetPointerDataToByteArr(msg.stuTrafficCar.szDeviceAddress);
trafficInfo.m_LaneNumber = String.valueOf(msg.nLane);
trafficInfo.m_PlateColor = new String(msg.stuTrafficCar.szPlateColor).trim();
trafficInfo.m_VehicleColor = new
String(msg.stuTrafficCar.szVehicleColor).trim();
trafficInfo.m_VehicleType = new
String(msg.stuVehicle.szObjectSubType).trim();
trafficInfo.m_VehicleSize =
57
Res.string().getTrafficSize(msg.stuTrafficCar.nVehicleSize);
trafficInfo.m_Utc = msg.UTC;
trafficInfo.m_bPicEnble = msg.stuObject.bPicEnble;
trafficInfo.m_OffSet = msg.stuObject.stPicInfo.dwOffSet;
trafficInfo.m_FileLength = msg.stuObject.stPicInfo.dwFileLenth;
trafficInfo.m_BoundingBox = msg.stuObject.BoundingBox;
break;
}
case NetSDKLib.EVENT_IVS_TRAFFIC_OVERYELLOWLINE:
///< crossing yellow line
{
NetSDKLib.DEV_EVENT_TRAFFIC_OVERYELLOWLINE_INFO msg = new
NetSDKLib.DEV_EVENT_TRAFFIC_OVERYELLOWLINE_INFO();
ToolKits.GetPointerData(pAlarmInfo, msg);
trafficInfo.m_EventName =
Res.string().getEventName(NetSDKLib.EVENT_IVS_TRAFFIC_OVERYELLO
WLINE);
try {
trafficInfo.m_PlateNumber = new String(msg.stuObject.szText,
"GBK").trim();
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
trafficInfo.m_PlateType = new String(msg.stTrafficCar.szPlateType).trim();
trafficInfo.m_FileCount = String.valueOf(msg.stuFileInfo.bCount);
trafficInfo.m_FileIndex = String.valueOf(msg.stuFileInfo.bIndex);
trafficInfo.m_GroupID = String.valueOf(msg.stuFileInfo.nGroupId);
trafficInfo.m_IllegalPlace =
ToolKits.GetPointerDataToByteArr(msg.stTrafficCar.szDeviceAddress);
trafficInfo.m_LaneNumber = String.valueOf(msg.nLane);
trafficInfo.m_PlateColor = new String(msg.stTrafficCar.szPlateColor).trim();
trafficInfo.m_VehicleColor = new
String(msg.stTrafficCar.szVehicleColor).trim();
trafficInfo.m_VehicleType = new
String(msg.stuVehicle.szObjectSubType).trim();
trafficInfo.m_VehicleSize =
Res.string().getTrafficSize(msg.stTrafficCar.nVehicleSize);
trafficInfo.m_Utc = msg.UTC;
trafficInfo.m_bPicEnble = msg.stuObject.bPicEnble;
trafficInfo.m_OffSet = msg.stuObject.stPicInfo.dwOffSet;
trafficInfo.m_FileLength = msg.stuObject.stPicInfo.dwFileLenth;
trafficInfo.m_BoundingBox = msg.stuObject.BoundingBox;
break;
58
}
case
NetSDKLib.EVENT_IVS_TRAFFIC_YELLOWPLATEINLANE:
///<yellow plate vehicle occupying lane
{
NetSDKLib.DEV_EVENT_TRAFFIC_YELLOWPLATEINLANE_INFO msg =
new NetSDKLib.DEV_EVENT_TRAFFIC_YELLOWPLATEINLANE_INFO();
ToolKits.GetPointerData(pAlarmInfo, msg);
trafficInfo.m_EventName =
Res.string().getEventName(NetSDKLib.EVENT_IVS_TRAFFIC_YELLOWPL
ATEINLANE);
try {
trafficInfo.m_PlateNumber = new String(msg.stuObject.szText,
"GBK").trim();
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
trafficInfo.m_PlateType = new String(msg.stTrafficCar.szPlateType).trim();
trafficInfo.m_FileCount = String.valueOf(msg.stuFileInfo.bCount);
trafficInfo.m_FileIndex = String.valueOf(msg.stuFileInfo.bIndex);
trafficInfo.m_GroupID = String.valueOf(msg.stuFileInfo.nGroupId);
trafficInfo.m_IllegalPlace =
ToolKits.GetPointerDataToByteArr(msg.stTrafficCar.szDeviceAddress);
trafficInfo.m_LaneNumber = String.valueOf(msg.nLane);
trafficInfo.m_PlateColor = new String(msg.stTrafficCar.szPlateColor).trim();
trafficInfo.m_VehicleColor = new
String(msg.stTrafficCar.szVehicleColor).trim();
trafficInfo.m_VehicleType = new
String(msg.stuVehicle.szObjectSubType).trim();
trafficInfo.m_VehicleSize =
Res.string().getTrafficSize(msg.stTrafficCar.nVehicleSize);
trafficInfo.m_Utc = msg.UTC;
trafficInfo.m_bPicEnble = msg.stuObject.bPicEnble;
trafficInfo.m_OffSet = msg.stuObject.stPicInfo.dwOffSet;
trafficInfo.m_FileLength = msg.stuObject.stPicInfo.dwFileLenth;
trafficInfo.m_BoundingBox = msg.stuObject.BoundingBox;
break;
}
case
NetSDKLib.EVENT_IVS_TRAFFIC_PEDESTRAINPRIORITY:
///< pedestrian first event at the zebra areas
{
NetSDKLib.DEV_EVENT_TRAFFIC_PEDESTRAINPRIORITY_INFO msg =
new NetSDKLib.DEV_EVENT_TRAFFIC_PEDESTRAINPRIORITY_INFO();
59
ToolKits.GetPointerData(pAlarmInfo, msg);
trafficInfo.m_EventName =
Res.string().getEventName(NetSDKLib.EVENT_IVS_TRAFFIC_PEDESTRAI
NPRIORITY);
try {
trafficInfo.m_PlateNumber = new String(msg.stuObject.szText,
"GBK").trim();
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
trafficInfo.m_PlateType = new String(msg.stTrafficCar.szPlateType).trim();
trafficInfo.m_FileCount = String.valueOf(msg.stuFileInfo.bCount);
trafficInfo.m_FileIndex = String.valueOf(msg.stuFileInfo.bIndex);
trafficInfo.m_GroupID = String.valueOf(msg.stuFileInfo.nGroupId);
trafficInfo.m_IllegalPlace =
ToolKits.GetPointerDataToByteArr(msg.stTrafficCar.szDeviceAddress);
trafficInfo.m_LaneNumber = String.valueOf(msg.nLane);
trafficInfo.m_PlateColor = new String(msg.stTrafficCar.szPlateColor).trim();
trafficInfo.m_VehicleColor = new
String(msg.stTrafficCar.szVehicleColor).trim();
trafficInfo.m_VehicleType = new
String(msg.stuVehicle.szObjectSubType).trim();
trafficInfo.m_VehicleSize =
Res.string().getTrafficSize(msg.stTrafficCar.nVehicleSize);
trafficInfo.m_Utc = msg.UTC;
trafficInfo.m_bPicEnble = msg.stuObject.bPicEnble;
trafficInfo.m_OffSet = msg.stuObject.stPicInfo.dwOffSet;
trafficInfo.m_FileLength = msg.stuObject.stPicInfo.dwFileLenth;
trafficInfo.m_BoundingBox = msg.stuObject.BoundingBox;
break;
}
case NetSDKLib.EVENT_IVS_TRAFFIC_MANUALSNAP:
///< traffic manually capturing event
{
JOptionPane.showMessageDialog(null,
Res.string().getManualCaptureSucceed(),
Res.string().getPromptMessage(),
JOptionPane.INFORMATION_MESSAGE);
NetSDKLib.DEV_EVENT_TRAFFIC_MANUALSNAP_INFO msg = new
NetSDKLib.DEV_EVENT_TRAFFIC_MANUALSNAP_INFO();
ToolKits.GetPointerData(pAlarmInfo, msg);
trafficInfo.m_EventName =
Res.string().getEventName(NetSDKLib.EVENT_IVS_TRAFFIC_MANUALSN
60
AP);
try {
trafficInfo.m_PlateNumber = new String(msg.stuObject.szText,
"GBK").trim();
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
trafficInfo.m_PlateType = new String(msg.stTrafficCar.szPlateType).trim();
trafficInfo.m_FileCount = String.valueOf(msg.stuFileInfo.bCount);
trafficInfo.m_FileIndex = String.valueOf(msg.stuFileInfo.bIndex);
trafficInfo.m_GroupID = String.valueOf(msg.stuFileInfo.nGroupId);
trafficInfo.m_IllegalPlace =
ToolKits.GetPointerDataToByteArr(msg.stTrafficCar.szDeviceAddress);
trafficInfo.m_LaneNumber = String.valueOf(msg.nLane);
trafficInfo.m_PlateColor = new String(msg.stTrafficCar.szPlateColor).trim();
trafficInfo.m_VehicleColor = new
String(msg.stTrafficCar.szVehicleColor).trim();
trafficInfo.m_VehicleType = new
String(msg.stuVehicle.szObjectSubType).trim();
trafficInfo.m_VehicleSize =
Res.string().getTrafficSize(msg.stTrafficCar.nVehicleSize);
trafficInfo.m_Utc = msg.UTC;
trafficInfo.m_bPicEnble = msg.stuObject.bPicEnble;
trafficInfo.m_OffSet = msg.stuObject.stPicInfo.dwOffSet;
trafficInfo.m_FileLength = msg.stuObject.stPicInfo.dwFileLenth;
trafficInfo.m_BoundingBox = msg.stuObject.BoundingBox;
break;
}
case NetSDKLib.EVENT_IVS_TRAFFIC_VEHICLEINROUTE:
///< vehicle occupying lane
{
NetSDKLib.DEV_EVENT_TRAFFIC_VEHICLEINROUTE_INFO msg = new
NetSDKLib.DEV_EVENT_TRAFFIC_VEHICLEINROUTE_INFO();
ToolKits.GetPointerData(pAlarmInfo, msg);
trafficInfo.m_EventName =
Res.string().getEventName(NetSDKLib.EVENT_IVS_TRAFFIC_VEHICLEINR
OUTE);
try {
trafficInfo.m_PlateNumber = new String(msg.stuObject.szText,
"GBK").trim();
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
trafficInfo.m_PlateType = new String(msg.stTrafficCar.szPlateType).trim();
61
trafficInfo.m_FileCount = String.valueOf(msg.stuFileInfo.bCount);
trafficInfo.m_FileIndex = String.valueOf(msg.stuFileInfo.bIndex);
trafficInfo.m_GroupID = String.valueOf(msg.stuFileInfo.nGroupId);
trafficInfo.m_IllegalPlace =
ToolKits.GetPointerDataToByteArr(msg.stTrafficCar.szDeviceAddress);
trafficInfo.m_LaneNumber = String.valueOf(msg.nLane);
trafficInfo.m_PlateColor = new String(msg.stTrafficCar.szPlateColor).trim();
trafficInfo.m_VehicleColor = new
String(msg.stTrafficCar.szVehicleColor).trim();
trafficInfo.m_VehicleType = new
String(msg.stuVehicle.szObjectSubType).trim();
trafficInfo.m_VehicleSize =
Res.string().getTrafficSize(msg.stTrafficCar.nVehicleSize);
trafficInfo.m_Utc = msg.UTC;
trafficInfo.m_bPicEnble = msg.stuObject.bPicEnble;
trafficInfo.m_OffSet = msg.stuObject.stPicInfo.dwOffSet;
trafficInfo.m_FileLength = msg.stuObject.stPicInfo.dwFileLenth;
trafficInfo.m_BoundingBox = msg.stuObject.BoundingBox;
break;
}
case
NetSDKLib.EVENT_IVS_TRAFFIC_VEHICLEINBUSROUTE:
///<occupying public lanes
{
NetSDKLib.DEV_EVENT_TRAFFIC_VEHICLEINBUSROUTE_INFO msg =
new NetSDKLib.DEV_EVENT_TRAFFIC_VEHICLEINBUSROUTE_INFO();
ToolKits.GetPointerData(pAlarmInfo, msg);
trafficInfo.m_EventName =
Res.string().getEventName(NetSDKLib.EVENT_IVS_TRAFFIC_VEHICLEINB
USROUTE);
try {
trafficInfo.m_PlateNumber = new String(msg.stuObject.szText,
"GBK").trim();
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
trafficInfo.m_PlateType = new String(msg.stTrafficCar.szPlateType).trim();
trafficInfo.m_FileCount = String.valueOf(msg.stuFileInfo.bCount);
trafficInfo.m_FileIndex = String.valueOf(msg.stuFileInfo.bIndex);
trafficInfo.m_GroupID = String.valueOf(msg.stuFileInfo.nGroupId);
trafficInfo.m_IllegalPlace =
ToolKits.GetPointerDataToByteArr(msg.stTrafficCar.szDeviceAddress);
trafficInfo.m_LaneNumber = String.valueOf(msg.nLane);
trafficInfo.m_PlateColor = new String(msg.stTrafficCar.szPlateColor).trim();
62
trafficInfo.m_VehicleColor = new
String(msg.stTrafficCar.szVehicleColor).trim();
trafficInfo.m_VehicleType = new
String(msg.stuVehicle.szObjectSubType).trim();
trafficInfo.m_VehicleSize =
Res.string().getTrafficSize(msg.stTrafficCar.nVehicleSize);
trafficInfo.m_Utc = msg.UTC;
trafficInfo.m_bPicEnble = msg.stuObject.bPicEnble;
trafficInfo.m_OffSet = msg.stuObject.stPicInfo.dwOffSet;
trafficInfo.m_FileLength = msg.stuObject.stPicInfo.dwFileLenth;
trafficInfo.m_BoundingBox = msg.stuObject.BoundingBox;
break;
}
case NetSDKLib.EVENT_IVS_TRAFFIC_BACKING: ///<
reverse illegally event
{
NetSDKLib.DEV_EVENT_IVS_TRAFFIC_BACKING_INFO msg = new
NetSDKLib.DEV_EVENT_IVS_TRAFFIC_BACKING_INFO();
ToolKits.GetPointerData(pAlarmInfo, msg);
trafficInfo.m_EventName =
Res.string().getEventName(NetSDKLib.EVENT_IVS_TRAFFIC_BACKING);
try {
trafficInfo.m_PlateNumber = new String(msg.stuObject.szText,
"GBK").trim();
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
trafficInfo.m_PlateType = new String(msg.stTrafficCar.szPlateType).trim();
trafficInfo.m_FileCount = String.valueOf(msg.stuFileInfo.bCount);
trafficInfo.m_FileIndex = String.valueOf(msg.stuFileInfo.bIndex);
trafficInfo.m_GroupID = String.valueOf(msg.stuFileInfo.nGroupId);
trafficInfo.m_IllegalPlace =
ToolKits.GetPointerDataToByteArr(msg.stTrafficCar.szDeviceAddress);
trafficInfo.m_LaneNumber = String.valueOf(msg.nLane);
trafficInfo.m_PlateColor = new String(msg.stTrafficCar.szPlateColor).trim();
trafficInfo.m_VehicleColor = new
String(msg.stTrafficCar.szVehicleColor).trim();
trafficInfo.m_VehicleType = new
String(msg.stuVehicle.szObjectSubType).trim();
trafficInfo.m_VehicleSize =
Res.string().getTrafficSize(msg.stTrafficCar.nVehicleSize);
trafficInfo.m_Utc = msg.UTC;
trafficInfo.m_bPicEnble = msg.stuObject.bPicEnble;
trafficInfo.m_OffSet = msg.stuObject.stPicInfo.dwOffSet;
63
trafficInfo.m_FileLength = msg.stuObject.stPicInfo.dwFileLenth;
trafficInfo.m_BoundingBox = msg.stuObject.BoundingBox;
break;
}
case
NetSDKLib.EVENT_IVS_TRAFFIC_PARKINGSPACEPARKING:
///< parking space occupied
{
NetSDKLib.DEV_EVENT_TRAFFIC_PARKINGSPACEPARKING_INFO msg =
new NetSDKLib.DEV_EVENT_TRAFFIC_PARKINGSPACEPARKING_INFO();
ToolKits.GetPointerData(pAlarmInfo, msg);
trafficInfo.m_EventName =
Res.string().getEventName(NetSDKLib.EVENT_IVS_TRAFFIC_PARKINGSP
ACEPARKING);
try {
trafficInfo.m_PlateNumber = new String(msg.stuObject.szText,
"GBK").trim();
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
trafficInfo.m_PlateType = new String(msg.stTrafficCar.szPlateType).trim();
trafficInfo.m_FileCount = String.valueOf(msg.stuFileInfo.bCount);
trafficInfo.m_FileIndex = String.valueOf(msg.stuFileInfo.bIndex);
trafficInfo.m_GroupID = String.valueOf(msg.stuFileInfo.nGroupId);
trafficInfo.m_IllegalPlace =
ToolKits.GetPointerDataToByteArr(msg.stTrafficCar.szDeviceAddress);
trafficInfo.m_LaneNumber = String.valueOf(msg.nLane);
trafficInfo.m_PlateColor = new String(msg.stTrafficCar.szPlateColor).trim();
trafficInfo.m_VehicleColor = new
String(msg.stTrafficCar.szVehicleColor).trim();
trafficInfo.m_VehicleType = new
String(msg.stuVehicle.szObjectSubType).trim();
trafficInfo.m_VehicleSize =
Res.string().getTrafficSize(msg.stTrafficCar.nVehicleSize);
trafficInfo.m_Utc = msg.UTC;
trafficInfo.m_bPicEnble = msg.stuObject.bPicEnble;
trafficInfo.m_OffSet = msg.stuObject.stPicInfo.dwOffSet;
trafficInfo.m_FileLength = msg.stuObject.stPicInfo.dwFileLenth;
trafficInfo.m_BoundingBox = msg.stuObject.BoundingBox;
break;
}
case
NetSDKLib.EVENT_IVS_TRAFFIC_PARKINGSPACENOPARKING:
64
///< parking space empty
{
NetSDKLib.DEV_EVENT_TRAFFIC_PARKINGSPACENOPARKING_INFO
msg = new
NetSDKLib.DEV_EVENT_TRAFFIC_PARKINGSPACENOPARKING_INFO();
ToolKits.GetPointerData(pAlarmInfo, msg);
trafficInfo.m_EventName =
Res.string().getEventName(NetSDKLib.EVENT_IVS_TRAFFIC_PARKINGSP
ACENOPARKING);
try {
trafficInfo.m_PlateNumber = new String(msg.stuObject.szText,
"GBK").trim();
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
trafficInfo.m_PlateType = new String(msg.stTrafficCar.szPlateType).trim();
trafficInfo.m_FileCount = String.valueOf(msg.stuFileInfo.bCount);
trafficInfo.m_FileIndex = String.valueOf(msg.stuFileInfo.bIndex);
trafficInfo.m_GroupID = String.valueOf(msg.stuFileInfo.nGroupId);
trafficInfo.m_IllegalPlace =
ToolKits.GetPointerDataToByteArr(msg.stTrafficCar.szDeviceAddress);
trafficInfo.m_LaneNumber = String.valueOf(msg.nLane);
trafficInfo.m_PlateColor = new String(msg.stTrafficCar.szPlateColor).trim();
trafficInfo.m_VehicleColor = new
String(msg.stTrafficCar.szVehicleColor).trim();
trafficInfo.m_VehicleType = new
String(msg.stuVehicle.szObjectSubType).trim();
trafficInfo.m_VehicleSize =
Res.string().getTrafficSize(msg.stTrafficCar.nVehicleSize);
trafficInfo.m_Utc = msg.UTC;
trafficInfo.m_bPicEnble = msg.stuObject.bPicEnble;
trafficInfo.m_OffSet = msg.stuObject.stPicInfo.dwOffSet;
trafficInfo.m_FileLength = msg.stuObject.stPicInfo.dwFileLenth;
trafficInfo.m_BoundingBox = msg.stuObject.BoundingBox;
break;
}
case
NetSDKLib.EVENT_IVS_TRAFFIC_WITHOUT_SAFEBELT:
///< not wearing seat belt
{
NetSDKLib.DEV_EVENT_TRAFFIC_WITHOUT_SAFEBELT msg = new
NetSDKLib.DEV_EVENT_TRAFFIC_WITHOUT_SAFEBELT();
ToolKits.GetPointerData(pAlarmInfo, msg);
65
trafficInfo.m_EventName =
Res.string().getEventName(NetSDKLib.EVENT_IVS_TRAFFIC_WITHOUT_
SAFEBELT);
try {
trafficInfo.m_PlateNumber = new String(msg.stuObject.szText,
"GBK").trim();
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
trafficInfo.m_PlateType = new String(msg.stuTrafficCar.szPlateType).trim();
trafficInfo.m_FileCount = String.valueOf(msg.stuFileInfo.bCount);
trafficInfo.m_FileIndex = String.valueOf(msg.stuFileInfo.bIndex);
trafficInfo.m_GroupID = String.valueOf(msg.stuFileInfo.nGroupId);
trafficInfo.m_IllegalPlace =
ToolKits.GetPointerDataToByteArr(msg.stuTrafficCar.szDeviceAddress);
trafficInfo.m_LaneNumber = String.valueOf(msg.nLane);
trafficInfo.m_PlateColor = new String(msg.stuTrafficCar.szPlateColor).trim();
trafficInfo.m_VehicleColor = new
String(msg.stuTrafficCar.szVehicleColor).trim();
trafficInfo.m_VehicleType = new
String(msg.stuVehicle.szObjectSubType).trim();
trafficInfo.m_VehicleSize =
Res.string().getTrafficSize(msg.stuTrafficCar.nVehicleSize);
trafficInfo.m_Utc = msg.UTC;
trafficInfo.m_bPicEnble = msg.stuObject.bPicEnble;
trafficInfo.m_OffSet = msg.stuObject.stPicInfo.dwOffSet;
trafficInfo.m_FileLength = msg.stuObject.stPicInfo.dwFileLenth;
trafficInfo.m_BoundingBox = msg.stuObject.BoundingBox;
break;
}
default:
break;
}
66
11 Person and ID Card Comparison
Subscription to Event
11.1.1 Introduction
Check whether the person detected matches the ID card information.
Sample Code
/* intelligent alarm event callback */
public static class fAnalyzerDataCB implements NetSDKLib.fAnalyzerDataCallBack {
private BufferedImage snapBufferedImage = null;
private BufferedImage idBufferedImage = null;
private fAnalyzerDataCB() {}
@Override
public int invoke(LLong lAnalyzerHandle, int dwAlarmType,
Pointer pAlarmInfo, Pointer pBuffer, int dwBufSize,
Pointer dwUser, int nSequence, Pointer reserved) {
if(pAlarmInfo == null) {
return 0;
}
67
path.mkdir();
}
switch(dwAlarmType)
{
case NetSDKLib.EVENT_IVS_CITIZEN_PICTURE_COMPARE:
// Person and ID card comparison
{
DEV_EVENT_CITIZEN_PICTURE_COMPARE_INFO msg = new
DEV_EVENT_CITIZEN_PICTURE_COMPARE_INFO();
ToolKits.GetPointerData(pAlarmInfo, msg);
try {
System.out.println("event occurrence time:" + msg.stuUTC.toString());
System.out.println("event name :" + new String(msg.szName,
"GBK").trim());
System.out.println("image similiarity:" +
msg.nSimilarity);
System.out.println("detection threashold:" +
msg.nThreshold);
if (msg.emSex == 1) {
System.out.println("gender: male");
}else if (msg.emSex == 2){
System.out.println("gender: female");
}else {
System.out.println("gender: known");
}
System.out.println("nation:" + msg.nEthnicity);
68
System.out.println("DOB:" +
msg.stuBirth.toStringTimeEx());
System.out.println("valid starting date:" +
msg.stuValidityStart.toStringTimeEx());
if (msg.bLongTimeValidFlag == 1) {
System.out.println("valid end date:forever");
}else{
System.out.println("valid end date:"+
msg.stuValidityEnd.toStringTimeEx());
}
System.out.println("IC card number:" + new String(msg.szCardNo,
"GBK").trim());
} catch (Exception e) {
e.printStackTrace();
}
// take images
String strFileName = path + "\\" + System.currentTimeMillis() +
"citizen_snap.jpg";
byte[] snapBuffer =
pBuffer.getByteArray(msg.stuImageInfo[0].dwOffSet,
msg.stuImageInfo[0].dwFileLenth);
ByteArrayInputStream snapArrayInputStream = new
ByteArrayInputStream(snapBuffer);
try {
snapBufferedImage =
ImageIO.read(snapArrayInputStream);
if(snapBufferedImage == null) {
return 0;
}
ImageIO.write(snapBufferedImage, "jpg", new
File(strFileName));
} catch (IOException e) {
e.printStackTrace();
}
// ID card image
strFileName = path + "\\" + System.currentTimeMillis() +
"citizen_id.jpg";
byte[] idBuffer =
pBuffer.getByteArray(msg.stuImageInfo[1].dwOffSet,
msg.stuImageInfo[1].dwFileLenth);
ByteArrayInputStream idArrayInputStream = new
ByteArrayInputStream(idBuffer);
try {
idBufferedImage =
69
ImageIO.read(idArrayInputStream);
if(idBufferedImage == null) {
return 0;
}
ImageIO.write(idBufferedImage, "jpg", new
File(strFileName));
} catch (IOException e) {
e.printStackTrace();
}
break;
}
default:
break;
}
return 0;
}
}
70
12 Interface
SDK Initialization
12.1.1 CLIENT_Init
Table 12-1 SDK initialization CLIENT_Init
Options Description
Description Initialize the whole SDK
public boolean CLIENT_Init(
Function
Callback cbDisConnect, Pointer dwUser);
[in]cbDisConnect Disconnection callback function
Parameter
[in]dwUser Userparameter of disconnection callback function
Return Value Success: True; Failure: False
Precondition of calling network SDK functions
Note When callback function is NULL, if the device iss offline, will not be called
back to users.
12.1.2 CLIENT_Cleanup
Table 12-2 SDK clearing CLIENT_Cleanup
Options Description
Description Clear SDK
Function public void CLIENT_Cleanup();
Parameter None
Return Value None
Note SDK clearing interface, called before end
12.1.3 CLIENT_SetAutoReconnect
Table 12-3 Configuring disconnection callback function CLIENT_SetAutoReconnect
Options Description
Description Configuring disconnection callback function
public void CLIENT_SetAutoReconnect(
Function
Callback cbAutoConnect, Pointer dwUser);
[in]cbAutoConnect Disconnection callback function
Parameter
[in]dwUser User parameter of disconnection callback function
Return Value None
Note If callbackfunction interface is NULL, the device will not auto reconnected.
71
12.1.4 CLIENT_SetNetworkParam
Table 12-4 Configuring network parameter CLIENT_SetNetworkParam
Options Description
Description Configuring network parameter
public void CLIENT_SetNetworkParam(
Function
NET_PARAM pNetParam);
[in]pNetParam Parameters like network delay, reconnected times,
Parameter
and buffer size.
Return Value None
Note Adjust as needed.
Device Login
12.2.1 CLIENT_LoginWithHighLevelSecurity
Table 12-5 Log in to device CLIENT_LoginWithHighLevelSecurity
Options Description
Description Log in to device
public LLong CLIENT_LoginWithHighLevelSecurity(
Function NET_IN_LOGIN_WITH_HIGHLEVEL_SECURITY pstInParam,
NET_OUT_LOGIN_WITH_HIGHLEVEL_SECURITY pstOutParam);
[in]pstInParam Input parameter
Parameter
[out]pstOutParam Output parameter
Return Value Success: handle; failure: 0
Packed in NetSDKLib nterfaces; called by the following method:
Note
CLIENT_LoginWithHighLevelSecurity(pstInParam, pstOutParam);
12.2.2 CLIENT_Logout
Table 12-6 Log out CLIENT_Logout
Options Description
Description Lug out of the device
Function public boolean CLIENT_Logout(LLong lLoginID);
Value returned by
Parameter [in]lLoginID
CLIENT_LoginWithHighLevelSecurity
Return Value Success: true; failure: false
Packed in NetSDKLib nterfaces; called by the following method:
Description
CLIENT_Logout(m_hLoginHandle);
72
Real-time Monitoring
12.3.1 CLIENT_RealPlayEx
Table 12-7 Open real-time monitoring CLIENT_RealPlayEx
Options Description
Description Open real-time monitoring
public LLong CLIENT_RealPlayEx(
Function
LLong lLoginID, int nChannelID, Pointer hWnd, int rType);
[in]lLoginID Value returned by
CLIENT_LoginWithHighLevelSecurity
Parameter [in]nChannelID Video channel number, integer start from 0
[in]hWnd Window handle, valid only in Windows
[in]rType Live view types
Return Value Success: non 0; failure: 0
Windows:
When hWnd is valid, the corresponding window displays picture.
Note
When hWnd is NULL, get the video data through setting a callback and
send to user for treatment.
12.3.2 CLIENT_StopRealPlayEx
Table 12-9 CLIENT_StopRealPlayEx
Options Description
Description Stop the real-time monitoring.
73
Options Description
Function public boolean CLIENT_StopRealPlayEx(LLong lRealHandle);
Parameter [in]lRealHandle The return value of CLIENT_RealPlayEx
Return Value Success: TRUE. Failure: FALSE.
Description None.
12.4.1 CLIENT_RealLoadPictureEx
Table 12-10 Subscribing Intelligent Event CLIENT_RealLoadPictureEx
Options Description
Description Subscribing Intelligent Event
public LLong CLIENT_RealLoadPictureEx(
LLong lLoginID, int nChannelID,
Function int dwAlarmType, int bNeedPicFile,
StdCallCallback cbAnalyzerData,
Pointer dwUser, Pointer Reserved);
The value returned by
[in]lLoginID
CLIENT_LoginWithHighLevelSecurity
[in]nChannelID Device channel number. (from 0)
[in]dwAlarmType Intelligent traffic event type.
Parameter
[in]bNeedPicFile Whether to subscribe picture file
[in]cbAnalyzerData Intelligent data analysis callback function.
[in]dwUser The user parameters.
[in]Reserved Reserve parameter.
Return Value Success: LLONG subscribing handle; failure: 0
Note If interface failed to return, use CLIENT_GetLastError to get error code
74
dwAlarmType definition value Definition Callback pAlarmInfo
structural body
Loitering
EVENT_IVS_WANDERDETECTION 0x00000007 DEV_EVENT_WANDER_INFO
detection
Video
EVENT_IVS_VIDEOABNORMALDETE DEV_EVENT_VIDEOABNORM
0x00000013 abnormal
CTION ALDETECTION_INFO
detection
Audio
EVENT_IVS_AUDIO_ABNORMALDET DEV_EVENT_IVS_AUDIO_AB
0x00000126 abnormal
ECTION NORMALDETECTION_INFO
detection
Climbing DEV_EVENT_IVS_CLIMB_INF
EVENT_IVS_CLIMBDETECTION 0x00000128
Detection O
Fighting DEV_EVENT_FLOWSTAT_INF
EVENT_IVS_FIGHTDETECTION 0x0000000E
Detection O
Leave Post DEV_EVENT_IVS_LEAVE_INF
EVENT_IVS_LEAVEDETECTION 0x00000129
Detection O
Getting up DEV_EVENT_PSRISEDETECTI
EVENT_IVS_PSRISEDETECTION 0x0000011E
Detection ON_INFO
Illegal
EVENT_IVS_PASTEDETECTION 0x00000004 sticker DEV_EVENT_PASTE_INFO
detection
12.4.2 CLIENT_StopLoadPic
Table 12-12 Stop subscribing intelligent event CLIENT_StopLoadPic
Options Description
Description Stop subscribing intelligent event
Function public boolean CLIENT_StopLoadPic(LLong lAnalyzerHandle);
Parameter [in]lAnalyzerHandle Intelligent event subscribing handle
BOOL type
Return Value Success: TRUE
Failure: FALSE
Note If interface failed to return, use CLIENT_GetLastError to get error code
12.5.1 CLIENT_AttachVideoStatSummary
Table 12-13 Subscribing people counting event CLIENT_AttachVideoStatSummary
Options Description
Description Subscribing people counting event
public LLong CLIENT_AttachVideoStatSummary(LLong lLoginID,
Function NET_IN_ATTACH_VIDEOSTAT_SUM pInParam,
NET_OUT_ATTACH_VIDEOSTAT_SUM pOutParam, int nWaitTime);
75
Options Description
[in] lLoginID Login handle
[in] pInParam The input parameter of subscribing people counting
Parameter The output parameter of subscribing people
[out] pOutParam
counting
[in] nWaitTime timeout
Return Value People counting subscribing handle
Note None
12.5.2 CLIENT_DetachVideoStatSummary
Table 12-14 Cancel subscribing people counting event CLIENT_DetachVideoStatSummary
Options Description
Description Cancel subscribing people counting event
76
13 Callback
Note
It is recommended that the callback function is written as static single instance mode; otherwise the
memory will make the program crash.
fDisConnectCallBack
Table 13-1 Disconnection callback fDisConnectCallBack
Options Description
Description Disconnection callback
public interface fDisConnect extends Callback {
public void invoke(LLong lLoginID, String pchDVRIP, int nDVRPort, Pointer
Function
dwUser);
}
[out]lLoginID Return value of CLIENT_LoginWithHighLevelSecurity
[out]pchDVRIP Disconnected device IP
Parameter
[out]nDVRPort Disconnected device port
[out]dwUser User parameters for callback
Return Value None
Note None
fHaveReConnectCallBack
Table 13-2 Reconnection callback fHaveReConnectCallBack
Options Description
Description Reconnection callback
public interface fHaveReConnect extends Callback {
public void invoke(LLong lLoginID, String pchDVRIP, int nDVRPort,
Function
Pointer dwUser);
}
[out]lLoginID Return value of CLIENT_LoginWithHighLevelSecurity
[out]pchDVRIP Reconnected device IP
Parameter
[out]nDVRPort Reconnected device port
[out]dwUser User parameters for callback
Return Value None
Note None
fRealDataCallBackEx
Table 13-3 Real-time monitoring data callback fRealDataCallBackEx
Options Description
Description Real-time monitoring data callback
Function public interface fRealDataCallBackEx extends Callback {
77
Options Description
public void invoke(LLong lRealHandle, int dwDataType, Pointer
pBuffer, int dwBufSize, int param, Pointer dwUser);
}
[out]lRealHandle Return value of CLIENT_RealPlayEx
[out]dwDataType Data type: 0 indicates original data, and 2 indicates
YUV data
[out]pBuffer Monitoring data block address
[out]dwBufSize Length of monitoring data block, in bytes
Parameter [out]param Parameter structure for callback data. The type is
different if the dwDataType value is different.
When dwDataType is 0, param is null pointer.
When dwDataType is 2, param is the structure
pointer tagCBYUVDataParam.
[out]dwUser User parameters for callback
Return Value None
Note None
fAnalyzerDataCallBack
Table 13-4 Intelligent Event Callback fAnalyzerDataCallBack
Options Description
Description Remote device status callback
public interface fAnalyzerDataCallBack extends Callback {
public int invoke(LLong lAnalyzerHandle, int dwAlarmType, Pointer
Function pAlarmInfo, Pointer pBuffer, int dwBufSize, Pointer dwUser, int nSequence, Pointer
reserved);
}
[out]lAnalyzerHandle Return value of CLIENT_RealLoadPictureEx
[out]dwEventType Intelligent event type
pAlarmInfo Event information cache
[out]pBuffer Image cache
Parameter
[out]dwBufSize Image cache size
[out]dwUser User data
[out]nSequence ESN
[out]reserved Reserve
Return None
Value
After subscribing to the intelligent event of remote device, if an intelligent event is
Note
triggered, the camera will report relevant information of the event.
fVideoStatSumCallBack
Options Description
Description People counting event subscription callback
78
Options Description
public interface fVideoStatSumCallBack extends Callback {
public void invoke(LLong lAttachHandle, NET_VIDEOSTAT_SUMMARY pBuf,
Function
int dwBufLen, Pointer dwUser);
}
[out] lAttachHandle People counting subscription handle
[out] pBuf People counting return data
Parameter
[out]dwBufLen Length of return data
[out]dwUser User data
Return Value None
Note None
79
Cybersecurity Recommendations
Cybersecurity is more than just a buzzword: it’s something that pertains to every device that is
connected to the internet. IP video surveillance is not immune to cyber risks, but taking basic steps
toward protecting and strengthening networks and networked appliances will make them less
susceptible to attacks. Below are some tips and recommendations on how to create a more secured
security system.
Mandatory actions to be taken for basic device network security:
1. Use Strong Passwords
Please refer to the following suggestions to set passwords:
The length should not be less than 8 characters;
Include at least two types of characters; character types include upper and lower case
letters, numbers and symbols;
Do not contain the account name or the account name in reverse order;
Do not use continuous characters, such as 123, abc, etc.;
Do not use overlapped characters, such as 111, aaa, etc.;
2. Update Firmware and Client Software in Time
According to the standard procedure in Tech-industry, we recommend to keep your device
(such as NVR, DVR, IP camera, etc.) firmware up-to-date to ensure the system is equipped
with the latest security patches and fixes. When the device is connected to the public
network, it is recommended to enable the “auto-check for updates” function to obtain
timely information of firmware updates released by the manufacturer.
We suggest that you download and use the latest version of client software.
"Nice to have" recommendations to improve your device network security:
1. Physical Protection
We suggest that you perform physical protection to device, especially storage devices. For
example, place the device in a special computer room and cabinet, and implement well-done
access control permission and key management to prevent unauthorized personnel from
carrying out physical contacts such as damaging hardware, unauthorized connection of
removable device (such as USB flash disk, serial port), etc.
2. Change Passwords Regularly
We suggest that you change passwords regularly to reduce the risk of being guessed or cracked.
3. Set and Update Passwords Reset Information Timely
The device supports password reset function. Please set up related information for password
reset in time, including the end user’s mailbox and password protection questions. If the
information changes, please modify it in time. When setting password protection questions, it is
suggested not to use those that can be easily guessed.
4. Enable Account Lock
The account lock feature is enabled by default, and we recommend you to keep it on to
guarantee the account security. If an attacker attempts to log in with the wrong password
several times, the corresponding account and the source IP address will be locked.
5. Change Default HTTP and Other Service Ports
We suggest you to change default HTTP and other service ports into any set of numbers
between 1024~65535, reducing the risk of outsiders being able to guess which ports you are
using.
80
6. Enable HTTPS
We suggest you to enable HTTPS, so that you visit Web service through a secure communication
channel.
7. MAC Address Binding
We recommend you to bind the IP and MAC address of the gateway to the device, thus reducing
the risk of ARP spoofing.
8. Assign Accounts and Privileges Reasonably
According to business and management requirements, reasonably add users and assign a
minimum set of permissions to them.
9. Disable Unnecessary Services and Choose Secure Modes
If not needed, it is recommended to turn off some services such as SNMP, SMTP, UPnP, etc., to
reduce risks.
If necessary, it is highly recommended that you use safe modes, including but not limited to the
following services:
SNMP: Choose SNMP v3, and set up strong encryption passwords and authentication
passwords.
SMTP: Choose TLS to access mailbox server.
FTP: Choose SFTP, and set up strong passwords.
AP hotspot: Choose WPA2-PSK encryption mode, and set up strong passwords.
10. Audio and Video Encrypted Transmission
If your audio and video data contents are very important or sensitive, we recommend that you
use encrypted transmission function, to reduce the risk of audio and video data being stolen
during transmission.
Reminder: encrypted transmission will cause some loss in transmission efficiency.
11. Secure Auditing
Check online users: we suggest that you check online users regularly to see if the device is
logged in without authorization.
Check device log: By viewing the logs, you can know the IP addresses that were used to log
in to your devices and their key operations.
12. Network Log
Due to the limited storage capacity of the device, the stored log is limited. If you need to save
the log for a long time, it is recommended that you enable the network log function to ensure
that the critical logs are synchronized to the network log server for tracing.
13. Construct a Safe Network Environment
In order to better ensure the safety of device and reduce potential cyber risks, we recommend:
Disable the port mapping function of the router to avoid direct access to the intranet
devices from external network.
The network should be partitioned and isolated according to the actual network needs. If
there are no communication requirements between two sub networks, it is suggested to
use VLAN, network GAP and other technologies to partition the network, so as to achieve
the network isolation effect.
Establish the 802.1x access authentication system to reduce the risk of unauthorized access
to private networks.
Enable IP/MAC address filtering function to limit the range of hosts allowed to access the
device.
81
Intelligent Events
82
RROUTE_INFO)
traffic-RunRedLight(Corresponding to
EVENT_IVS_TRAFFIC_RUNREDLIGHT 0x00000100
DEV_EVENT_TRAFFIC_RUNREDLIGHT_INFO)
traffic-Overline(Corresponding to
EVENT_IVS_TRAFFIC_OVERLINE 0x00000101
DEV_EVENT_TRAFFIC_OVERLINE_INFO)
traffic-Retrograde(Corresponding to
EVENT_IVS_TRAFFIC_RETROGRADE 0x00000102
DEV_EVENT_TRAFFIC_RETROGRADE_INFO)
traffic-TurnLeft(Corresponding to
EVENT_IVS_TRAFFIC_TURNLEFT 0x00000103
DEV_EVENT_TRAFFIC_TURNLEFT_INFO)
traffic-TurnRight(Corresponding to
EVENT_IVS_TRAFFIC_TURNRIGHT 0x00000104
DEV_EVENT_TRAFFIC_TURNRIGHT_INFO)
traffic-Uturn(Corresponding to
EVENT_IVS_TRAFFIC_UTURN 0x00000105
DEV_EVENT_TRAFFIC_UTURN_INFO)
traffic-Overspeed(Corresponding to
EVENT_IVS_TRAFFIC_OVERSPEED 0x00000106
DEV_EVENT_TRAFFIC_OVERSPEED_INFO)
traffic-Underspeed(Corresponding to
EVENT_IVS_TRAFFIC_UNDERSPEED 0x00000107
DEV_EVENT_TRAFFIC_UNDERSPEED_INFO)
traffic-Parking(Corresponding to
EVENT_IVS_TRAFFIC_PARKING 0x00000108
DEV_EVENT_TRAFFIC_PARKING_INFO)
traffic-WrongRoute(Corresponding to
EVENT_IVS_TRAFFIC_WRONGROUTE 0x00000109 DEV_EVENT_TRAFFIC_WRONGROUTE_INFO
)
traffic-CrossLane(Corresponding to
EVENT_IVS_TRAFFIC_CROSSLANE 0x0000010A
DEV_EVENT_TRAFFIC_CROSSLANE_INFO)
traffic-OverYellowLine(Corresponding to
EVENT_IVS_TRAFFIC_OVERYELLOWLINE 0x0000010B DEV_EVENT_TRAFFIC_OVERYELLOWLINE_I
NFO)
traffic-YellowPlateInLane(Corresponding to
EVENT_IVS_TRAFFIC_YELLOWPLATEINLAN
0x0000010E DEV_EVENT_TRAFFIC_YELLOWPLATEINLAN
E
E_INFO)
Traffic offense-Pedestral has higher priority
EVENT_IVS_TRAFFIC_PEDESTRAINPRIORIT at the crosswalk(Corresponding to
0x0000010F
Y DEV_EVENT_TRAFFIC_PEDESTRAINPRIORIT
Y_INFO)
no passing(Corresponding to
EVENT_IVS_TRAFFIC_NOPASSING 0x00000111
DEV_EVENT_TRAFFIC_NOPASSING_INFO)
abnormal run(Corresponding to
EVENT_IVS_ABNORMALRUNDETECTION 0x00000112 DEV_EVENT_ABNORMALRUNDETECTION_I
NFO)
retrograde(Corresponding to
EVENT_IVS_RETROGRADEDETECTION 0x00000113 DEV_EVENT_RETROGRADEDETECTION_INF
O)
taking away things(Corresponding to
EVENT_IVS_TAKENAWAYDETECTION 0x00000115
DEV_EVENT_TAKENAWAYDETECTION_INFO)
EVENT_IVS_PARKINGDETECTION 0x00000116 parking(Corresponding to
83
DEV_EVENT_PARKINGDETECTION_INFO)
Target recognition(Corresponding to
EVENT_IVS_FACERECOGNITION 0x00000117
DEV_EVENT_FACERECOGNITION_INFO)
manual snap(Corresponding to
EVENT_IVS_TRAFFIC_MANUALSNAP 0x00000118
DEV_EVENT_TRAFFIC_MANUALSNAP_INFO)
traffic flow state(Corresponding to
EVENT_IVS_TRAFFIC_FLOWSTATE 0x00000119
DEV_EVENT_TRAFFIC_FLOW_STATE)
traffic vehicle route(Corresponding to
EVENT_IVS_TRAFFIC_VEHICLEINROUTE 0x0000011B DEV_EVENT_TRAFFIC_VEHICLEINROUTE_IN
FO)
motion detect(Corresponding to
EVENT_ALARM_MOTIONDETECT 0x0000011C
DEV_EVENT_ALARM_INFO)
local alarm(Corresponding to
EVENT_ALARM_LOCALALARM 0x0000011D
DEV_EVENT_ALARM_INFO)
rise detect(Corresponding to
EVENT_IVS_PSRISEDETECTION 0x0000011E
DEV_EVENT_PSRISEDETECTION_INFO)
traffic tollgate(Corresponding to
EVENT_IVS_TRAFFIC_TOLLGATE 0x00000120
DEV_EVENT_TRAFFICJUNCTION_INFO)
density detection of
EVENT_IVS_DENSITYDETECTION 0x00000121 persons(Corresponding to
DEV_EVENT_DENSITYDETECTION_INFO)
video diagnosis result(Corresponding to
EVENT_IVS_VIDEODIAGNOSIS 0x00000122 NET_VIDEODIAGNOSIS_COMMON_INFO
and NET_REAL_DIAGNOSIS_RESULT)
take up in bus route(Corresponding to
EVENT_IVS_TRAFFIC_VEHICLEINBUSROUTE 0x00000124 DEV_EVENT_TRAFFIC_VEHICLEINBUSROUTE
_INFO)
illegal astern(Corresponding to
EVENT_IVS_TRAFFIC_BACKING 0x00000125
DEV_EVENT_IVS_TRAFFIC_BACKING_INFO)
audio abnormity(Corresponding to
EVENT_IVS_AUDIO_ABNORMALDETECTIO
0x00000126 DEV_EVENT_IVS_AUDIO_ABNORMALDETEC
N
TION_INFO)
run yellow light(Corresponding to
EVENT_IVS_TRAFFIC_RUNYELLOWLIGHT 0x00000127 DEV_EVENT_TRAFFIC_RUNYELLOWLIGHT_I
NFO)
climb detection(Corresponding to
EVENT_IVS_CLIMBDETECTION 0x00000128
DEV_EVENT_IVS_CLIMB_INFO)
leave detection(Corresponding to
EVENT_IVS_LEAVEDETECTION 0x00000129
DEV_EVENT_IVS_LEAVE_INFO)
parking on yellow box(Corresponding to
EVENT_IVS_TRAFFIC_PARKINGONYELLOW
0x0000012A DEV_EVENT_TRAFFIC_PARKINGONYELLOW
BOX
BOX_INFO)
parking space parking(Corresponding to
EVENT_IVS_TRAFFIC_PARKINGSPACEPARKI
0x0000012B DEV_EVENT_TRAFFIC_PARKINGSPACEPARKI
NG
NG_INFO)
84
parking space no parking(Corresponding to
EVENT_IVS_TRAFFIC_PARKINGSPACENOPA
0x0000012C DEV_EVENT_TRAFFIC_PARKINGSPACENOPA
RKING
RKING_INFO)
passerby(Corresponding to
EVENT_IVS_TRAFFIC_PEDESTRAIN 0x0000012D
DEV_EVENT_TRAFFIC_PEDESTRAIN_INFO)
throw(Corresponding to
EVENT_IVS_TRAFFIC_THROW 0x0000012E
DEV_EVENT_TRAFFIC_THROW_INFO)
Parking line pressing events(Corresponding
EVENT_IVS_TRAFFIC_PARKINGSPACEOVER to
0x00000134
LINE DEV_EVENT_TRAFFIC_PARKINGSPACEOVER
LINE_INFO)
Cross stop line event(Corresponding to
EVENT_IVS_TRAFFIC_OVERSTOPLINE 0x00000137
DEV_EVENT_TRAFFIC_OVERSTOPLINE)
Traffic unfasten seat belt
EVENT_IVS_TRAFFIC_WITHOUT_SAFEBELT 0x00000138 event(Corresponding to
DEV_EVENT_TRAFFIC_WITHOUT_SAFEBELT)
Driver smoking event(Corresponding to
EVENT_IVS_TRAFFIC_DRIVER_SMOKING 0x00000139
DEV_EVENT_TRAFFIC_DRIVER_SMOKING)
Driver call event(Corresponding to
EVENT_IVS_TRAFFIC_DRIVER_CALLING 0x0000013A
DEV_EVENT_TRAFFIC_DRIVER_CALLING)
Pedestrain red light(Corresponding to
EVENT_IVS_TRAFFIC_PEDESTRAINRUNRED
0x0000013B DEV_EVENT_TRAFFIC_PEDESTRAINRUNRED
LIGHT
LIGHT_INFO)
Pass not in order(corresponding
EVENT_IVS_TRAFFIC_PASSNOTINORDER 0x0000013C DEV_EVENT_TRAFFIC_PASSNOTINORDER_I
NFO)
Analog alarm channel alarm
EVENT_ALARM_ANALOGALARM 0x00000150 event(correspondingDEV_EVENT_ALARM_A
NALOGALRM_INFO)
Warning lineexpansion
EVENT_IVS_CROSSLINEDETECTION_EX 0x00000151 event(Corresponding to
DEV_EVENT_CROSSLINE_INFO_EX)
Video tampering event(Corresponding to
EVENT_ALARM_VIDEOBLIND 0x00000153
DEV_EVENT_ALARM_VIDEOBLIND)
Jam Forbid into event(corresponding
EVENT_IVS_TRAFFIC_JAM_FORBID_INTO 0x00000163 DEV_EVENT_ALARM_JAMFORBIDINTO_INF
O)
Snap by time event(corresponding
EVENT_IVS_SNAPBYTIME 0x00000164
DEV_EVENT_SNAPBYTIME)
Event of QSYTrafficCarWeight
(corresponding to
EVENT_IVS_QSYTRAFFICCARWEIGHT 0x00000168
DEV_EVENT_QSYTRAFFICCARWEIGHT_INFO
)
Event of scene change (corresponding to
EVENT_IVS_SCENE_CHANGE 0x0000016D DEV_ALRAM_SCENECHANGE_INFO,CFG_VI
DEOABNORMALDETECTION_INFO)
85
Event of tumble detection(corresponding to
EVENT_IVS_TUMBLE_DETECTION 0x00000177
DEV_EVENT_TUMBLE_DETECTION_INFO)
Acccess control events (Corresponding to
EVENT_IVS_ACCESS_CTL 0x00000204
DEV_EVENT_ACCESS_CTL_INFO)
SnapManual events(Corresponding to
EVENT_IVS_SNAPMANUAL 0x00000205
DEV_EVENT_SNAPMANUAL)
RFID electronic tag events(Corresponding
EVENT_IVS_TRAFFIC_ELETAGINFO 0x00000206 to
DEV_EVENT_TRAFFIC_ELETAGINFO_INFO)
physiological fatigue driving
EVENT_IVS_TRAFFIC_TIREDPHYSIOLOGICA
0x00000207 events(Corresponding to
L
DEV_EVENT_TIREDPHYSIOLOGICAL_INFO)
Event of comparison with ID and card
picture(corresponding to
EVENT_IVS_CITIZEN_PICTURE_COMPARE 0x00000209
DEV_EVENT_CITIZEN_PICTURE_COMPARE_I
NFO)
Event of driver lower head(Corresponding
EVENT_IVS_TRAFFIC_TIREDLOWERHEAD 0x0000020A
to DEV_EVENT_TIREDLOWERHEAD_INFO)
Event of driver look around(Corresponding
EVENT_IVS_TRAFFIC_DRIVERLOOKAROUN
0x0000020B to
D
DEV_EVENT_DRIVERLOOKAROUND_INFO)
Event of driver leave post(Corresponding to
EVENT_IVS_TRAFFIC_DRIVERLEAVEPOST 0x0000020C
DEV_EVENT_DRIVERLEAVEPOST_INFO)
stereo standing event(Corresponding to
EVENT_IVS_MAN_STAND_DETECTION 0x0000020D DEV_EVENT_MANSTAND_DETECTION_INFO
)
Event of regional population statistics
EVENT_IVS_MAN_NUM_DETECTION 0x0000020E (Corresponding to
DEV_EVENT_MANNUM_DETECTION_INFO)
Event of driver yawn(Corresponding to
EVENT_IVS_TRAFFIC_DRIVERYAWN 0x00000210
DEV_EVENT_DRIVERYAWN_INFO)
Event of human trait(Corresponding to
EVENT_IVS_HUMANTRAIT 0x00000215
DEV_EVENT_HUMANTRAIT_INFO)
Event of car jump a queue(Corresponding
EVENT_IVS_TRAFFIC_QUEUEJUMP 0x0000021C to
DEV_EVENT_TRAFFIC_QUEUEJUMP_INFO)
X ray detection(Corresponding to
EVENI_IVS_XRAY_DETECTION 0x00000223
DEV_EVENT_XRAY_DETECTION_INFO)
truck forbid Enent(Corresponding to
EVENT_IVS_TRAFFIC_TRUCKFORBID 0x00000229
DEV_ENENT_TRAFFICTRUCKFORBID_INFO)
Event of high speed(Corresponding to
EVENT_IVS_HIGHSPEED 0x0000022B
DEV_EVENT_HIGHSPEED_INFO)
Event of crowd detection(Corresponding to
EVENT_IVS_CROWDDETECTION 0x0000022C
DEV_EVENT_CROWD_DETECTION_INFO)
Event of car distance short(Corresponding
EVENT_IVS_TRAFFIC_CARDISTANCESHORT 0x0000022D
to
86
DEV_EVENT_TRAFFIC_CARDISTANCESHORT
_INFO)
Pedestrian Junction Event(Corresponding
to
EVENT_IVS_PEDESTRIAN_JUNCTION 0x00000230
DEV_EVENT_PEDESTRIAN_JUNCTION_INFO
)
Vehicle recognition alarm(Corresponding to
EVENT_IVS_VEHICLE_RECOGNITION 0x00000231
DEV_EVENT_VEHICLE_RECOGNITION_INFO)
Event of Banner detection(Corresponding
EVENT_IVS_BANNER_DETECTION 0x0000023B
to DEV_EVENT_BANNER_DETECTION_INFO)
Event of normal fight(only be used to rule of
EVENT_IVS_NORMAL_FIGHTDETECTION 0x0000023C normal fight, the alarm event is same as
EVENT_IVS_FIGHTDETECTION)
Event of elevator abnormal(Corresponding
EVENT_IVS_ELEVATOR_ABNORMAL 0x0000023D to
DEV_EVENT_ELEVATOR_ABNORMAL_INFO)
Event of Class B
EVENT_IVS_TRAFFIC_PARKING_B 0x00000240 traffic-Parking(Corresponding to
DEV_EVENT_TRAFFIC_PARKING_B_INFO)
Event of Class C
EVENT_IVS_TRAFFIC_PARKING_C 0x00000241 traffic-Parking(Corresponding to
DEV_EVENT_TRAFFIC_PARKING_C_INFO)
Event of Class D
EVENT_IVS_TRAFFIC_PARKING_D 0x00000242 traffic-Parking(Corresponding to
DEV_EVENT_TRAFFIC_PARKING_D_INFO)
Event of FireWarning(Corresponding to
EVENT_IVS_FIREWARNING 0x00000245
DEV_EVENT_FIREWARNING_INFO)
Event of ShopPresence(Corresponding to
EVENT_IVS_SHOPPRESENCE 0x00000246
DEV_EVENT_SHOPPRESENCE_INFO)
Event of distance detection(Corresponding
EVENT_IVS_DISTANCE_DETECTION 0x0000024A to
DEV_EVENT_DISTANCE_DETECTION_INFO)
Event of non-motor overload
EVENT_IVS_TRAFFIC_NONMOTOR_OVERL (Corresponding to
0x0000024B
OAD DEV_EVENT_TRAFFIC_NONMOTOR_OVERL
OAD_INFO)
Event of non-motor without safehat
EVENT_IVS_TRAFFIC_NONMOTOR_WITHO (Corresponding to
0x0000024C
UTSAFEHAT DEV_EVENT_TRAFFIC_NONMOTOR_WITHO
UTSAFEHAT_INFO)
Event of flowBusiness (Corresponding to
EVENT_IVS_FLOWBUSINESS 0x0000024E
DEV_EVENT_FLOWBUSINESS_INFO)
Event of CityMotorParking (Corresponding
EVENT_IVS_CITY_MOTORPARKING 0x0000024F to
DEV_EVENT_CITY_MOTORPARKING_INFO)
87
Event of CityNonMotorParking
(Corresponding to
EVENT_IVS_CITY_NONMOTORPARKING 0x00000250
EV_EVENT_CITY_NONMOTORPARKING_INF
O)
Lane Departure warnning(Corresponding to
EVENT_IVS_LANEDEPARTURE_WARNNING 0x00000251 DEV_EVENT_LANEDEPARTURE_WARNNING
_INFO)
Forward Collision Warnning(Corresponding
EVENT_IVS_FORWARDCOLLISION_WARNNI to
0x00000252
NG DEV_EVENT_FORWARDCOLLISION_WARNNI
NG_INFO)
Event of NonMotor hold umbrella
EVENT_IVS_TRAFFIC_NONMOTOR_HOLDU (Corresponding to
0x00000254
MBRELLA DEV_EVENT_TRAFFIC_NONMOTOR_HOLDU
MBRELLA_INFO)
Event of FloatingObject detection
(Corresponding to
EVENT_IVS_FLOATINGOBJECT_DETECTION 0x00000257
DEV_EVENT_FLOATINGOBJECT_DETECTION
_INFO)
Event of phone call detect(Corresponding
EVENT_IVS_PHONECALL_DETECT 0x0000025A
to DEV_EVENT_PHONECALL_DETECT_INFO)
Event of Smoking Detection(Corresponding
EVENT_IVS_SMOKING_DETECT 0x0000025B
to DEV_EVENT_SMOKING_DETECT_INFO)
Event of Radar speed limit
alarm(Corresponding to
EVENT_IVS_RADAR_SPEED_LIMIT_ALARM 0x0000025C
DEV_EVENT_RADAR_SPEED_LIMIT_ALARM_
INFO)
Event of Water level detection
(Corresponding to
EVENT_IVS_WATER_LEVEL_DETECTION 0x0000025D
DEV_EVENT_WATER_LEVEL_DETECTION_IN
FO)
Event of Hold umbrella
EVENT_IVS_HOLD_UMBRELLA 0x0000025E detection(Corresponding to
DEV_EVENT_HOLD_UMBRELLA_INFO)
Event of Garbage Exposure detection
EVENT_IVS_GARBAGE_EXPOSURE 0x0000025F (Corresponding to
DEV_EVENT_GARBAGE_EXPOSURE_INFO)
Event of Dustbin Overflow detection
EVENT_IVS_DUSTBIN_OVER_FLOW 0x00000260 (Corresponding to
DEV_EVENT_DUSTBIN_OVER_FLOW_INFO)
Event of Door Front Dirty
EVENT_IVS_DOOR_FRONT_DIRTY 0x00000261 detection(Corresponding to
DEV_EVENT_DOOR_FRONT_DIRTY_INFO)
Event of manual
EVENT_IVS_TRAFFIC_PARKING_MANUAL 0x00000265 traffic-Parking(Corresponding to
DEV_EVENT_TRAFFIC_PARKING_MANUAL_I
88
NFO)
89
Event of intelligent
EVENT_IVS_INTELLI_SHELF 0x00000277 replenishment(Corresponding to
DEV_EVENT_INTELLI_SHELF_INFO)
Event of smart motion
detection(human),(Corresponding to
EVENT_ALARM_SMARTMOTION_HUMAN 0x00000279
DEV_EVENT_SMARTMOTION_HUMAN_INF
O)
Event of smart motion
detection(vehicle),(Corresponding to
EVENT_ALARM_SMARTMOTION_VEHICLE 0x0000027A
DEV_EVENT_SMARTMOTION_VEHICLE_INF
O)
Event of car driving in or out(Corresponding
EVENT_IVS_CAR_DRIVING_IN_OUT 0x0000027B to
DEV_EVENT_CAR_DRIVING_IN_OUT_INFO)
Event violent throw detection
(Corresponding to
EVENT_IVS_VIOLENT_THROW_DETECTION 0x0000027D
DEV_EVENT_VIOLENT_THROW_DETECTION
_INFO)
Event of target body detect (Corresponding
EVENT_IVS_FACEBODY_DETECT 0x00000281
to DEV_EVENT_FACEBODY_DETECT_INFO)
Event of target body analyse
EVENT_IVS_FACEBODY_ANALYSE 0x00000282 (Corresponding to
DEV_EVENT_FACEBODY_ANALYSE_INFO)
Event of gas station vehicle
EVENT_IVS_GASSTATION_VEHICLE_DETEC detection(Corresponding to
0x00000283
T DEV_EVENT_GASSTATION_VEHICLE_DETEC
T_INFO)
Event of animal detection(Corresponding to
EVENT_IVS_ANIMAL_DETECTION 0x00000286
DEV_EVENT_ANIMAL_DETECTION_INFO)
Event of shop window post(Corresponding
EVENT_IVS_SHOP_WINDOW_POST 0x00000287 to
DEV_EVENT_SHOP_WINDOW_POST_INFO)
Event of shop sign abnormal
(Corresponding to
EVENT_IVS_SHOP_SIGN_ABNORMAL 0x00000288
DEV_EVENT_SHOP_SIGN_ABNORMAL_INFO
)
Event of breed detection (Corresponding to
EVENT_IVS_BREED_DETECTION 0x00000289
DEV_EVENT_BREED_DETECTION_INFO)
Event of high toss detection(Corresponding
EVENT_IVS_HIGH_TOSS_DETECT 0x0000028D to
DEV_EVENT_HIGH_TOSS_DETECT_INFO)
Event of Radar cross region
detection(Corresponding to
EVENT_IVS_RADAR_REGION_DETECTION 0x00000295
DEV_EVENT_RADAR_REGION_DETECTION_I
NFO)
90
Event of parking lot status detection
EVENT_IVS_PARKING_LOT_STATUS_DETEC (Corresponding to
0x00000297
TION DEV_EVENT_PARKING_LOT_STATUS_DETEC
TION_INFO)
Event of loading test not covered by muck
EVENT_IVS_DREGS_UNCOVERED 0x00000299 truck(Corresponding to
DEV_EVENT_DREGS_UNCOVERED_INFO)
Event of Smart kitchen wearing
detection(alarm for not wearing mask,
EVENT_IVS_SMART_KITCHEN_CLOTHES_D chef's clothes whose color does not meet
0x0000029D
ETECTION the requirements)(Corresponding to
DEV_EVENT_SMART_KITCHEN_CLOTHES_D
ETECTION_INFO)
Event of sleep detect(Corresponding to
EVENT_IVS_SLEEP_DETECT 0x0000029E
DEV_EVENT_SLEEP_DETECT_INFO)
Event of play mobile phone(Corresponding
EVENT_IVS_PLAY_MOBILEPHONE 0x00000300
to DEV_EVENT_PLAY_MOBILEPHONE_INFO)
Event of Intelligent detection of human
body temperature(Corresponding to
EVENT_IVS_ANATOMY_TEMP_DETECT 0x00000303
DEV_EVENT_ANATOMY_TEMP_DETECT_INF
O)
Event of fog detect(Corresponding to
EVENT_IVS_FOG_DETECTION 0x00000308
DEV_EVENT_FOG_DETECTION)
Event of bc ( Corresponding to
EVENT_IVS_TRAFFIC_VEHICLE_BC 0x00000309
DEV_EVENT_TRAFFIC_VEHICLE_BC )
Event of non-motor vehicle access
EVENT_IVS_NONMOTOR_ENTRYING 0x0000030C elevator(Corresponding to
DEV_EVENT_NONMOTOR_ENTRYING_INFO)
Event of water stage monitor, only used for
task intelligent analysis (Corresponding to
EVENT_IVS_WATER_STAGE_MONITOR 0x0000030D
DEV_EVENT_WATER_STAGE_MONITOR_INF
O)
Event of traffic traffic road
EVENT_IVS_TRAFFIC_ROAD_ALERT 0x0000030E alert(Corresponding to
DEV_EVENT_TRAFFIC_ROAD_ALERT_INFO)
Event of break rule building
EVENT_IVS_BREAK_RULE_BUILDING_DETE detection(Corresponding to
0x0000030F
CTION DEV_EVENT_BREAK_RULE_BUILDIING_DETE
CTION_INFO)
Event of traffic non-motor run redlight
EVENT_IVS_TRAFFIC_NONMOTOR_RUN_R (Corresponding to
0x00000310
EDLIGHT DEV_EVENT_TRAFFIC_NONMOTOR_RUN_R
EDLIGHT_INFO )
Event of vehicle in emergency lane
EVENT_IVS_TRAFFIC_VEHICLE_IN_EMERGE
0x00000311 (Corresponding to
NCY_LANE
DEV_EVENT_TRAFFIC_VEHICLE_IN_EMERGE
91
NCY_LANE_INFO )
92
Manual capture of roadside parking spaces
EVENT_IVS_TRAFFIC_PARKINGSPACE_MAN (Corresponding to
0x00000346
UALSNAP DEV_EVENT_PARKINGSPACE_MANUALSNAP
_INFO )
Sun drying incident along the street
EVENT_IVS_STREET_SUNCURE 0x00000347 (Corresponding to
DEV_EVENT_STREET_SUNCURE_INFO )
Outdoor advertising event (Corresponding
to
EVENT_IVS_OUTDOOR_ADVERTISEMENT 0x00000348
DEV_EVENT_OUTDOOR_ADVERTISEMENT_I
NFO )
Random material detection event
EVENT_IVS_HUDDLE_MATERIAL 0x00000349 (Corresponding to
DEV_EVENT_HUDDLE_MATERIAL_INFO )
Car following alarm(Corresponding to
EVENT_IVS_FOLLOW_CAR_ALARM 0x0000034F
DEV_EVENT_FOLLOW_CAR_ALARM_INFO)
event to Parking statistics(Corresponding to
EVENT_IVS_TRAFFIC_PARKING_STATISTICS 0x0000035B DEV_EVENT_TRAFFIC_PARKING_STATISTICS
_INFO)
Thermal temperature abnormal event
alarm(Corresponding to
EVENT_IVS_HEAT_IMAGING_TEMPER 0x0000035C
DEV_EVENT_HEAT_IMAGING_TEMPER_INFO
)
Pollution detection event(Corresponding to
EVENT_IVS_SEWAGE_DETECTION 0x00000362
DEV_EVENT_SEWAGE_DETECTION_INFO)
Water color event(Corresponding to
EVENT_IVS_WATERCOLOR_DETECTION 0x00000363 DEV_EVENT_WATERCOLOR_DETECTION_IN
FO)
Video normal events,At the end of the video
diagnostic detection cycle, the diagnostic
items that have not reported errors are
EVENT_IVS_VIDEO_NORMAL_DETECTION 0x00000365
reported to the normal events
DEV_EVENT_VIDEO_NORMAL_DETECTION_
INFO
Item placement detection
EVENT_IVS_OBJECT_PLACEMENT_DETECTI event(Corresponding to
0x00000369
ON DEV_EVENT_OBJECT_PLACEMENT_DETECTI
ON_INFO)
Item removal detection
EVENT_IVS_OBJECT_REMOVAL_DETECTIO event(Corresponding to
0x0000036A
N DEV_EVENT_OBJECT_REMOVAL_DETECTIO
N_INFO)
Fire extinguisher detection
EVENT_IVS_FIRE_EXTINGUISHER_DETECTI event(Corresponding to
0x0000036C
ON DEV_EVENT_FIRE_EXTINGUISHER_DETECTI
ON_INFO)
93
Dial recognition alarm(Corresponding to
EVENT_IVS_DIALRECOGNITION 0x00000371
DEV_EVENT_DIALRECOGNITION_INFO)
Electric defect detection
EVENT_IVS_ELECTRICFAULT_DETECT 0x00000372 alarm(Corresponding to
DEV_EVENT_ELECTRICFAULTDETECT_INFO)
Detection event of uncovered trash
EVENT_IVS_TRASH_WITHOUT_COVER_DET can(Corresponding to
0x00000373
ECTION DEV_EVENT_TRASH_WITHOUT_COVER_DET
ECTION_INFO)
PARKING BACKING Event (Corresponding to
DEV_EVENT_TRAFFIC_PARKING_BACKING_I
EVENT_IVS_TRAFFIC_PARKING_BACKING 0x0000037C
NFO)#define
EVENT_IVS_VALVE_ABNORMAL0x0000037D
Bare soil detection
EVENT_IVS_BARELAND_DETECTION 0x00000380 event(DEV_EVENT_BARELAND_DETECTION
_INFO)
Consumption event (Corresponding
EVENT_IVS_CONSUMPTION_EVENT 0x00000381 to
DEV_EVENT_CONSUMPTION_EVENT_INFO)
XRAY Unpacking Check(corresponding
EVENT_IVS_XRAY_UNPACKING_CHECK 0x00000384 toDEV_EVENT_XRAY_UNPACKING_CHECK_I
NFO)
Traffic Change Lane Continues
EVENT_IVS_TRAFFIC_CHANGE_LANE_CON Event(corresponding to
0x00000387
TINUES DEV_EVENT_TRAFFIC_CHANGE_LANE_CON
TINUES_INFO)
Geneal Attitude Event(Corresponding to
EVENT_IVS_GENEAL_ATTITUDE 0x0000038C
DEV_EVENT_GENEAL_ATTITUDE_INFO)
Fishing Detection Event(corresponding to
EVENT_IVS_FISHING_DETECTION 0x00000390
DEV_EVENT_FISHING_DETECTION_INFO )
Congestion detection event(Corresponding
to
EVENT_IVS_CROWD_LEVEL_DETECTION 0x00000395
DEV_EVENT_CROWD_LEVEL_DETECTION_I
NFO)
Road detection event(Corresponding to
EVENT_IVS_ROAD_CONDITIONS_DETECTI
0x0000039A DEV_EVENT_ROAD_CONDITIONS_DETECTI
ON
ON_INFO)
Open Intelligent Event(Corresponding to
EVENT_IVS_OPEN_INTELLI 0x0000039D
DEV_EVENT_OPEN_INTELLI_INFO)
Motorcycle straddle detection
EVENT_IVS_RIDING_MOTOR_CYCLE 0x00000401 event(Corresponding to
DEV_EVENT_RIDING_MOTOR_CYCLE_INFO)
Traffic Speed Drop Sharply
EVENT_IVS_TRAFFIC_SPEED_DROP_SHARP event(Corresponding to
0x00000404
LY DEV_EVENT_TRAFFIC_SPEED_DROP_SHARP
LY_INFO)
94
Right overtaking event(Corresponding to
EVENT_IVS_TRAFFIC_OVERTAKE_ONRIGHT 0x0000040A DEV_EVENT_TRAFFIC_OVERTAKE_ONRIGHT
_INFO)
Truck occupation event(Corresponding to
EVENT_IVS_TRAFFIC_TRUCK_OCCUPIED 0x0000040B DEV_EVENT_TRAFFIC_TRUCK_OCCUPIED_I
NFO)
Drip detection event(Corresponding to
EVENT_IVS_DROP_DETECTION 0x00000429
NET_DEV_EVENT_DROP_DETECTION_INFO)
Temperature Alarm(Corresponding to
EVENT_IVS_TEMPERATURE_ALARM 0x0000042A NET_DEV_EVENT_TEMPERATURE_ALARM_I
NFO)
Humidity Alarm(Corresponding to
EVENT_IVS_HUMIDITY_ALARM 0x0000042B
NET_DEV_EVENT_HUMIDITY_ALARM_INFO)
Illegal Carriage event(Corresponding to
EVENT_IVS_ILLEGAL_CARRIAGE 0x0000042F NET_DEV_EVENT_ILLEGAL_CARRIAGE_INFO
)
Financial remote approval
event(Corresponding to
EVENT_IVS_REMOTE_APPROVAL_ALARM 0x00000438
NET_DEV_EVENT_REMOTE_APPROVAL_ALA
RM_INFO)
Anti-counterfeiting detection
event(Corresponding to
EVENT_IVS_ANTI_COUNTERFEIT 0x00000439
NET_DEV_EVENT_ANTI_COUNTERFEIT_INF
O)
User information reporting
event(corresponding to
EVENT_IVS_USERMANAGER_FOR_TWSDK 0x00000441
NET_DEV_EVENT_USERMANAGER_FOR_TW
SDK_INFO)
Snap with position(corresponding to
EVENT_IVS_POSITION_SNAP 0x00000447
NET_DEV_EVENT_POSITION_SNAP_INFO)
Cigarette case detection
event(corresponding to
EVENT_IVS_CIGARETTE_CASE_DETECTION 0x00000450
NET_DEV_EVENT_CIGARETTE_CASE_DETEC
TION_INFO)
Traffic Acceleration Rapid
EVENT_IVS_TRAFFIC_ACCELERATION_RAPI Event(corresponding to
0x00000457
D NET_DEV_EVENT_TRAFFIC_ACCELERATION
_RAPID_INFO)
Traffic Turn Sharp Event(corresponding to
EVENT_IVS_TRAFFIC_TURN_SHARP 0x00000458 NET_DEV_EVENT_TRAFFIC_TURN_SHARP_I
NFO)
Garbage Plasticbag Event(corresponding to
EVENT_IVS_GARBAGE_PLASTICBAG 0x00000459 NET_DEV_EVENT_GARBAGE_PLASTICBAG_I
NFO)
Collision Conflict Event(corresponding to
EVENT_IVS_COLLISION_CONFLICT 0x0000045B
NET_DEV_EVENT_COLLISION_CONFLICT_IN
95
FO)
96