Statistics integration WEB-based applications Springboot Kang SDK, developers traffic

       Kang used in Java WEB project traffic statistics camera, need docking camera, to take the number of passenger flow statistics. Kang Official Demo only provides a simple example, JavaDemo missing more, here summed up the docking process for your reference.

First, the development environment

       IDEA, Springboot framework, JDK1.8.0, Tomcat, Kang SDK, Hikvision cameras iDS-2CD6810.

        Hikvision Hikvision SDK can go to the official website to download: https://www.hikvision.com/cn/download_61.html

        I developed a cross-platform application, so the downloaded versions of Win64 and Linux64 version.

Second, Haikang SDK integration

       1) Kang SDK DLL file, and the structure of the interface class HCNetSDK.java bright green and two JAR package example.jar, jna.jar, works to be placed. File in the project root directory create a DLL library to store files and folders stored hiklib JAR package folder lib.

 

2) Dynamic Kang SDK library files, in order to call the SDK library file interfaces:

windows the following way library files to load, and com.sun.jna.win32.StdCallLibrary com.sun.jna.win32.StdCall attention to the need to import two packages:

 

Linux load the library file under way, attention to the need to import com.sun.jna.Callback and com.sun.jna.Library two packages:

3) above the SDK INSTANCE this example, loaded into the subsequent Kang SDK can be invoked by the interface instance.

4) implementation class for the new traffic, implement the functions: initialization SDK / cleaning device registration / deregistration, laying equipment / disarm, packaged as such provides a method call to an upper, shield SDK operational details, the upper layer provides an easy method of .

Third, the packaged WAR package

      Because it is WEB application, the need to reach into the WAR is running on the server.

1)在pom.xml文件中添加依赖,否则在打包会找不到依赖的JAR包和DLL文件。 

2)执行package打包,打包成功的话会生成tourism-0.0.1-SNAPSHOT.war这个war包。

3)将WAR包部署到服务器上运行即可。

4)注意需要将SDK库文件、example.jar和jna.jar文件放到服务器目录下,否则会找不到这些依赖库。

四、WEB页面实时刷新客流统计结果

五、更多问题沟通,请加qq:1609091580。

 

 

 

 

 

 

发布了8 篇原创文章 · 获赞 1 · 访问量 3285

Guess you like

Origin blog.csdn.net/hengju/article/details/103981583