Parcourir la source

大华SDK测试

yingp il y a 7 ans
commit
726b8c35e8
49 fichiers modifiés avec 3333 ajouts et 0 suppressions
  1. 44 0
      .gitignore
  2. 18 0
      pom.xml
  3. 19 0
      src/main/java/com/usoftchina/ss/dahua/lib/CertificateType.java
  4. 614 0
      src/main/java/com/usoftchina/ss/dahua/lib/DeviceStateType.java
  5. 259 0
      src/main/java/com/usoftchina/ss/dahua/lib/DeviceType.java
  6. 1034 0
      src/main/java/com/usoftchina/ss/dahua/lib/ErrorCode.java
  7. 31 0
      src/main/java/com/usoftchina/ss/dahua/lib/FaceAreaType.java
  8. 23 0
      src/main/java/com/usoftchina/ss/dahua/lib/FaceCompareMode.java
  9. 29 0
      src/main/java/com/usoftchina/ss/dahua/lib/FaceDbType.java
  10. 23 0
      src/main/java/com/usoftchina/ss/dahua/lib/FaceRecognitionFaceType.java
  11. 138 0
      src/main/java/com/usoftchina/ss/dahua/lib/INetSdk.java
  12. 33 0
      src/main/java/com/usoftchina/ss/dahua/lib/LLong.java
  13. 86 0
      src/main/java/com/usoftchina/ss/dahua/lib/LoginSpecCapType.java
  14. 894 0
      src/main/java/com/usoftchina/ss/dahua/lib/NetSdkLib.java
  15. 45 0
      src/main/java/com/usoftchina/ss/dahua/lib/OperateType.java
  16. 19 0
      src/main/java/com/usoftchina/ss/dahua/lib/PersonType.java
  17. 1 0
      src/main/java/com/usoftchina/ss/dahua/package-info.java
  18. BIN
      src/main/resources/H264Parser.dll
  19. BIN
      src/main/resources/HWDec.dll
  20. BIN
      src/main/resources/HevcParser.dll
  21. BIN
      src/main/resources/Infra.dll
  22. BIN
      src/main/resources/IvsDrawer.dll
  23. BIN
      src/main/resources/Json.dll
  24. BIN
      src/main/resources/NetFramework.dll
  25. BIN
      src/main/resources/Stream.dll
  26. BIN
      src/main/resources/StreamSvr.dll
  27. BIN
      src/main/resources/aacdec.dll
  28. BIN
      src/main/resources/adpcmdec.dll
  29. BIN
      src/main/resources/amrdec.dll
  30. BIN
      src/main/resources/avnetsdk.dll
  31. BIN
      src/main/resources/dhconfigsdk.dll
  32. BIN
      src/main/resources/dhconfigsdk.lib
  33. BIN
      src/main/resources/dhnetsdk.dll
  34. BIN
      src/main/resources/dhnetsdk.lib
  35. BIN
      src/main/resources/dhplay.dll
  36. BIN
      src/main/resources/fisheye.dll
  37. BIN
      src/main/resources/g7221dec.dll
  38. BIN
      src/main/resources/g729dec.dll
  39. BIN
      src/main/resources/h264dec.dll
  40. BIN
      src/main/resources/h26ldec.dll
  41. BIN
      src/main/resources/hevcdec.dll
  42. BIN
      src/main/resources/mjpegdec.dll
  43. BIN
      src/main/resources/mp2dec.dll
  44. BIN
      src/main/resources/mp3dec.dll
  45. BIN
      src/main/resources/mpeg4dec.dll
  46. BIN
      src/main/resources/postproc.dll
  47. BIN
      src/main/resources/svac_dec.dll
  48. BIN
      src/main/resources/swscale.dll
  49. 23 0
      src/test/java/com/usoftchina/ss/dahua/Main.java

+ 44 - 0
.gitignore

@@ -0,0 +1,44 @@
+#idea
+.idea
+*.iml
+#maven
+target
+#gradle
+.gradle
+/build/
+
+# Created by .ignore support plugin (hsz.mobi)
+### Gradle template
+.gradle
+/build/
+
+# Ignore Gradle GUI config
+gradle-app.setting
+
+# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
+!gradle-wrapper.jar
+
+# Cache of project
+.gradletasknamecache
+
+# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
+# gradle/wrapper/gradle-wrapper.properties
+### Java template
+*.class
+
+# Log file
+*.log
+
+# BlueJ files
+*.ctxt
+
+# Mobile Tools for Java (J2ME)
+.mtj.tmp/
+
+# Package Files #
+*.jar
+*.war
+*.ear
+*.zip
+*.tar.gz
+*.rar

+ 18 - 0
pom.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <groupId>com.usoftchina.ss</groupId>
+    <artifactId>ss-dahua-api</artifactId>
+    <version>1.0-SNAPSHOT</version>
+
+    <dependencies>
+        <dependency>
+            <groupId>net.java.dev.jna</groupId>
+            <artifactId>jna</artifactId>
+            <version>5.2.0</version>
+        </dependency>
+    </dependencies>
+</project>

+ 19 - 0
src/main/java/com/usoftchina/ss/dahua/lib/CertificateType.java

@@ -0,0 +1,19 @@
+package com.usoftchina.ss.dahua.lib;
+
+/**
+ * 证件类型
+ *
+ * @author yingp
+ * @date 2019/2/15
+ */
+public class CertificateType {
+    public static final int CERTIFICATE_TYPE_UNKNOWN = 0;
+    /**
+     * 身份证
+     */
+    public static final int CERTIFICATE_TYPE_IC = 1;
+    /**
+     * 护照
+     */
+    public static final int CERTIFICATE_TYPE_PASSPORT = 2;
+}

+ 614 - 0
src/main/java/com/usoftchina/ss/dahua/lib/DeviceStateType.java

@@ -0,0 +1,614 @@
+package com.usoftchina.ss.dahua.lib;
+
+/**
+ * 查询信息类型,对应CLIENT_QueryDevState接口
+ *
+ * @author yingp
+ * @date 2019/2/15
+ */
+public class DeviceStateType {
+    /**
+     * 普通报警状态(包括外部报警,动态检测,视频丢失)
+     */
+    public static final int DH_DEVSTATE_COMM_ALARM = 0x0001;
+    /**
+     * 遮挡报警状态
+     */
+    public static final int DH_DEVSTATE_SHELTER_ALARM = 0x0002;
+    /**
+     * 录像状态
+     */
+    public static final int DH_DEVSTATE_RECORDING = 0x0003;
+    /**
+     * 硬盘状态
+     */
+    public static final int DH_DEVSTATE_DISK = 0x0004;
+    /**
+     * 查询系统资源状态
+     * <p>3个DWORD,第一个dword 0 表示小于CPU超过50% 1 表示大于50%,第二个表示TV,第三个表示VGA</p>
+     */
+    public static final int DH_DEVSTATE_RESOURCE = 0x0005;
+    /**
+     * 查询通道码流
+     */
+    public static final int DH_DEVSTATE_BITRATE = 0x0006;
+    /**
+     * 查询设备连接状态
+     *
+     * @deprecated
+     */
+    public static final int DH_DEVSTATE_CONN = 0x0007;
+    /**
+     * 网络协议版本号
+     */
+    public static final int DH_DEVSTATE_PROTOCAL_VER = 0x0008;
+    /**
+     * 查询设备支持的语音对讲格式
+     * <p>NETDEV_TALKFORMAT_LIST</p>
+     */
+    public static final int DH_DEVSTATE_TALK_ECTYPE = 0x0009;
+    /**
+     * 查询sd卡信息
+     */
+    public static final int DH_DEVSTATE_SD_CARD = 0x000A;
+    /**
+     * 查询刻录机信息
+     */
+    public static final int DH_DEVSTATE_BURNING_DEV = 0x000B;
+    /**
+     * 查询刻录进度
+     */
+    public static final int DH_DEVSTATE_BURNING_PROGRESS = 0x000C;
+    /**
+     * 查询设备支持的接入平台
+     */
+    public static final int DH_DEVSTATE_PLATFORM = 0x000D;
+    /**
+     * 查询摄像头属性信息
+     */
+    public static final int DH_DEVSTATE_CAMERA = 0x000E;
+    /**
+     * 设备软件信息
+     * <p>DHDEV_VERSION_INFO</p>
+     */
+    public static final int DH_DEVSTATE_SOFTWARE = 0x000F;
+    /**
+     * 设备语言支持信息
+     * <p>DH_DEV_LANGUAGE_INFO</p>
+     */
+    public static final int DH_DEVSTATE_LANGUAGE = 0x0010;
+    /**
+     * 查询dsp能力描述
+     * <p>DHDEV_DSP_ENCODECAP</p>
+     */
+    public static final int DH_DEVSTATE_DSP = 0x0011;
+    /**
+     * 查询oem信息
+     * <p>DHDEV_OEM_INFO</p>
+     */
+    public static final int DH_DEVSTATE_OEM = 0x0012;
+    /**
+     * 查询网络运行状态信息
+     * <p>DHDEV_TOTAL_NET_STATE</p>
+     */
+    public static final int DH_DEVSTATE_NET = 0x0013;
+    /**
+     * 查询设备类型
+     */
+    public static final int DH_DEVSTATE_TYPE = 0x0014;
+    /**
+     * 查询抓图功能属性(IPC类产品)
+     * <p>DH_SNAP_ATTR_EN</p>
+     */
+    public static final int DH_DEVSTATE_SNAP = 0x0015;
+    /**
+     * 查询最早录像时间和最近录像时间
+     * <p>DEV_DISK_RECORD_INFO</p>
+     */
+    public static final int DH_DEVSTATE_RECORD_TIME = 0x0016;
+    /**
+     * 查询无线网络信号强度
+     * <p>DHDEV_WIRELESS_RSS_INFO</p>
+     */
+    public static final int DH_DEVSTATE_NET_RSSI = 0x0017;
+    /**
+     * 查询附件刻录选项
+     */
+    public static final int DH_DEVSTATE_BURNING_ATTACH = 0x0018;
+    /**
+     * 查询备份设备列表
+     * <p>DHDEV_BACKUP_LIST</p>
+     */
+    public static final int DH_DEVSTATE_BACKUP_DEV = 0x0019;
+    /**
+     * 查询备份设备详细信息
+     * <p>DHDEV_BACKUP_INFO</p>
+     */
+    public static final int DH_DEVSTATE_BACKUP_DEV_INFO = 0x001a;
+    /**
+     * 备份进度反馈
+     * <p>DHDEV_BACKUP_FEEDBACK</p>
+     */
+    public static final int DH_DEVSTATE_BACKUP_FEEDBACK = 0x001b;
+    /**
+     * 查询ATM交易类型
+     * <p>DH_ATM_QUERY_TRADE</p>
+     */
+    public static final int DH_DEVSTATE_ATM_QUERY_TRADE = 0x001c;
+    /**
+     * 查询sip状态
+     * <p>DHDEV_SIP_STATE</p>
+     */
+    public static final int DH_DEVSTATE_SIP = 0x001d;
+    /**
+     * 查询车载wifi状态
+     * <p>DHDEV_VEHICLE_WIFI_STATE</p>
+     */
+    public static final int DH_DEVSTATE_VICHILE_STATE = 0x001e;
+    /**
+     * 查询邮件配置是否成功
+     * <p>DHDEV_FUNC_TEST</p>
+     */
+    public static final int DH_DEVSTATE_TEST_EMAIL = 0x001f;
+    /**
+     * 查询硬盘smart信息
+     * <p>DHDEV_SMART_HARDDISK</p>
+     */
+    public static final int DH_DEVSTATE_SMART_HARD_DISK = 0x0020;
+    /**
+     * 查询抓图设置是否成功
+     * <p>DHDEV_FUNC_TEST</p>
+     */
+    public static final int DH_DEVSTATE_TEST_SNAPPICTURE = 0x0021;
+    /**
+     * 查询静态报警状态
+     * <p>DWORD,每一位表示一个报警通道</p>
+     */
+    public static final int DH_DEVSTATE_STATIC_ALARM = 0x0022;
+    /**
+     * 查询设备子模块信息
+     * <p>DHDEV_SUBMODULE_INFO</p>
+     */
+    public static final int DH_DEVSTATE_SUBMODULE_INFO = 0x0023;
+    /**
+     * 查询硬盘坏道能力
+     * <p>DHDEV_DISKDAMAGE_INFO</p>
+     */
+    public static final int DH_DEVSTATE_DISKDAMAGE = 0x0024;
+    /**
+     * 查询设备支持的IPC能力
+     * <p>DH_DEV_IPC_INFO</p>
+     */
+    public static final int DH_DEVSTATE_IPC = 0x0025;
+    /**
+     * 查询报警布撤防状态
+     * <p>ALARM_ARM_DISARM_STATE_INFO</p>
+     */
+    public static final int DH_DEVSTATE_ALARM_ARM_DISARM = 0x0026;
+    /**
+     * 查询ACC断电报警状态
+     * <p>返回一个DWORD, 1表示断电,0表示通电</p>
+     */
+    public static final int DH_DEVSTATE_ACC_POWEROFF_ALARM = 0x0027;
+    /**
+     * 测试FTP服务器连接
+     * <p>DHDEV_FTP_SERVER_TEST</p>
+     */
+    public static final int DH_DEVSTATE_TEST_FTP_SERVER = 0x0028;
+    /**
+     * 查询3G流量超出阈值状态
+     * <p>DHDEV_3GFLOW_EXCEED_STATE_INFO</p>
+     */
+    public static final int DH_DEVSTATE_3GFLOW_EXCEED = 0x0029;
+    /**
+     * 查询3G网络流量信息
+     * <p>DH_DEV_3GFLOW_INFO</p>
+     */
+    public static final int DH_DEVSTATE_3GFLOW_INFO = 0x002a;
+    /**
+     * 车载自定义信息上传
+     * <p>ALARM_VEHICLE_INFO_UPLOAD</p>
+     */
+    public static final int DH_DEVSTATE_VIHICLE_INFO_UPLOAD = 0x002b;
+    /**
+     * 查询限速报警状态
+     * <p>ALARM_SPEED_LIMIT</p>
+     */
+    public static final int DH_DEVSTATE_SPEED_LIMIT = 0x002c;
+    /**
+     * 查询DSP扩展能力描述
+     * <p>DHDEV_DSP_ENCODECAP_EX</p>
+     */
+    public static final int DH_DEVSTATE_DSP_EX = 0x002d;
+    /**
+     * 查询3G模块信息
+     * <p>DH_DEV_3GMODULE_INFO</p>
+     */
+    public static final int DH_DEVSTATE_3GMODULE_INFO = 0x002e;
+    /**
+     * 查询多DDNS状态信息
+     * <p>DH_DEV_MULTI_DDNS_INFO</p>
+     */
+    public static final int DH_DEVSTATE_MULTI_DDNS = 0x002f;
+    /**
+     * 查询设备配置URL信息
+     * <p>DH_DEV_URL_INFO</p>
+     */
+    public static final int DH_DEVSTATE_CONFIG_URL = 0x0030;
+    /**
+     * 查询HardKey
+     * <p>DHDEV_HARDKEY_STATE</p>
+     */
+    public static final int DH_DEVSTATE_HARDKEY = 0x0031;
+    /**
+     * 查询ISCSI路径列表
+     * <p>DHDEV_ISCSI_PATHLIST</p>
+     */
+    public static final int DH_DEVSTATE_ISCSI_PATH = 0x0032;
+    /**
+     * 查询设备本地预览支持的分割模式
+     * <p>DEVICE_LOCALPREVIEW_SLIPT_CAP</p>
+     */
+    public static final int DH_DEVSTATE_DLPREVIEW_SLIPT_CAP = 0x0033;
+    /**
+     * 查询无线路由能力信息
+     * <p>DHDEV_WIFI_ROUTE_CAP</p>
+     */
+    public static final int DH_DEVSTATE_WIFI_ROUTE_CAP = 0x0034;
+    /**
+     * 查询设备的在线状态
+     * <p>返回一个DWORD, 1表示在线, 0表示断线</p>
+     */
+    public static final int DH_DEVSTATE_ONLINE = 0x0035;
+    /**
+     * 查询云台状态信息
+     * <p>DH_PTZ_LOCATION_INFO</p>
+     */
+    public static final int DH_DEVSTATE_PTZ_LOCATION = 0x0036;
+    /**
+     * 画面监控辅助信息
+     * <p>DHDEV_MONITOR_INFO</p>
+     */
+    public static final int DH_DEVSTATE_MONITOR_INFO = 0x0037;
+    /**
+     * 查询子设备
+     * <p>CFG_DEVICESTATUS_INFO</p>
+     */
+    public static final int DH_DEVSTATE_SUBDEVICE = 0x0300;
+    /**
+     * 查询RAID状态
+     * <p>ALARM_RAID_INFO</p>
+     */
+    public static final int DH_DEVSTATE_RAID_INFO = 0x0038;
+    /**
+     * 测试DDNS域名是否可用
+     */
+    public static final int DH_DEVSTATE_TEST_DDNSDOMAIN = 0x0039;
+    /**
+     * 查询虚拟摄像头状态
+     * <p>DHDEV_VIRTUALCAMERA_STATE_INFO</p>
+     */
+    public static final int DH_DEVSTATE_VIRTUALCAMERA = 0x003a;
+    /**
+     * 获取设备工作视频/线圈模式状态等
+     * <p>DHDEV_TRAFFICWORKSTATE_INFO</p>
+     */
+    public static final int DH_DEVSTATE_TRAFFICWORKSTATE = 0x003b;
+    /**
+     * 获取摄像机移位报警事件状态
+     * <p>ALARM_CAMERA_MOVE_INFO</p>
+     */
+    public static final int DH_DEVSTATE_ALARM_CAMERA_MOVE = 0x003c;
+    /**
+     * 获取外部报警状态
+     * <p>NET_CLIENT_ALARM_STATE</p>
+     */
+    public static final int DH_DEVSTATE_ALARM = 0x003e;
+    /**
+     * 获取视频丢失报警状态
+     * <p>NET_CLIENT_VIDEOLOST_STATE</p>
+     */
+    public static final int DH_DEVSTATE_VIDEOLOST = 0x003f;
+    /**
+     * 获取动态监测报警状态
+     * <p>NET_CLIENT_MOTIONDETECT_STATE</p>
+     */
+    public static final int DH_DEVSTATE_MOTIONDETECT = 0x0040;
+    /**
+     * 获取详细的动态监测报警状态
+     * <p>NET_CLIENT_DETAILEDMOTION_STATE</p>
+     */
+    public static final int DH_DEVSTATE_DETAILEDMOTION = 0x0041;
+    /**
+     * 获取车载自身各种硬件信息
+     * <p>DHDEV_VEHICLE_INFO</p>
+     */
+    public static final int DH_DEVSTATE_VEHICLE_INFO = 0x0042;
+    /**
+     * 获取视频遮挡报警状态
+     * <p>NET_CLIENT_VIDEOBLIND_STATE</p>
+     */
+    public static final int DH_DEVSTATE_VIDEOBLIND = 0x0043;
+    /**
+     * 查询3G模块相关信息
+     * <p>DHDEV_VEHICLE_3GMODULE</p>
+     */
+    public static final int DH_DEVSTATE_3GSTATE_INFO = 0x0044;
+    /**
+     * 查询网络接口信息
+     * <p>DHDEV_NETINTERFACE_INFO</p>
+     */
+    public static final int DH_DEVSTATE_NETINTERFACE = 0x0045;
+    /**
+     * 查询画中画通道号
+     * <p>DWORD数组</p>
+     */
+    public static final int DH_DEVSTATE_PICINPIC_CHN = 0x0046;
+    /**
+     * 查询融合屏通道信息
+     * <p>DH_COMPOSITE_CHANNEL数组</p>
+     */
+    public static final int DH_DEVSTATE_COMPOSITE_CHN = 0x0047;
+    /**
+     * 查询设备整体录像状态(只要有一个通道在录像,即为设备整体状态为录像)
+     */
+    public static final int DH_DEVSTATE_WHOLE_RECORDING = 0x0048;
+    /**
+     * 查询设备整体编码状态(只要有一个通道在编码,即为设备整体状态为编码)
+     */
+    public static final int DH_DEVSTATE_WHOLE_ENCODING = 0x0049;
+    /**
+     * 查询设备硬盘录像时间信息
+     * <p>DEV_DISK_RECORD_TIME数组</p>
+     */
+    public static final int DH_DEVSTATE_DISK_RECORDE_TIME = 0x004a;
+    /**
+     * 是否已弹出刻录机光驱
+     * <p>DH_DEVSTATE_BURNERDOOR</p>
+     */
+    public static final int DH_DEVSTATE_BURNER_DOOR = 0x004b;
+    /**
+     * 查询光盘数据校验进度
+     * <p>DH_DEVSTATE_DATA_CHECK</p>
+     */
+    public static final int DH_DEVSTATE_GET_DATA_CHECK = 0x004c;
+    /**
+     * 查询报警输入通道信息
+     * <p>NET_ALARM_IN_CHANNEL数组</p>
+     */
+    public static final int DH_DEVSTATE_ALARM_IN_CHANNEL = 0x004f;
+    /**
+     * 查询报警通道数
+     * <p>NET_ALARM_CHANNEL_COUNT</p>
+     */
+    public static final int DH_DEVSTATE_ALARM_CHN_COUNT = 0x0050;
+    /**
+     * 查询云台可视域状态
+     * <p>DH_OUT_PTZ_VIEW_RANGE_STATUS</p>
+     */
+    public static final int DH_DEVSTATE_PTZ_VIEW_RANGE = 0x0051;
+    /**
+     * 查询设备通道信息
+     * <p>NET_DEV_CHN_COUNT_INFO</p>
+     */
+    public static final int DH_DEVSTATE_DEV_CHN_COUNT = 0x0052;
+    /**
+     * 查询设备支持的RTSP URL列表
+     * <p>NET_DEV_RTSPURL_LIST</p>
+     */
+    public static final int DH_DEVSTATE_RTSP_URL = 0x0053;
+    /**
+     * 查询设备登录的在线超时时间
+     * <p>返回一个BTYE(单位:分钟), 0表示不限制, 非零正整数表示限制的分钟数</p>
+     */
+    public static final int DH_DEVSTATE_LIMIT_LOGIN_TIME = 0x0054;
+    /**
+     * 获取串口数
+     * <p>NET_GET_COMM_COUNT</p>
+     */
+    public static final int DH_DEVSTATE_GET_COMM_COUNT = 0x0055;
+    /**
+     * 查询录像状态详细信息
+     * <p>NET_RECORD_STATE_DETAIL</p>
+     */
+    public static final int DH_DEVSTATE_RECORDING_DETAIL = 0x0056;
+    /**
+     * 获取当前云台的预置点列表
+     * <p>NET_PTZ_PRESET_LIST</p>
+     */
+    public static final int DH_DEVSTATE_PTZ_PRESET_LIST = 0x0057;
+    /**
+     * 外接设备信息
+     * <p>NET_EXTERNAL_DEVICE</p>
+     */
+    public static final int DH_DEVSTATE_EXTERNAL_DEVICE = 0x0058;
+    /**
+     * 获取设备升级状态
+     * <p>DHDEV_UPGRADE_STATE_INFO</p>
+     */
+    public static final int DH_DEVSTATE_GET_UPGRADE_STATE = 0x0059;
+    /**
+     * 获取多通道预览分割能力
+     * <p>NET_MULTIPLAYBACK_SPLIT_CAP</p>
+     */
+    public static final int DH_DEVSTATE_MULTIPLAYBACK_SPLIT_CAP = 0x005a;
+    /**
+     * 获取刻录会话总数
+     */
+    public static final int DH_DEVSTATE_BURN_SESSION_NUM = 0x005b;
+    /**
+     * 查询防护舱状态
+     * <p>ALARM_PROTECTIVE_CAPSULE_INFO</p>
+     */
+    public static final int DH_DEVSTATE_PROTECTIVE_CAPSULE = 0X005c;
+    /**
+     * 查询电源状态
+     * <p>DH_POWER_STATUS</p>
+     */
+    public static final int DH_DEVSTATE_POWER_STATE = 0x0152;
+    /**
+     * 查询报警通道状态
+     * <p>NET_CLIENT_ALARM_CHANNELS_STATE</p>
+     */
+    public static final int DH_DEVSTATE_ALL_ALARM_CHANNELS_STATE = 0x153;
+    /**
+     * 查询串口上连接的报警键盘数
+     * <p>NET_ALARMKEYBOARD_COUNT</p>
+     */
+    public static final int DH_DEVSTATE_ALARMKEYBOARD_COUNT = 0x0154;
+    /**
+     * 查询扩展报警模块通道映射关系
+     * <p>NET_EXALARMCHANNELS</p>
+     */
+    public static final int DH_DEVSTATE_EXALARMCHANNELS = 0x0155;
+    /**
+     * 查询通道旁路状态
+     * <p>DH_DEVSTATE_GET_BYPASS</p>
+     */
+    public static final int DH_DEVSTATE_GET_BYPASS = 0x0156;
+    /**
+     * 获取激活的防区信息
+     * <p>NET_ACTIVATEDDEFENCEAREA</p>
+     */
+    public static final int DH_DEVSTATE_ACTIVATEDDEFENCEAREA = 0x0157;
+    /**
+     * 查询设备记录集信息
+     * <p>NET_CTRL_RECORDSET_PARAM</p>
+     */
+    public static final int DH_DEVSTATE_DEV_RECORDSET = 0x0158;
+    /**
+     * 查询门禁状态
+     * <p>NET_DOOR_STATUS_INFO</p>
+     */
+    public static final int DH_DEVSTATE_DOOR_STATE = 0x0159;
+    /**
+     * 模拟量报警输入通道映射关系
+     * <p>NET_ANALOGALARM_CHANNELS</p>
+     */
+    public static final int DH_DEVSTATE_ANALOGALARM_CHANNELS = 0x1560;
+    /**
+     * 获取设备支持的传感器列表
+     * <p>NET_SENSOR_LIST</p>
+     */
+    public static final int DH_DEVSTATE_GET_SENSORLIST = 0x1561;
+    /**
+     * 查询开关量报警模块通道映射关系
+     * <p>NET_ALARM_CHANNELS</p>
+     */
+    public static final int DH_DEVSTATE_ALARM_CHANNELS = 0x1562;
+    /**
+     * 获取当前子系统启用状态
+     * <p>NET_GET_ALARM_SUBSYSTEM_ACTIVATE_STATUES</p>
+     */
+    public static final int DH_DEVSTATE_GET_ALARM_SUBSYSTEM_ACTIVATESTATUS = 0x1563;
+    /**
+     * 获取所有用户可用Pos设备配置信息
+     * <p>NET_POS_ALL_INFO</p>
+     */
+    public static final int DH_DEVSTATE_GET_ALL_POS = 0x1575;
+    /**
+     * 获取集群状态
+     * <p>NET_CLUSTER_STATE_INFO</p>
+     */
+    public static final int DH_DEVSTATE_CLUSTER_STATE = 0x1568;
+    /**
+     * 获取当前主机所接入的外部设备ID
+     * <p>NET_SCADA_DEVICE_LIST</p>
+     */
+    public static final int DH_DEVSTATE_SCADA_DEVICE_LIST = 0x1571;
+    /**
+     * 获取热度统计信息
+     * <p>NET_QUERY_HEAT_MAP</p>
+     */
+    public static final int DH_DEVSTATE_GET_HEAT_MAP = 0x1577;
+    /**
+     * 获取空调工作状态
+     * <p>NET_GET_AIRCONDITION_STATE</p>
+     */
+    public static final int DH_DEVSTATE_AIRCONDITION_STATE = 0x1564;
+    /**
+     * 获取子系统状态
+     * <p>NET_ALARM_SUBSYSTEM_STATE</p>
+     */
+    public static final int DH_DEVSTATE_ALARMSUBSYSTEM_STATE = 0x1565;
+    /**
+     * 获取故障状态
+     * <p>NET_ALARM_FAULT_STATE_INFO</p>
+     */
+    public static final int DH_DEVSTATE_ALARM_FAULT_STATE = 0x1566;
+    /**
+     * 获取防区状态
+     * <p>NET_DEFENCE_STATE_INFO</p>
+     */
+    public static final int DH_DEVSTATE_DEFENCE_STATE = 0x1567;
+    /**
+     * 获取点位表路径信息
+     * <p>NET_SCADA_POINT_LIST_INFO</p>
+     */
+    public static final int DH_DEVSTATE_SCADA_POINT_LIST = 0x1569;
+    /**
+     * 获取监测点位信息
+     * <p>NET_SCADA_INFO</p>
+     */
+    public static final int DH_DEVSTATE_SCADA_INFO = 0x156a;
+    /**
+     * 获取SCADA能力集
+     * <p>NET_SCADA_CAPS</p>
+     */
+    public static final int DH_DEVSTATE_SCADA_CAPS = 0X156b;
+    /**
+     * 获取对码成功的总条数
+     * <p>NET_GET_CODEID_COUNT</p>
+     */
+    public static final int DH_DEVSTATE_GET_CODEID_COUNT = 0x156c;
+    /**
+     * 查询对码信息
+     * <p>NET_GET_CODEID_LIST</p>
+     */
+    public static final int DH_DEVSTATE_GET_CODEID_LIST = 0x156d;
+    /**
+     * 查询模拟量通道数据
+     * <p>NET_GET_ANALOGALARM_DATA</p>
+     */
+    public static final int DH_DEVSTATE_ANALOGALARM_DATA = 0x156e;
+    /**
+     * 获取视频电话呼叫状态
+     * <p>NET_GET_VTP_CALLSTATE</p>
+     */
+    public static final int DH_DEVSTATE_VTP_CALLSTATE = 0x156f;
+    /**
+     * 通过设备、获取监测点位信息
+     * <p>NET_SCADA_INFO_BY_ID</p>
+     */
+    public static final int DH_DEVSTATE_SCADA_INFO_BY_ID = 0x1570;
+    /**
+     * 查询设备记录集信息
+     * <p>NET_CTRL_RECORDSET_PARAM</p>
+     */
+    public static final int DH_DEVSTATE_DEV_RECORDSET_EX = 0x1572;
+    /**
+     * 获取门锁软件版本号
+     * <p>NET_ACCESS_LOCK_VER</p>
+     */
+    public static final int DH_DEVSTATE_ACCESS_LOCK_VER = 0x1573;
+    /**
+     * 获取电视墙显示信息
+     * <p>NET_CTRL_MONITORWALL_TVINFO</p>
+     */
+    public static final int DH_DEVSTATE_MONITORWALL_TVINFO = 0x1574;
+    /**
+     * 获取盒子工作状态信息
+     * <p>NET_QUERY_WORK_STATE</p>
+     */
+    public static final int DH_DEVSTATE_GET_WORK_STATE = 0x1578;
+    /**
+     * 获取无线设备状态信息
+     * <p>NET_GET_WIRELESS_DEVICE_STATE</p>
+     */
+    public static final int DH_DEVSTATE_GET_WIRESSLESS_STATE = 0x1579;
+    /**
+     * 获取冗余电源信息
+     * <p>NET_GET_REDUNDANCE_POWER_INFO</p>
+     */
+    public static final int DH_DEVSTATE_GET_REDUNDANCE_POWER_INFO = 0x157a;
+}

+ 259 - 0
src/main/java/com/usoftchina/ss/dahua/lib/DeviceType.java

@@ -0,0 +1,259 @@
+package com.usoftchina.ss.dahua.lib;
+
+/**
+ * 设备类型
+ *
+ * @author yingp
+ * @date 2019/2/15
+ */
+public class DeviceType {
+    public static final int NET_PRODUCT_NONE = 0;
+    /**
+     * 非实时MACE
+     */
+    public static final int NET_DVR_NONREALTIME_MACE = 1;
+    /**
+     * 非实时
+     */
+    public static final int NET_DVR_NONREALTIME = 2;
+    /**
+     * 网络视频服务器
+     */
+    public static final int NET_NVS_MPEG1 = 3;
+    /**
+     * MPEG1二路录像机
+     */
+    public static final int NET_DVR_MPEG1_2 = 4;
+    /**
+     * MPEG1八路录像机
+     */
+    public static final int NET_DVR_MPEG1_8 = 5;
+    /**
+     * MPEG4八路录像机
+     */
+    public static final int NET_DVR_MPEG4_8 = 6;
+    /**
+     * MPEG4十六路录像机
+     */
+    public static final int NET_DVR_MPEG4_16 = 7;
+    /**
+     * LB系列录像机
+     */
+    public static final int NET_DVR_MPEG4_SX2 = 8;
+    /**
+     * GB系列录像机
+     */
+    public static final int NET_DVR_MEPG4_ST2 = 9;
+    /**
+     * HB系列录像机
+     */
+    public static final int NET_DVR_MEPG4_SH2 = 10;
+    /**
+     * GBE系列录像机
+     */
+    public static final int NET_DVR_MPEG4_GBE = 11;
+    /**
+     * II代网络视频服务器
+     */
+    public static final int NET_DVR_MPEG4_NVSII = 12;
+    /**
+     * 新标准配置协议
+     */
+    public static final int NET_DVR_STD_NEW = 13;
+    /**
+     * DDNS服务器
+     */
+    public static final int NET_DVR_DDNS = 14;
+    /**
+     * ATM机
+     */
+    public static final int NET_DVR_ATM = 15;
+    /**
+     * 二代非实时NB系列机器
+     */
+    public static final int NET_NB_SERIAL = 16;
+    /**
+     * LN系列产品
+     */
+    public static final int NET_LN_SERIAL = 17;
+    /**
+     * BAV系列产品
+     */
+    public static final int NET_BAV_SERIAL = 18;
+    /**
+     * SDIP系列产品
+     */
+    public static final int NET_SDIP_SERIAL = 19;
+    /**
+     * IPC系列产品
+     */
+    public static final int NET_IPC_SERIAL = 20;
+    /**
+     * NVS B系列
+     */
+    public static final int NET_NVS_B = 21;
+    /**
+     * NVS H系列
+     */
+    public static final int NET_NVS_C = 22;
+    /**
+     * NVS S系列
+     */
+    public static final int NET_NVS_S = 23;
+    /**
+     * NVS E系列
+     */
+    public static final int NET_NVS_E = 24;
+    /**
+     * 从QueryDevState中查询设备类型,以字符串格式
+     */
+    public static final int NET_DVR_NEW_PROTOCOL = 25;
+    /**
+     * 解码器
+     */
+    public static final int NET_NVD_SERIAL = 26;
+    /**
+     * N5
+     */
+    public static final int NET_DVR_N5 = 27;
+    /**
+     * 混合DVR
+     */
+    public static final int NET_DVR_MIX_DVR = 28;
+    /**
+     * SVR系列
+     */
+    public static final int NET_SVR_SERIAL = 29;
+    /**
+     * SVR-BS
+     */
+    public static final int NET_SVR_BS = 30;
+    /**
+     * NVR系列
+     */
+    public static final int NET_NVR_SERIAL = 31;
+    /**
+     * N51
+     */
+    public static final int NET_DVR_N51 = 32;
+    /**
+     * ITSE 智能分析盒
+     */
+    public static final int NET_ITSE_SERIAL = 33;
+    /**
+     * 智能交通像机设备
+     */
+    public static final int NET_ITC_SERIAL = 34;
+    /**
+     * 雷达测速仪HWS
+     */
+    public static final int NET_HWS_SERIAL = 35;
+    /**
+     * 便携式音视频录像机
+     */
+    public static final int NET_PVR_SERIAL = 36;
+    /**
+     * IVS(智能视频服务器系列)
+     */
+    public static final int NET_IVS_SERIAL = 37;
+    /**
+     * 通用智能视频侦测服务器
+     */
+    public static final int NET_IVS_B = 38;
+    /**
+     * 人脸识别服务器
+     */
+    public static final int NET_IVS_F = 39;
+    /**
+     * 视频质量诊断服务器
+     */
+    public static final int NET_IVS_V = 40;
+    /**
+     * 矩阵
+     */
+    public static final int NET_MATRIX_SERIAL = 41;
+    /**
+     * N52
+     */
+    public static final int NET_DVR_N52 = 42;
+    /**
+     * N56
+     */
+    public static final int NET_DVR_N56 = 43;
+    /**
+     * ESS
+     */
+    public static final int NET_ESS_SERIAL = 44;
+    /**
+     * 人数统计服务器
+     */
+    public static final int NET_IVS_PC = 45;
+    /**
+     * pc-nvr
+     */
+    public static final int NET_PC_NVR = 46;
+    /**
+     * 大屏控制器
+     */
+    public static final int NET_DSCON = 47;
+    /**
+     * 网络视频存储服务器
+     */
+    public static final int NET_EVS = 48;
+    /**
+     * 嵌入式智能分析视频系统
+     */
+    public static final int NET_EIVS = 49;
+    /**
+     * DVR-N6
+     */
+    public static final int NET_DVR_N6 = 50;
+    /**
+     * 万能解码器
+     */
+    public static final int NET_UDS = 51;
+    /**
+     * 银行报警主机
+     */
+    public static final int NET_AF6016 = 52;
+    /**
+     * 视频网络报警主机
+     */
+    public static final int NET_AS5008 = 53;
+    /**
+     * 网络报警主机
+     */
+    public static final int NET_AH2008 = 54;
+    /**
+     * 报警主机系列
+     */
+    public static final int NET_A_SERIAL = 55;
+    /**
+     * 门禁系列产品
+     */
+    public static final int NET_BSC_SERIAL = 56;
+    /**
+     * NVS系列产品
+     */
+    public static final int NET_NVS_SERIAL = 57;
+    /**
+     * VTO系列产品
+     */
+    public static final int NET_VTO_SERIAL = 58;
+    /**
+     * VTNC系列产品
+     */
+    public static final int NET_VTNC_SERIAL = 59;
+    /**
+     * TPC系列产品, 即热成像设备
+     */
+    public static final int NET_TPC_SERIAL = 60;
+    /**
+     * 无线中继设备
+     */
+    public static final int NET_ASM_SERIAL = 61;
+    /**
+     * 管理机
+     */
+    public static final int NET_VTS_SERIAL = 62;
+}

+ 1034 - 0
src/main/java/com/usoftchina/ss/dahua/lib/ErrorCode.java

@@ -0,0 +1,1034 @@
+package com.usoftchina.ss.dahua.lib;
+
+/**
+ * 错误码
+ *
+ * @author yingp
+ * @date 2019/2/15
+ */
+public class ErrorCode {
+    /**
+     * 没有错误
+     */
+    public static final int NET_NOERROR = 0;
+    /**
+     * 未知错误
+     */
+    public static final int NET_ERROR = -1;
+    /**
+     * Windows系统出错
+     */
+    public static final int NET_SYSTEM_ERROR = (0x80000000 | 1);
+    /**
+     * 网络错误,可能是因为网络超时
+     */
+    public static final int NET_NETWORK_ERROR = (0x80000000 | 2);
+    /**
+     * 设备协议不匹配
+     */
+    public static final int NET_DEV_VER_NOMATCH = (0x80000000 | 3);
+    /**
+     * 句柄无效
+     */
+    public static final int NET_INVALID_HANDLE = (0x80000000 | 4);
+    /**
+     * 打开通道失败
+     */
+    public static final int NET_OPEN_CHANNEL_ERROR = (0x80000000 | 5);
+    /**
+     * 关闭通道失败
+     */
+    public static final int NET_CLOSE_CHANNEL_ERROR = (0x80000000 | 6);
+    /**
+     * 用户参数不合法
+     */
+    public static final int NET_ILLEGAL_PARAM = (0x80000000 | 7);
+    /**
+     * SDK初始化出错
+     */
+    public static final int NET_SDK_INIT_ERROR = (0x80000000 | 8);
+    /**
+     * SDK清理出错
+     */
+    public static final int NET_SDK_UNINIT_ERROR = (0x80000000 | 9);
+    /**
+     * 申请render资源出错
+     */
+    public static final int NET_RENDER_OPEN_ERROR = (0x80000000 | 10);
+    /**
+     * 打开解码库出错
+     */
+    public static final int NET_DEC_OPEN_ERROR = (0x80000000 | 11);
+    /**
+     * 关闭解码库出错
+     */
+    public static final int NET_DEC_CLOSE_ERROR = (0x80000000 | 12);
+    /**
+     * 多画面预览中检测到通道数为0
+     */
+    public static final int NET_MULTIPLAY_NOCHANNEL = (0x80000000 | 13);
+    /**
+     * 录音库初始化失败
+     */
+    public static final int NET_TALK_INIT_ERROR = (0x80000000 | 14);
+    /**
+     * 录音库未经初始化
+     */
+    public static final int NET_TALK_NOT_INIT = (0x80000000 | 15);
+    /**
+     * 发送音频数据出错
+     */
+    public static final int NET_TALK_SENDDATA_ERROR = (0x80000000 | 16);
+    /**
+     * 实时数据已经处于保存状态
+     */
+    public static final int NET_REAL_ALREADY_SAVING = (0x80000000 | 17);
+    /**
+     * 未保存实时数据
+     */
+    public static final int NET_NOT_SAVING = (0x80000000 | 18);
+    /**
+     * 打开文件出错
+     */
+    public static final int NET_OPEN_FILE_ERROR = (0x80000000 | 19);
+    /**
+     * 启动云台控制定时器失败
+     */
+    public static final int NET_PTZ_SET_TIMER_ERROR = (0x80000000 | 20);
+    /**
+     * 对返回数据的校验出错
+     */
+    public static final int NET_RETURN_DATA_ERROR = (0x80000000 | 21);
+    /**
+     * 没有足够的缓存
+     */
+    public static final int NET_INSUFFICIENT_BUFFER = (0x80000000 | 22);
+    /**
+     * 当前SDK未支持该功能
+     */
+    public static final int NET_NOT_SUPPORTED = (0x80000000 | 23);
+    /**
+     * 查询不到录像
+     */
+    public static final int NET_NO_RECORD_FOUND = (0x80000000 | 24);
+    /**
+     * 无操作权限
+     */
+    public static final int NET_NOT_AUTHORIZED = (0x80000000 | 25);
+    /**
+     * 暂时无法执行
+     */
+    public static final int NET_NOT_NOW = (0x80000000 | 26);
+    /**
+     * 未发现对讲通道
+     */
+    public static final int NET_NO_TALK_CHANNEL = (0x80000000 | 27);
+    /**
+     * 未发现音频
+     */
+    public static final int NET_NO_AUDIO = (0x80000000 | 28);
+    /**
+     * 网络SDK未经初始化
+     */
+    public static final int NET_NO_INIT = (0x80000000 | 29);
+    /**
+     * 下载已结束
+     */
+    public static final int NET_DOWNLOAD_END = (0x80000000 | 30);
+    /**
+     * 查询结果为空
+     */
+    public static final int NET_EMPTY_LIST = (0x80000000 | 31);
+    /**
+     * 获取系统属性配置失败
+     */
+    public static final int NET_ERROR_GETCFG_SYSATTR = (0x80000000 | 32);
+    /**
+     * 获取序列号失败
+     */
+    public static final int NET_ERROR_GETCFG_SERIAL = (0x80000000 | 33);
+    /**
+     * 获取常规属性失败
+     */
+    public static final int NET_ERROR_GETCFG_GENERAL = (0x80000000 | 34);
+    /**
+     * 获取DSP能力描述失败
+     */
+    public static final int NET_ERROR_GETCFG_DSPCAP = (0x80000000 | 35);
+    /**
+     * 获取网络配置失败
+     */
+    public static final int NET_ERROR_GETCFG_NETCFG = (0x80000000 | 36);
+    /**
+     * 获取通道名称失败
+     */
+    public static final int NET_ERROR_GETCFG_CHANNAME = (0x80000000 | 37);
+    /**
+     * 获取视频属性失败
+     */
+    public static final int NET_ERROR_GETCFG_VIDEO = (0x80000000 | 38);
+    /**
+     * 获取录象配置失败
+     */
+    public static final int NET_ERROR_GETCFG_RECORD = (0x80000000 | 39);
+    /**
+     * 获取解码器协议名称失败
+     */
+    public static final int NET_ERROR_GETCFG_PRONAME = (0x80000000 | 40);
+    /**
+     * 获取232串口功能名称失败
+     */
+    public static final int NET_ERROR_GETCFG_FUNCNAME = (0x80000000 | 41);
+    /**
+     * 获取解码器属性失败
+     */
+    public static final int NET_ERROR_GETCFG_485DECODER = (0x80000000 | 42);
+    /**
+     * 获取232串口配置失败
+     */
+    public static final int NET_ERROR_GETCFG_232COM = (0x80000000 | 43);
+    /**
+     * 获取外部报警输入配置失败
+     */
+    public static final int NET_ERROR_GETCFG_ALARMIN = (0x80000000 | 44);
+    /**
+     * 获取动态检测报警失败
+     */
+    public static final int NET_ERROR_GETCFG_ALARMDET = (0x80000000 | 45);
+    /**
+     * 获取设备时间失败
+     */
+    public static final int NET_ERROR_GETCFG_SYSTIME = (0x80000000 | 46);
+    /**
+     * 获取预览参数失败
+     */
+    public static final int NET_ERROR_GETCFG_PREVIEW = (0x80000000 | 47);
+    /**
+     * 获取自动维护配置失败
+     */
+    public static final int NET_ERROR_GETCFG_AUTOMT = (0x80000000 | 48);
+    /**
+     * 获取视频矩阵配置失败
+     */
+    public static final int NET_ERROR_GETCFG_VIDEOMTRX = (0x80000000 | 49);
+    /**
+     * 获取区域遮挡配置失败
+     */
+    public static final int NET_ERROR_GETCFG_COVER = (0x80000000 | 50);
+    /**
+     * 获取图象水印配置失败
+     */
+    public static final int NET_ERROR_GETCFG_WATERMAKE = (0x80000000 | 51);
+    /**
+     * 修改常规属性失败
+     */
+    public static final int NET_ERROR_SETCFG_GENERAL = (0x80000000 | 55);
+    /**
+     * 修改网络配置失败
+     */
+    public static final int NET_ERROR_SETCFG_NETCFG = (0x80000000 | 56);
+    /**
+     * 修改通道名称失败
+     */
+    public static final int NET_ERROR_SETCFG_CHANNAME = (0x80000000 | 57);
+    /**
+     * 修改视频属性失败
+     */
+    public static final int NET_ERROR_SETCFG_VIDEO = (0x80000000 | 58);
+    /**
+     * 修改录象配置失败
+     */
+    public static final int NET_ERROR_SETCFG_RECORD = (0x80000000 | 59);
+    /**
+     * 修改解码器属性失败
+     */
+    public static final int NET_ERROR_SETCFG_485DECODER = (0x80000000 | 60);
+    /**
+     * 修改232串口配置失败
+     */
+    public static final int NET_ERROR_SETCFG_232COM = (0x80000000 | 61);
+    /**
+     * 修改外部输入报警配置失败
+     */
+    public static final int NET_ERROR_SETCFG_ALARMIN = (0x80000000 | 62);
+    /**
+     * 修改动态检测报警配置失败
+     */
+    public static final int NET_ERROR_SETCFG_ALARMDET = (0x80000000 | 63);
+    /**
+     * 修改设备时间失败
+     */
+    public static final int NET_ERROR_SETCFG_SYSTIME = (0x80000000 | 64);
+    /**
+     * 修改预览参数失败
+     */
+    public static final int NET_ERROR_SETCFG_PREVIEW = (0x80000000 | 65);
+    /**
+     * 修改自动维护配置失败
+     */
+    public static final int NET_ERROR_SETCFG_AUTOMT = (0x80000000 | 66);
+    /**
+     * 修改视频矩阵配置失败
+     */
+    public static final int NET_ERROR_SETCFG_VIDEOMTRX = (0x80000000 | 67);
+    /**
+     * 修改区域遮挡配置失败
+     */
+    public static final int NET_ERROR_SETCFG_COVER = (0x80000000 | 68);
+    /**
+     * 修改图象水印配置失败
+     */
+    public static final int NET_ERROR_SETCFG_WATERMAKE = (0x80000000 | 69);
+    /**
+     * 修改无线网络信息失败
+     */
+    public static final int NET_ERROR_SETCFG_WLAN = (0x80000000 | 70);
+    /**
+     * 选择无线网络设备失败
+     */
+    public static final int NET_ERROR_SETCFG_WLANDEV = (0x80000000 | 71);
+    /**
+     * 修改主动注册参数配置失败
+     */
+    public static final int NET_ERROR_SETCFG_REGISTER = (0x80000000 | 72);
+    /**
+     * 修改摄像头属性配置失败
+     */
+    public static final int NET_ERROR_SETCFG_CAMERA = (0x80000000 | 73);
+    /**
+     * 修改红外报警配置失败
+     */
+    public static final int NET_ERROR_SETCFG_INFRARED = (0x80000000 | 74);
+    /**
+     * 修改音频报警配置失败
+     */
+    public static final int NET_ERROR_SETCFG_SOUNDALARM = (0x80000000 | 75);
+    /**
+     * 修改存储位置配置失败
+     */
+    public static final int NET_ERROR_SETCFG_STORAGE = (0x80000000 | 76);
+    /**
+     * 音频编码接口没有成功初始化
+     */
+    public static final int NET_AUDIOENCODE_NOTINIT = (0x80000000 | 77);
+    /**
+     * 数据过长
+     */
+    public static final int NET_DATA_TOOLONGH = (0x80000000 | 78);
+    /**
+     * 设备不支持该操作
+     */
+    public static final int NET_UNSUPPORTED = (0x80000000 | 79);
+    /**
+     * 设备资源不足
+     */
+    public static final int NET_DEVICE_BUSY = (0x80000000 | 80);
+    /**
+     * 服务器已经启动
+     */
+    public static final int NET_SERVER_STARTED = (0x80000000 | 81);
+    /**
+     * 服务器尚未成功启动
+     */
+    public static final int NET_SERVER_STOPPED = (0x80000000 | 82);
+    /**
+     * 输入序列号有误
+     */
+    public static final int NET_LISTER_INCORRECT_SERIAL = (0x80000000 | 83);
+    /**
+     * 获取硬盘信息失败
+     */
+    public static final int NET_QUERY_DISKINFO_FAILED = (0x80000000 | 84);
+    /**
+     * 获取连接Session信息
+     */
+    public static final int NET_ERROR_GETCFG_SESSION = (0x80000000 | 85);
+    /**
+     * 输入密码错误超过限制次数
+     */
+    public static final int NET_USER_FLASEPWD_TRYTIME = (0x80000000 | 86);
+    /**
+     * 密码不正确
+     */
+    public static final int NET_LOGIN_ERROR_PASSWORD = (0x80000000 | 100);
+    /**
+     * 帐户不存在
+     */
+    public static final int NET_LOGIN_ERROR_USER = (0x80000000 | 101);
+    /**
+     * 等待登录返回超时
+     */
+    public static final int NET_LOGIN_ERROR_TIMEOUT = (0x80000000 | 102);
+    /**
+     * 帐号已登录
+     */
+    public static final int NET_LOGIN_ERROR_RELOGGIN = (0x80000000 | 103);
+    /**
+     * 帐号已被锁定
+     */
+    public static final int NET_LOGIN_ERROR_LOCKED = (0x80000000 | 104);
+    /**
+     * 帐号已被列为黑名单
+     */
+    public static final int NET_LOGIN_ERROR_BLACKLIST = (0x80000000 | 105);
+    /**
+     * 资源不足,系统忙
+     */
+    public static final int NET_LOGIN_ERROR_BUSY = (0x80000000 | 106);
+    /**
+     * 登录设备超时,请检查网络并重试
+     */
+    public static final int NET_LOGIN_ERROR_CONNECT = (0x80000000 | 107);
+    /**
+     * 网络连接失败
+     */
+    public static final int NET_LOGIN_ERROR_NETWORK = (0x80000000 | 108);
+    /**
+     * 登录设备成功,但无法创建视频通道,请检查网络状况
+     */
+    public static final int NET_LOGIN_ERROR_SUBCONNECT = (0x80000000 | 109);
+    /**
+     * 超过最大连接数
+     */
+    public static final int NET_LOGIN_ERROR_MAXCONNECT = (0x80000000 | 110);
+    /**
+     * 只支持3代协议
+     */
+    public static final int NET_LOGIN_ERROR_PROTOCOL3_ONLY = (0x80000000 | 111);
+    /**
+     * 未插入U盾或U盾信息错误
+     */
+    public static final int NET_LOGIN_ERROR_UKEY_LOST = (0x80000000 | 112);
+    /**
+     * 客户端IP地址没有登录权限
+     */
+    public static final int NET_LOGIN_ERROR_NO_AUTHORIZED = (0x80000000 | 113);
+    /**
+     * 账号或密码错误
+     */
+    public static final int NET_LOGIN_ERROR_USER_OR_PASSOWRD = (0x80000000 | 117);
+    /**
+     * Render库打开音频出错
+     */
+    public static final int NET_RENDER_SOUND_ON_ERROR = (0x80000000 | 120);
+    /**
+     * Render库关闭音频出错
+     */
+    public static final int NET_RENDER_SOUND_OFF_ERROR = (0x80000000 | 121);
+    /**
+     * Render库控制音量出错
+     */
+    public static final int NET_RENDER_SET_VOLUME_ERROR = (0x80000000 | 122);
+    /**
+     * Render库设置画面参数出错
+     */
+    public static final int NET_RENDER_ADJUST_ERROR = (0x80000000 | 123);
+    /**
+     * Render库暂停播放出错
+     */
+    public static final int NET_RENDER_PAUSE_ERROR = (0x80000000 | 124);
+    /**
+     * Render库抓图出错
+     */
+    public static final int NET_RENDER_SNAP_ERROR = (0x80000000 | 125);
+    /**
+     * Render库步进出错
+     */
+    public static final int NET_RENDER_STEP_ERROR = (0x80000000 | 126);
+    /**
+     * Render库设置帧率出错
+     */
+    public static final int NET_RENDER_FRAMERATE_ERROR = (0x80000000 | 127);
+    /**
+     * Render库设置显示区域出错
+     */
+    public static final int NET_RENDER_DISPLAYREGION_ERROR = (0x80000000 | 128);
+    /**
+     * 组名已存在
+     */
+    public static final int NET_GROUP_EXIST = (0x80000000 | 140);
+    /**
+     * 组名不存在
+     */
+    public static final int NET_GROUP_NOEXIST = (0x80000000 | 141);
+    /**
+     * 组的权限超出权限列表范围
+     */
+    public static final int NET_GROUP_RIGHTOVER = (0x80000000 | 142);
+    /**
+     * 组下有用户,不能删除
+     */
+    public static final int NET_GROUP_HAVEUSER = (0x80000000 | 143);
+    /**
+     * 组的某个权限被用户使用,不能出除
+     */
+    public static final int NET_GROUP_RIGHTUSE = (0x80000000 | 144);
+    /**
+     * 新组名同已有组名重复
+     */
+    public static final int NET_GROUP_SAMENAME = (0x80000000 | 145);
+    /**
+     * 用户已存在
+     */
+    public static final int NET_USER_EXIST = (0x80000000 | 146);
+    /**
+     * 用户不存在
+     */
+    public static final int NET_USER_NOEXIST = (0x80000000 | 147);
+    /**
+     * 用户权限超出组权限
+     */
+    public static final int NET_USER_RIGHTOVER = (0x80000000 | 148);
+    /**
+     * 保留帐号,不容许修改密码
+     */
+    public static final int NET_USER_PWD = (0x80000000 | 149);
+    /**
+     * 密码不正确
+     */
+    public static final int NET_USER_FLASEPWD = (0x80000000 | 150);
+    /**
+     * 密码不匹配
+     */
+    public static final int NET_USER_NOMATCHING = (0x80000000 | 151);
+    /**
+     * 账号正在使用中
+     */
+    public static final int NET_USER_INUSE = (0x80000000 | 152);
+    /**
+     * 获取网卡配置失败
+     */
+    public static final int NET_ERROR_GETCFG_ETHERNET = (0x80000000 | 300);
+    /**
+     * 获取无线网络信息失败
+     */
+    public static final int NET_ERROR_GETCFG_WLAN = (0x80000000 | 301);
+    /**
+     * 获取无线网络设备失败
+     */
+    public static final int NET_ERROR_GETCFG_WLANDEV = (0x80000000 | 302);
+    /**
+     * 获取主动注册参数失败
+     */
+    public static final int NET_ERROR_GETCFG_REGISTER = (0x80000000 | 303);
+    /**
+     * 获取摄像头属性失败
+     */
+    public static final int NET_ERROR_GETCFG_CAMERA = (0x80000000 | 304);
+    /**
+     * 获取红外报警配置失败
+     */
+    public static final int NET_ERROR_GETCFG_INFRARED = (0x80000000 | 305);
+    /**
+     * 获取音频报警配置失败
+     */
+    public static final int NET_ERROR_GETCFG_SOUNDALARM = (0x80000000 | 306);
+    /**
+     * 获取存储位置配置失败
+     */
+    public static final int NET_ERROR_GETCFG_STORAGE = (0x80000000 | 307);
+    /**
+     * 获取邮件配置失败
+     */
+    public static final int NET_ERROR_GETCFG_MAIL = (0x80000000 | 308);
+    /**
+     * 暂时无法设置
+     */
+    public static final int NET_CONFIG_DEVBUSY = (0x80000000 | 309);
+    /**
+     * 配置数据不合法
+     */
+    public static final int NET_CONFIG_DATAILLEGAL = (0x80000000 | 310);
+    /**
+     * 获取夏令时配置失败
+     */
+    public static final int NET_ERROR_GETCFG_DST = (0x80000000 | 311);
+    /**
+     * 设置夏令时配置失败
+     */
+    public static final int NET_ERROR_SETCFG_DST = (0x80000000 | 312);
+    /**
+     * 获取视频OSD叠加配置失败
+     */
+    public static final int NET_ERROR_GETCFG_VIDEO_OSD = (0x80000000 | 313);
+    /**
+     * 设置视频OSD叠加配置失败
+     */
+    public static final int NET_ERROR_SETCFG_VIDEO_OSD = (0x80000000 | 314);
+    /**
+     * 获取CDMA\GPRS网络配置失败
+     */
+    public static final int NET_ERROR_GETCFG_GPRSCDMA = (0x80000000 | 315);
+    /**
+     * 设置CDMA\GPRS网络配置失败
+     */
+    public static final int NET_ERROR_SETCFG_GPRSCDMA = (0x80000000 | 316);
+    /**
+     * 获取IP过滤配置失败
+     */
+    public static final int NET_ERROR_GETCFG_IPFILTER = (0x80000000 | 317);
+    /**
+     * 设置IP过滤配置失败
+     */
+    public static final int NET_ERROR_SETCFG_IPFILTER = (0x80000000 | 318);
+    /**
+     * 获取语音对讲编码配置失败
+     */
+    public static final int NET_ERROR_GETCFG_TALKENCODE = (0x80000000 | 319);
+    /**
+     * 设置语音对讲编码配置失败
+     */
+    public static final int NET_ERROR_SETCFG_TALKENCODE = (0x80000000 | 320);
+    /**
+     * 获取录像打包长度配置失败
+     */
+    public static final int NET_ERROR_GETCFG_RECORDLEN = (0x80000000 | 321);
+    /**
+     * 设置录像打包长度配置失败
+     */
+    public static final int NET_ERROR_SETCFG_RECORDLEN = (0x80000000 | 322);
+    /**
+     * 不支持网络硬盘分区
+     */
+    public static final int NET_DONT_SUPPORT_SUBAREA = (0x80000000 | 323);
+    /**
+     * 获取设备上主动注册服务器信息失败
+     */
+    public static final int NET_ERROR_GET_AUTOREGSERVER = (0x80000000 | 324);
+    /**
+     * 主动注册重定向注册错误
+     */
+    public static final int NET_ERROR_CONTROL_AUTOREGISTER = (0x80000000 | 325);
+    /**
+     * 断开主动注册服务器错误
+     */
+    public static final int NET_ERROR_DISCONNECT_AUTOREGISTER = (0x80000000 | 326);
+    /**
+     * 获取mms配置失败
+     */
+    public static final int NET_ERROR_GETCFG_MMS = (0x80000000 | 327);
+    /**
+     * 设置mms配置失败
+     */
+    public static final int NET_ERROR_SETCFG_MMS = (0x80000000 | 328);
+    /**
+     * 获取短信激活无线连接配置失败
+     */
+    public static final int NET_ERROR_GETCFG_SMSACTIVATION = (0x80000000 | 329);
+    /**
+     * 设置短信激活无线连接配置失败
+     */
+    public static final int NET_ERROR_SETCFG_SMSACTIVATION = (0x80000000 | 330);
+    /**
+     * 获取拨号激活无线连接配置失败
+     */
+    public static final int NET_ERROR_GETCFG_DIALINACTIVATION = (0x80000000 | 331);
+    /**
+     * 设置拨号激活无线连接配置失败
+     */
+    public static final int NET_ERROR_SETCFG_DIALINACTIVATION = (0x80000000 | 332);
+    /**
+     * 查询视频输出参数配置失败
+     */
+    public static final int NET_ERROR_GETCFG_VIDEOOUT = (0x80000000 | 333);
+    /**
+     * 设置视频输出参数配置失败
+     */
+    public static final int NET_ERROR_SETCFG_VIDEOOUT = (0x80000000 | 334);
+    /**
+     * 获取osd叠加使能配置失败
+     */
+    public static final int NET_ERROR_GETCFG_OSDENABLE = (0x80000000 | 335);
+    /**
+     * 设置osd叠加使能配置失败
+     */
+    public static final int NET_ERROR_SETCFG_OSDENABLE = (0x80000000 | 336);
+    /**
+     * 设置数字通道前端编码接入配置失败
+     */
+    public static final int NET_ERROR_SETCFG_ENCODERINFO = (0x80000000 | 337);
+    /**
+     * 获取TV调节配置失败
+     */
+    public static final int NET_ERROR_GETCFG_TVADJUST = (0x80000000 | 338);
+    /**
+     * 设置TV调节配置失败
+     */
+    public static final int NET_ERROR_SETCFG_TVADJUST = (0x80000000 | 339);
+    /**
+     * 请求建立连接失败
+     */
+    public static final int NET_ERROR_CONNECT_FAILED = (0x80000000 | 340);
+    /**
+     * 请求刻录文件上传失败
+     */
+    public static final int NET_ERROR_SETCFG_BURNFILE = (0x80000000 | 341);
+    /**
+     * 获取抓包配置信息失败
+     */
+    public static final int NET_ERROR_SNIFFER_GETCFG = (0x80000000 | 342);
+    /**
+     * 设置抓包配置信息失败
+     */
+    public static final int NET_ERROR_SNIFFER_SETCFG = (0x80000000 | 343);
+    /**
+     * 查询下载限制信息失败
+     */
+    public static final int NET_ERROR_DOWNLOADRATE_GETCFG = (0x80000000 | 344);
+    /**
+     * 设置下载限制信息失败
+     */
+    public static final int NET_ERROR_DOWNLOADRATE_SETCFG = (0x80000000 | 345);
+    /**
+     * 查询串口参数失败
+     */
+    public static final int NET_ERROR_SEARCH_TRANSCOM = (0x80000000 | 346);
+    /**
+     * 获取预制点信息错误
+     */
+    public static final int NET_ERROR_GETCFG_POINT = (0x80000000 | 347);
+    /**
+     * 设置预制点信息错误
+     */
+    public static final int NET_ERROR_SETCFG_POINT = (0x80000000 | 348);
+    /**
+     * SDK没有正常登出设备
+     */
+    public static final int NET_SDK_LOGOUT_ERROR = (0x80000000 | 349);
+    /**
+     * 获取车载配置失败
+     */
+    public static final int NET_ERROR_GET_VEHICLE_CFG = (0x80000000 | 350);
+    /**
+     * 设置车载配置失败
+     */
+    public static final int NET_ERROR_SET_VEHICLE_CFG = (0x80000000 | 351);
+    /**
+     * 获取atm叠加配置失败
+     */
+    public static final int NET_ERROR_GET_ATM_OVERLAY_CFG = (0x80000000 | 352);
+    /**
+     * 设置atm叠加配置失败
+     */
+    public static final int NET_ERROR_SET_ATM_OVERLAY_CFG = (0x80000000 | 353);
+    /**
+     * 获取atm叠加能力失败
+     */
+    public static final int NET_ERROR_GET_ATM_OVERLAY_ABILITY = (0x80000000 | 354);
+    /**
+     * 获取解码器解码轮巡配置失败
+     */
+    public static final int NET_ERROR_GET_DECODER_TOUR_CFG = (0x80000000 | 355);
+    /**
+     * 设置解码器解码轮巡配置失败
+     */
+    public static final int NET_ERROR_SET_DECODER_TOUR_CFG = (0x80000000 | 356);
+    /**
+     * 控制解码器解码轮巡失败
+     */
+    public static final int NET_ERROR_CTRL_DECODER_TOUR = (0x80000000 | 357);
+    /**
+     * 超出设备支持最大用户组数目
+     */
+    public static final int NET_GROUP_OVERSUPPORTNUM = (0x80000000 | 358);
+    /**
+     * 超出设备支持最大用户数目
+     */
+    public static final int NET_USER_OVERSUPPORTNUM = (0x80000000 | 359);
+    /**
+     * 获取SIP配置失败
+     */
+    public static final int NET_ERROR_GET_SIP_CFG = (0x80000000 | 368);
+    /**
+     * 设置SIP配置失败
+     */
+    public static final int NET_ERROR_SET_SIP_CFG = (0x80000000 | 369);
+    /**
+     * 获取SIP能力失败
+     */
+    public static final int NET_ERROR_GET_SIP_ABILITY = (0x80000000 | 370);
+    /**
+     * 获取WIFI ap配置失败
+     */
+    public static final int NET_ERROR_GET_WIFI_AP_CFG = (0x80000000 | 371);
+    /**
+     * 设置WIFI ap配置失败
+     */
+    public static final int NET_ERROR_SET_WIFI_AP_CFG = (0x80000000 | 372);
+    /**
+     * 获取解码策略配置失败
+     */
+    public static final int NET_ERROR_GET_DECODE_POLICY = (0x80000000 | 373);
+    /**
+     * 设置解码策略配置失败
+     */
+    public static final int NET_ERROR_SET_DECODE_POLICY = (0x80000000 | 374);
+    /**
+     * 拒绝对讲
+     */
+    public static final int NET_ERROR_TALK_REJECT = (0x80000000 | 375);
+    /**
+     * 对讲被其他客户端打开
+     */
+    public static final int NET_ERROR_TALK_OPENED = (0x80000000 | 376);
+    /**
+     * 资源冲突
+     */
+    public static final int NET_ERROR_TALK_RESOURCE_CONFLICIT = (0x80000000 | 377);
+    /**
+     * 不支持的语音编码格式
+     */
+    public static final int NET_ERROR_TALK_UNSUPPORTED_ENCODE = (0x80000000 | 378);
+    /**
+     * 无权限
+     */
+    public static final int NET_ERROR_TALK_RIGHTLESS = (0x80000000 | 379);
+    /**
+     * 请求对讲失败
+     */
+    public static final int NET_ERROR_TALK_FAILED = (0x80000000 | 380);
+    /**
+     * 获取机器相关配置失败
+     */
+    public static final int NET_ERROR_GET_MACHINE_CFG = (0x80000000 | 381);
+    /**
+     * 设置机器相关配置失败
+     */
+    public static final int NET_ERROR_SET_MACHINE_CFG = (0x80000000 | 382);
+    /**
+     * 设备无法获取当前请求数据
+     */
+    public static final int NET_ERROR_GET_DATA_FAILED = (0x80000000 | 383);
+    /**
+     * MAC地址验证失败
+     */
+    public static final int NET_ERROR_MAC_VALIDATE_FAILED = (0x80000000 | 384);
+    /**
+     * 获取服务器实例失败
+     */
+    public static final int NET_ERROR_GET_INSTANCE = (0x80000000 | 385);
+    /**
+     * 生成的json字符串错误
+     */
+    public static final int NET_ERROR_JSON_REQUEST = (0x80000000 | 386);
+    /**
+     * 响应的json字符串错误
+     */
+    public static final int NET_ERROR_JSON_RESPONSE = (0x80000000 | 387);
+    /**
+     * 协议版本低于当前使用的版本
+     */
+    public static final int NET_ERROR_VERSION_HIGHER = (0x80000000 | 388);
+    /**
+     * 热备操作失败, 容量不足
+     */
+    public static final int NET_SPARE_NO_CAPACITY = (0x80000000 | 389);
+    /**
+     * 显示源被其他输出占用
+     */
+    public static final int NET_ERROR_SOURCE_IN_USE = (0x80000000 | 390);
+    /**
+     * 高级用户抢占低级用户资源
+     */
+    public static final int NET_ERROR_REAVE = (0x80000000 | 391);
+    /**
+     * 禁止入网
+     */
+    public static final int NET_ERROR_NETFORBID = (0x80000000 | 392);
+    /**
+     * 获取MAC过滤配置失败
+     */
+    public static final int NET_ERROR_GETCFG_MACFILTER = (0x80000000 | 393);
+    /**
+     * 设置MAC过滤配置失败
+     */
+    public static final int NET_ERROR_SETCFG_MACFILTER = (0x80000000 | 394);
+    /**
+     * 获取IP/MAC过滤配置失败
+     */
+    public static final int NET_ERROR_GETCFG_IPMACFILTER = (0x80000000 | 395);
+    /**
+     * 设置IP/MAC过滤配置失败
+     */
+    public static final int NET_ERROR_SETCFG_IPMACFILTER = (0x80000000 | 396);
+    /**
+     * 当前操作超时
+     */
+    public static final int NET_ERROR_OPERATION_OVERTIME = (0x80000000 | 397);
+    /**
+     * 高级校验失败
+     */
+    public static final int NET_ERROR_SENIOR_VALIDATE_FAILED = (0x80000000 | 398);
+    /**
+     * 设备ID不存在
+     */
+    public static final int NET_ERROR_DEVICE_ID_NOT_EXIST = (0x80000000 | 399);
+    /**
+     * 不支持当前操作
+     */
+    public static final int NET_ERROR_UNSUPPORTED = (0x80000000 | 400);
+    /**
+     * 代理库加载失败
+     */
+    public static final int NET_ERROR_PROXY_DLLLOAD = (0x80000000 | 401);
+    /**
+     * 代理用户参数不合法
+     */
+    public static final int NET_ERROR_PROXY_ILLEGAL_PARAM = (0x80000000 | 402);
+    /**
+     * 代理句柄无效
+     */
+    public static final int NET_ERROR_PROXY_INVALID_HANDLE = (0x80000000 | 403);
+    /**
+     * 代理登入前端设备失败
+     */
+    public static final int NET_ERROR_PROXY_LOGIN_DEVICE_ERROR = (0x80000000 | 404);
+    /**
+     * 启动代理服务失败
+     */
+    public static final int NET_ERROR_PROXY_START_SERVER_ERROR = (0x80000000 | 405);
+    /**
+     * 请求喊话失败
+     */
+    public static final int NET_ERROR_SPEAK_FAILED = (0x80000000 | 406);
+    /**
+     * 设备不支持此F6接口调用
+     */
+    public static final int NET_ERROR_NOT_SUPPORT_F6 = (0x80000000 | 407);
+    /**
+     * 光盘未就绪
+     */
+    public static final int NET_ERROR_CD_UNREADY = (0x80000000 | 408);
+    /**
+     * 目录不存在
+     */
+    public static final int NET_ERROR_DIR_NOT_EXIST = (0x80000000 | 409);
+    /**
+     * 设备不支持的分割模式
+     */
+    public static final int NET_ERROR_UNSUPPORTED_SPLIT_MODE = (0x80000000 | 410);
+    /**
+     * 开窗参数不合法
+     */
+    public static final int NET_ERROR_OPEN_WND_PARAM = (0x80000000 | 411);
+    /**
+     * 开窗数量超过限制
+     */
+    public static final int NET_ERROR_LIMITED_WND_COUNT = (0x80000000 | 412);
+    /**
+     * 请求命令与当前模式不匹配
+     */
+    public static final int NET_ERROR_UNMATCHED_REQUEST = (0x80000000 | 413);
+    /**
+     * Render库启用高清图像内部调整策略出错
+     */
+    public static final int NET_RENDER_ENABLELARGEPICADJUSTMENT_ERROR = (0x80000000 | 414);
+    /**
+     * 设备升级失败
+     */
+    public static final int NET_ERROR_UPGRADE_FAILED = (0x80000000 | 415);
+    /**
+     * 找不到目标设备
+     */
+    public static final int NET_ERROR_NO_TARGET_DEVICE = (0x80000000 | 416);
+    /**
+     * 找不到目标设备
+     */
+    public static final int NET_ERROR_NO_VERIFY_DEVICE = (0x80000000 | 417);
+    /**
+     * 无级联权限
+     */
+    public static final int NET_ERROR_CASCADE_RIGHTLESS = (0x80000000 | 418);
+    /**
+     * 低优先级
+     */
+    public static final int NET_ERROR_LOW_PRIORITY = (0x80000000 | 419);
+    /**
+     * 远程设备请求超时
+     */
+    public static final int NET_ERROR_REMOTE_REQUEST_TIMEOUT = (0x80000000 | 420);
+    /**
+     * 输入源超出最大路数限制
+     */
+    public static final int NET_ERROR_LIMITED_INPUT_SOURCE = (0x80000000 | 421);
+    /**
+     * 设置日志打印失败
+     */
+    public static final int NET_ERROR_SET_LOG_PRINT_INFO = (0x80000000 | 422);
+    /**
+     * 入参的dwsize字段出错
+     */
+    public static final int NET_ERROR_PARAM_DWSIZE_ERROR = (0x80000000 | 423);
+    /**
+     * 电视墙数量超过上限
+     */
+    public static final int NET_ERROR_LIMITED_MONITORWALL_COUNT = (0x80000000 | 424);
+    /**
+     * 部分过程执行失败
+     */
+    public static final int NET_ERROR_PART_PROCESS_FAILED = (0x80000000 | 425);
+    /**
+     * 该功能不支持转发
+     */
+    public static final int NET_ERROR_TARGET_NOT_SUPPORT = (0x80000000 | 426);
+    /**
+     * 访问文件失败
+     */
+    public static final int NET_ERROR_VISITE_FILE = (0x80000000 | 510);
+    /**
+     * 设备忙
+     */
+    public static final int NET_ERROR_DEVICE_STATUS_BUSY = (0x80000000 | 511);
+    /**
+     * 修改密码无权限
+     */
+    public static final int NET_USER_PWD_NOT_AUTHORIZED = (0x80000000 | 512);
+    /**
+     * 密码强度不够
+     */
+    public static final int NET_USER_PWD_NOT_STRONG = (0x80000000 | 513);
+    /**
+     * 没有对应的配置
+     */
+    public static final int NET_ERROR_NO_SUCH_CONFIG = (0x80000000 | 514);
+    /**
+     * 录音失败
+     */
+    public static final int NET_ERROR_AUDIO_RECORD_FAILED = (0x80000000 | 515);
+    /**
+     * 数据发送失败
+     */
+    public static final int NET_ERROR_SEND_DATA_FAILED = (0x80000000 | 516);
+    /**
+     * 废弃接口
+     */
+    public static final int NET_ERROR_OBSOLESCENT_INTERFACE = (0x80000000 | 517);
+    /**
+     * 内部缓冲不足
+     */
+    public static final int NET_ERROR_INSUFFICIENT_INTERAL_BUF = (0x80000000 | 518);
+    /**
+     * 修改设备ip时,需要校验密码
+     */
+    public static final int NET_ERROR_NEED_ENCRYPTION_PASSWORD = (0x80000000 | 519);
+    /**
+     * 数据序列化错误
+     */
+    public static final int NET_ERROR_SERIALIZE_ERROR = (0x80000000 | 1010);
+    /**
+     * 数据反序列化错误
+     */
+    public static final int NET_ERROR_DESERIALIZE_ERROR = (0x80000000 | 1011);
+    /**
+     * 该无线ID已存在
+     */
+    public static final int NET_ERROR_LOWRATEWPAN_ID_EXISTED = (0x80000000 | 1012);
+    /**
+     * 无线ID数量已超限
+     */
+    public static final int NET_ERROR_LOWRATEWPAN_ID_LIMIT = (0x80000000 | 1013);
+    /**
+     * 无线异常添加
+     */
+    public static final int NET_ERROR_LOWRATEWPAN_ID_ABNORMAL = (0x80000000 | 1014);
+}

+ 31 - 0
src/main/java/com/usoftchina/ss/dahua/lib/FaceAreaType.java

@@ -0,0 +1,31 @@
+package com.usoftchina.ss.dahua.lib;
+
+/**
+ * 人脸区域
+ *
+ * @author yingp
+ * @date 2019/2/15
+ */
+public class FaceAreaType {
+    public static final int NET_FACE_AREA_TYPE_UNKOWN = 0;
+    /**
+     * 眉毛
+     */
+    public static final int NET_FACE_AREA_TYPE_EYEBROW = 1;
+    /**
+     * 眼睛
+     */
+    public static final int NET_FACE_AREA_TYPE_EYE = 2;
+    /**
+     * 鼻子
+     */
+    public static final int NET_FACE_AREA_TYPE_NOSE = 3;
+    /**
+     * 嘴巴
+     */
+    public static final int NET_FACE_AREA_TYPE_MOUTH = 4;
+    /**
+     * 脸颊
+     */
+    public static final int NET_FACE_AREA_TYPE_CHEEK = 5;
+}

+ 23 - 0
src/main/java/com/usoftchina/ss/dahua/lib/FaceCompareMode.java

@@ -0,0 +1,23 @@
+package com.usoftchina.ss.dahua.lib;
+
+/**
+ * 人脸对比模式
+ *
+ * @author yingp
+ * @date 2019/2/15
+ */
+public class FaceCompareMode {
+    public static final int NET_FACE_COMPARE_MODE_UNKOWN = 0;
+    /**
+     * 正常
+     */
+    public static final int NET_FACE_COMPARE_MODE_NORMAL = 1;
+    /**
+     * 指定人脸区域组合区域
+     */
+    public static final int NET_FACE_COMPARE_MODE_AREA = 2;
+    /**
+     * 智能模式,算法根据人脸各个区域情况自动选取组合
+     */
+    public static final int NET_FACE_COMPARE_MODE_AUTO = 3;
+}

+ 29 - 0
src/main/java/com/usoftchina/ss/dahua/lib/FaceDbType.java

@@ -0,0 +1,29 @@
+package com.usoftchina.ss.dahua.lib;
+
+/**
+ * 人脸数据类型
+ *
+ * @author yingp
+ * @date 2019/2/15
+ */
+public class FaceDbType {
+    public static final int NET_FACE_DB_TYPE_UNKOWN = 0;
+    /**
+     * 历史数据库,存放的是检测出的人脸信息,一般没有包含人脸对应人员信息
+     */
+    public static final int NET_FACE_DB_TYPE_HISTORY = 1;
+    /**
+     * 黑名单数据库
+     */
+    public static final int NET_FACE_DB_TYPE_BLACKLIST = 2;
+    /**
+     * 白名单数据库
+     *
+     * @deprecated
+     */
+    public static final int NET_FACE_DB_TYPE_WHITELIST = 3;
+    /**
+     * 报警库
+     */
+    public static final int NET_FACE_DB_TYPE_ALARM = 4;
+}

+ 23 - 0
src/main/java/com/usoftchina/ss/dahua/lib/FaceRecognitionFaceType.java

@@ -0,0 +1,23 @@
+package com.usoftchina.ss.dahua.lib;
+
+/**
+ * 人脸识别人脸类型
+ *
+ * @author yingp
+ * @date 2019/2/15
+ */
+public class FaceRecognitionFaceType {
+    public static final int EM_FACERECOGNITION_FACE_TYPE_UNKOWN = 0;
+    /**
+     * 所有人脸
+     */
+    public static final int EM_FACERECOGNITION_FACE_TYPE_ALL = 1;
+    /**
+     * 识别成功
+     */
+    public static final int EM_FACERECOGNITION_FACE_TYPE_REC_SUCCESS = 2;
+    /**
+     * 识别失败
+     */
+    public static final int EM_FACERECOGNITION_FACE_TYPE_REC_FAIL = 3;
+}

+ 138 - 0
src/main/java/com/usoftchina/ss/dahua/lib/INetSdk.java

@@ -0,0 +1,138 @@
+package com.usoftchina.ss.dahua.lib;
+
+import com.sun.jna.Native;
+import com.sun.jna.NativeLong;
+import com.sun.jna.ptr.IntByReference;
+
+import java.util.Arrays;
+
+/**
+ * @author yingp
+ * @date 2019/2/15
+ */
+public class INetSdk {
+
+    private final NetSdkLib instance;
+
+    public INetSdk() {
+        this.instance = (NetSdkLib) Native.load("dhnetsdk", NetSdkLib.class);
+    }
+
+    private boolean initialized;
+    /**
+     * 登录超时时间
+     */
+    private int waitTime = 5000;
+    /**
+     * 登录尝试次数
+     */
+    private int tryTimes = 1;
+    /**
+     * 建立连接超时时间
+     */
+    private int connectTime = 10000;
+
+    /**
+     * 登陆句柄
+     */
+    private NativeLong m_hLoginHandle = new NativeLong();
+
+    /**
+     * 设备信息
+     */
+    private NetSdkLib.NET_DEVICEINFO_Ex m_stDeviceInfo = new NetSdkLib.NET_DEVICEINFO_Ex();
+
+    /**
+     * 初始化
+     *
+     * @param disConnect
+     * @param haveReConnect
+     * @return
+     */
+    public boolean init(NetSdkLib.fDisConnect disConnect, NetSdkLib.fHaveReConnect haveReConnect) {
+        initialized = instance.CLIENT_Init(disConnect, new NativeLong());
+        if (!initialized) {
+            System.err.println("Initialize SDK failed");
+            return false;
+        }
+        // 设置过断线重连成功回调函数后,当设备出现断线情况,SDK内部会自动进行重连操作
+        instance.CLIENT_SetAutoReconnect(haveReConnect, new NativeLong());
+        instance.CLIENT_SetConnectTime(waitTime, tryTimes);
+        // 设置网络参数
+        NetSdkLib.NET_PARAM netParam = new NetSdkLib.NET_PARAM();
+        netParam.nConnectTime = connectTime;
+        instance.CLIENT_SetNetworkParam(netParam);
+        return true;
+    }
+
+    /**
+     * 初始化
+     *
+     * @return
+     */
+    public boolean init() {
+        return init(new DefaultDisConnect(), new DefaultHaveReConnect());
+    }
+
+    private static class DefaultDisConnect implements NetSdkLib.fDisConnect {
+        @Override
+        public void invoke(NativeLong m_hLoginHandle, String pchDVRIP, int nDVRPort, NativeLong dwUser) {
+            System.out.printf("Device[%s] Port[%d] DisConnect!\n", pchDVRIP, nDVRPort);
+        }
+    }
+
+    private static class DefaultHaveReConnect implements NetSdkLib.fHaveReConnect {
+        @Override
+        public void invoke(NativeLong m_hLoginHandle, String pchDVRIP, int nDVRPort, NativeLong dwUser) {
+            System.out.printf("ReConnect Device[%s] Port[%d]\n", pchDVRIP, nDVRPort);
+        }
+    }
+
+    /**
+     * 清除环境
+     */
+    public void cleanup() {
+        if (initialized) {
+            instance.CLIENT_Cleanup();
+        }
+    }
+
+    /**
+     * 登录设备
+     *
+     * @param m_strIp
+     * @param m_nPort
+     * @param m_strUser
+     * @param m_strPassword
+     * @return
+     */
+    public boolean login(String m_strIp, int m_nPort, String m_strUser, String m_strPassword) {
+        IntByReference nError = new IntByReference(0);
+        m_hLoginHandle = instance.CLIENT_LoginEx2(m_strIp, m_nPort, m_strUser, m_strPassword, 0, null, m_stDeviceInfo, nError);
+        if (m_hLoginHandle.longValue() == 0) {
+            System.err.printf("Login Device[%s] Port[%d]Failed. Last Error[0x%x]\n", m_strIp, m_nPort, instance.CLIENT_GetLastError());
+            return false;
+        }
+        System.out.println("Login Success [ " + m_strIp + " ]");
+        return true;
+    }
+
+    /**
+     * 登出设备
+     *
+     * @return
+     */
+    public boolean logout() {
+        if (m_hLoginHandle.longValue() == 0) {
+            return false;
+        }
+
+        boolean bRet = instance.CLIENT_Logout(m_hLoginHandle);
+        if (bRet) {
+            m_hLoginHandle.setValue(0);
+        }
+
+        return bRet;
+    }
+
+}

+ 33 - 0
src/main/java/com/usoftchina/ss/dahua/lib/LLong.java

@@ -0,0 +1,33 @@
+package com.usoftchina.ss.dahua.lib;
+
+import com.sun.jna.IntegerType;
+import com.sun.jna.Native;
+import com.sun.jna.Platform;
+
+/**
+ * @author yingp
+ * @date 2019/2/15
+ */
+public class LLong extends IntegerType {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * Size of a native long, in bytes
+     */
+    public static int size;
+
+    static {
+        size = Native.LONG_SIZE;
+        if (Platform.is64Bit()) {
+            size = 8;
+        }
+    }
+
+    public LLong() {
+        this(0);
+    }
+
+    public LLong(long value) {
+        super(size, value);
+    }
+}

+ 86 - 0
src/main/java/com/usoftchina/ss/dahua/lib/LoginSpecCapType.java

@@ -0,0 +1,86 @@
+package com.usoftchina.ss.dahua.lib;
+
+/**
+ * 登录类型
+ *
+ * @author yingp
+ * @date 2019/2/15
+ */
+public class LoginSpecCapType {
+    /**
+     * TCP登录, 默认方式
+     */
+    public static final int EM_LOGIN_SPEC_CAP_TCP = 0;
+    /**
+     * 无条件登录
+     */
+    public static final int EM_LOGIN_SPEC_CAP_ANY = 1;
+    /**
+     * 主动注册的登录
+     */
+    public static final int EM_LOGIN_SPEC_CAP_SERVER_CONN = 2;
+    /**
+     * 组播登录
+     */
+    public static final int EM_LOGIN_SPEC_CAP_MULTICAST = 3;
+    /**
+     * UDP方式下的登录
+     */
+    public static final int EM_LOGIN_SPEC_CAP_UDP = 4;
+    /**
+     * 只建主连接下的登录
+     */
+    public static final int EM_LOGIN_SPEC_CAP_MAIN_CONN_ONLY = 6;
+    /**
+     * SSL加密方式登录
+     */
+    public static final int EM_LOGIN_SPEC_CAP_SSL = 7;
+    /**
+     * 登录智能盒远程设备
+     */
+    public static final int EM_LOGIN_SPEC_CAP_INTELLIGENT_BOX = 9;
+    /**
+     * 登录设备后不做取配置操作
+     */
+    public static final int EM_LOGIN_SPEC_CAP_NO_CONFIG = 10;
+    /**
+     * 用U盾设备的登录
+     */
+    public static final int EM_LOGIN_SPEC_CAP_U_LOGIN = 11;
+    /**
+     * LDAP方式登录
+     */
+    public static final int EM_LOGIN_SPEC_CAP_LDAP = 12;
+    /**
+     * AD(ActiveDirectory)登录方式
+     */
+    public static final int EM_LOGIN_SPEC_CAP_AD = 13;
+    /**
+     * Radius登录方式
+     */
+    public static final int EM_LOGIN_SPEC_CAP_RADIUS = 14;
+    /**
+     * Socks5登录方式
+     */
+    public static final int EM_LOGIN_SPEC_CAP_SOCKET_5 = 15;
+    /**
+     * 云登录方式
+     */
+    public static final int EM_LOGIN_SPEC_CAP_CLOUD = 16;
+    /**
+     * 二次鉴权登录方式
+     */
+    public static final int EM_LOGIN_SPEC_CAP_AUTH_TWICE = 17;
+    /**
+     * TS码流客户端登录方式
+     */
+    public static final int EM_LOGIN_SPEC_CAP_TS = 18;
+    /**
+     * 为P2P登录方式
+     */
+    public static final int EM_LOGIN_SPEC_CAP_P2P = 19;
+    /**
+     * 手机客户端登录
+     */
+    public static final int EM_LOGIN_SPEC_CAP_MOBILE = 20;
+}

+ 894 - 0
src/main/java/com/usoftchina/ss/dahua/lib/NetSdkLib.java

@@ -0,0 +1,894 @@
+package com.usoftchina.ss.dahua.lib;
+
+import com.sun.jna.*;
+import com.sun.jna.ptr.IntByReference;
+import com.sun.jna.win32.StdCallLibrary.StdCallCallback;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * @author yingp
+ * @date 2019/2/14
+ */
+public interface NetSdkLib extends Library {
+
+    /*******************常量*******************/
+
+    /**
+     * 设备序列号字符长度
+     */
+    int NET_SERIALNO_LEN = 48;
+
+    /**
+     * 通用名字字符串长度
+     */
+    int DH_MAX_NAME_LEN = 16;
+
+    /**
+     * 人员id最大长度
+     */
+    int DH_MAX_PERSON_ID_LEN = 32;
+
+    /**
+     * 每个人员对应的最大人脸图片数
+     */
+    int DH_MAX_PERSON_IMAGE_NUM = 48;
+
+    /**
+     * 省份名称最大长度
+     */
+    int DH_MAX_PROVINCE_NAME_LEN = 64;
+
+    /**
+     * 城市名称最大长度
+     */
+    int DH_MAX_CITY_NAME_LEN = 64;
+
+    /**
+     * 人员名字最大长度
+     */
+    int DH_MAX_PERSON_NAME_LEN = 64;
+
+    int MAX_PATH = 260;
+
+    int MAX_FIND_COUNT = 20;
+
+    /**
+     * 最大人脸区域个数
+     */
+    int MAX_FACE_AREA_NUM = 8;
+
+    /**
+     * 最大人脸数据库个数
+     */
+    int MAX_FACE_DB_NUM = 8;
+
+    /*******************SDK初始化*******************/
+
+    /**
+     * 初始化SDK, 在调用SDK另外函数之前调用
+     *
+     * @param cbDisConnect 断线回调函数,通知用户当前断开网络的设备,如果调用SDK的ClIENT_Logout函数主动断开的设备不作断线回调,设置为NULL时不回调
+     * @param dwUser       用户数据
+     * @return
+     */
+    boolean CLIENT_Init(StdCallCallback cbDisConnect, NativeLong dwUser);
+
+    /**
+     * 清空SDK, 释放占用的资源,在所有的SDK函数之后调用
+     */
+    void CLIENT_Cleanup();
+
+    /**
+     * 获取SDK的版本号
+     *
+     * @return
+     */
+    int CLIENT_GetSDKVersion();
+
+    /**
+     * 获取函数执行的错误码
+     *
+     * @return
+     * @see ErrorCode
+     */
+    int CLIENT_GetLastError();
+
+    /**
+     * 设置断线重连回调函数,在设备断线时自动重连设备
+     *
+     * @param cbAutoConnect 断线重连成功的回调函数,通知用户当前断线重连成功的设备
+     * @param dwUser        用户自定义数据,在回调中可以使用
+     */
+    void CLIENT_SetAutoReconnect(StdCallCallback cbAutoConnect, NativeLong dwUser);
+
+    /**
+     * 设置连接设备等待时间
+     *
+     * @param nWaitTime 连接设备等待时间(单位毫秒)
+     * @param nTryTimes 连接次数
+     */
+    void CLIENT_SetConnectTime(int nWaitTime, int nTryTimes);
+
+    /**
+     * 设置网络参数
+     *
+     * @param pNetParam
+     */
+    void CLIENT_SetNetworkParam(NET_PARAM pNetParam);
+
+    /**
+     * 登陆网络环境设置
+     */
+    class NET_PARAM extends Structure {
+        /**
+         * 保留字段
+         */
+        public byte[] bReserved = new byte[4];
+        /**
+         * 网络类型,0-LAN, 1-WAN
+         */
+        public byte byNetType;
+        /**
+         * 回放数据接收缓冲大小(M为单位),为0默认为4M
+         */
+        public byte byPlaybackBufSize;
+        /**
+         * 保留字段
+         */
+        public byte[] byReserved1 = new byte[2];
+        /**
+         * 每个连接接收数据缓冲大小(字节为单位),为0默认250*1024
+         */
+        public int nConnectBufSize;
+        /**
+         * 连接超时时间(毫秒为单位),为0默认1500ms
+         */
+        public int nConnectTime;
+        /**
+         * 连接尝试次数,为0默认1次
+         */
+        public int nConnectTryNum;
+        /**
+         * 获取子连接信息超时时间(毫秒为单位),为0默认1000ms
+         */
+        public int nGetConnInfoTime;
+        /**
+         * 获取设备信息超时时间,为0默认1000ms
+         */
+        public int nGetDevInfoTime;
+        /**
+         * 实时图片接收缓冲大小(字节为单位),为0默认为2*1024*1024
+         */
+        public int nPicBufSize;
+        /**
+         * 按时间查询录像文件的超时时间(毫秒为单位),为0默认为3000ms
+         */
+        public int nSearchRecordTime;
+        /**
+         * 等待超时时间(毫秒为单位),为0默认5000ms
+         */
+        public int nWaittime;
+        /**
+         * 子连接之间的等待时间(毫秒为单位),为0默认10ms
+         */
+        public int nsubConnectSpaceTime;
+        /**
+         * 检测子链接断线等待时间(毫秒为单位),为0默认为60000ms
+         */
+        public int nsubDisconnetTime;
+
+        @Override
+        protected List<String> getFieldOrder() {
+            return Collections.unmodifiableList(
+                    Arrays.asList("bReserved", "byNetType", "byPlaybackBufSize", "byReserved1", "nConnectBufSize",
+                            "nConnectTime", "nConnectTryNum", "nGetConnInfoTime", "nGetDevInfoTime", "nPicBufSize",
+                            "nSearchRecordTime", "nWaittime", "nsubConnectSpaceTime", "nsubDisconnetTime"));
+        }
+    }
+
+    /*******************登录设备*******************/
+    /**
+     * 登录设备
+     *
+     * @param pchDVRIP     设备IP
+     * @param wDVRPort     设备端口
+     * @param pchUserName  用户名
+     * @param pchPassword  用户密码
+     * @param emSpecCap    设备支持的能力,值为2表示主动侦听模式下的用户登陆(车载dvr登录)
+     * @param pCapParam    对emSpecCap 的补充参数,emSpecCap = 2时,pCapParam填充设备序列号字串(车载dvr登录)
+     * @param lpDeviceInfo 设备信息,属于输出参数,填NULL效果类似emSpecCap=10
+     * @param error        (当函数返回成功时,该参数的值无意义),返回登录错误码
+     * @return
+     * @see LoginSpecCapType
+     */
+    NativeLong CLIENT_LoginEx2(String pchDVRIP, int wDVRPort, String pchUserName, String pchPassword, int emSpecCap,
+                               Pointer pCapParam, NET_DEVICEINFO_Ex lpDeviceInfo, IntByReference error);
+
+    /**
+     * 登出设备
+     *
+     * @param lLoginID CLIENT_LoginEx2的返回值
+     * @return 成功返回TRUE,失败返回FALSE
+     */
+    boolean CLIENT_Logout(NativeLong lLoginID);
+
+    /**
+     * 设备信息
+     */
+    class NET_DEVICEINFO_Ex extends Structure {
+        /**
+         * 保留
+         */
+        public byte[] Reserved = new byte[24];
+        /**
+         * 保留字节
+         */
+        public byte[] bReserved = new byte[2];
+        /**
+         * 当登陆失败原因为密码错误时,通过此参数通知用户,剩余登陆次数,为0时表示此参数无效
+         */
+        public byte byLeftLogTimes;
+        /**
+         * 在线超时时间,为0表示不限制登陆,非0表示限制的分钟数
+         */
+        public byte byLimitLoginTime;
+        /**
+         * DVR报警输入个数
+         */
+        public int nAlarmInPortNum;
+        /**
+         * DVR报警输出个数
+         */
+        public int nAlarmOutPortNum;
+        /**
+         * DVR通道个数
+         */
+        public int nChanNum;
+        /**
+         * DVR类型
+         *
+         * @see DeviceType
+         */
+        public int nDVRType;
+        /**
+         * DVR硬盘个数
+         */
+        public int nDiskNum;
+        /**
+         * 当登陆失败,用户解锁剩余时间(秒数), -1表示设备未设置该参数
+         */
+        public int nLockLeftTime;
+        /**
+         * 序列号
+         */
+        public byte[] sSerialNumber = new byte[NET_SERIALNO_LEN];
+
+        @Override
+        protected List<String> getFieldOrder() {
+            return Collections.unmodifiableList(
+                    Arrays.asList("Reserved", "bReserved", "byLeftLogTimes", "byLimitLoginTime", "nAlarmInPortNum",
+                            "nAlarmOutPortNum", "nChanNum", "nDVRType", "nDiskNum", "nLockLeftTime", "sSerialNumber"));
+        }
+    }
+
+    /*******************查询设备状态*******************/
+
+    /**
+     * 获取前端设备的当前工作状态
+     *
+     * @param lLoginID CLIENT_Login或者CLIENT_LoginEx的返回值
+     * @param nType    查询信息类型
+     * @param pBuf     输出参数,用于接收查询返回的数据的缓存。根据查询类型的不同,返回数据的数据结构也不同
+     * @param nBufLen  缓存长度,单位字节
+     * @param pRetLen  输出参数,实际返回的数据长度,单位字节
+     * @param waittime 查询状态等待时间,默认1000ms
+     * @return 成功返回TRUE,失败返回FALSE
+     * @see DeviceStateType
+     */
+    boolean CLIENT_QueryDevState(NativeLong lLoginID, int nType, Pointer pBuf, int nBufLen, IntByReference pRetLen,
+                                 int waittime);
+
+    /*******************查询远程设备状态*******************/
+
+    /**
+     * 获取前端设备的当前工作状态
+     *
+     * @param lLoginID   CLIENT_Login或者CLIENT_LoginEx的返回值
+     * @param nType      查询信息类型
+     * @param nChannelID 通道号,对于单通道设备,填写为0,多通道设备填写为具体通道值,0 - n
+     * @param pBuf       输出参数,用于接收查询返回的数据的缓存。根据查询类型的不同,返回数据的数据结构也不同
+     * @param nBufLen    缓存长度,单位字节
+     * @param pRetLen    输出参数,实际返回的数据长度,单位字节
+     * @param waittime   查询状态等待时间,默认1000ms
+     * @return 成功返回TRUE,失败返回FALSE
+     * @see DeviceStateType
+     */
+    boolean CLIENT_QueryRemotDevState(NativeLong lLoginID, int nType, int nChannelID, Pointer pBuf, int nBufLen,
+                                      IntByReference pRetLen, int waittime);
+
+    /*******************人脸识别*******************/
+
+    /**
+     * 人脸识别数据库信息操作(包括添加和删除)
+     *
+     * @param lLoginID    CLIENT_Login或者CLIENT_LoginEx的返回值
+     * @param pstInParam
+     * @param pstOutParam
+     * @param nWaitTime   等待时间,默认1000ms
+     * @return 失败返回FALSE,成功返回TRUE
+     * @see NET_IN_OPERATE_FACERECONGNITIONDB
+     */
+    boolean CLIENT_OperateFaceRecognitionDB(NativeLong lLoginID, NET_IN_OPERATE_FACERECONGNITIONDB pstInParam,
+                                            NET_OUT_OPERATE_FACERECONGNITIONDB pstOutParam, int nWaitTime);
+
+    /**
+     * 查找人脸识别结果
+     *
+     * @param pstInParam  输入参数 NET_IN_DOFIND_FACERECONGNITION
+     * @param pstOutParam 输出参数 NET_OUT_DOFIND_FACERECONGNITION
+     * @param nWaitTime   等待时间
+     * @return 失败返回FALSE,成功返回TRUE
+     */
+    boolean CLIENT_DoFindFaceRecognition(final NET_IN_DOFIND_FACERECONGNITION pstInParam,
+                                         NET_OUT_DOFIND_FACERECONGNITION pstOutParam, int nWaitTime);
+
+    /**
+     * 按条件查询人脸识别结果
+     *
+     * @param lLoginID    CLIENT_Login或者CLIENT_LoginEx的返回值
+     * @param pstInParam  输入参数 NET_IN_STARTFIND_FACERECONGNITION
+     * @param pstOutParam 输出参数 NET_OUT_STARTFIND_FACERECONGNITION
+     * @param nWaitTime   等待时间
+     * @return 失败返回FALSE,成功返回TRUE
+     */
+    boolean CLIENT_StartFindFaceRecognition(NativeLong lLoginID, NET_IN_STARTFIND_FACERECONGNITION pstInParam,
+                                            NET_OUT_STARTFIND_FACERECONGNITION pstOutParam, int nWaitTime);
+
+    /**
+     * 结束人脸识别查询
+     *
+     * @param lFindHandle CLIENT_StartFindFaceRecognition的输出参数中获取
+     * @return
+     */
+    boolean CLIENT_StopFindFaceRecognition(NativeLong lFindHandle);
+
+    /**
+     * 检测人脸(输入一张大图,输出大图中被检测出来的人脸图片)
+     *
+     * @param lLoginID    CLIENT_Login或者CLIENT_LoginEx的返回值
+     * @param pstInParam  输入参数 NET_IN_DETECT_FACE
+     * @param pstOutParam 输出参数 NET_OUT_DETECT_FACE
+     * @param nWaitTime   等待时间
+     * @return 失败返回FALSE,成功返回TRUE
+     */
+    boolean CLIENT_DetectFace(NativeLong lLoginID, NET_IN_DETECT_FACE pstInParam, NET_OUT_DETECT_FACE pstOutParam,
+                              int nWaitTime);
+
+    /**
+     * CLIENT_OperateFaceRecognitionDB接口输入参数
+     */
+    class NET_IN_OPERATE_FACERECONGNITIONDB extends Structure {
+        /**
+         * 赋值为结构体大小,即sizeof(NET_IN_OPERATE_FACERECONGNITIONDB)
+         */
+        public int dwSize;
+        /**
+         * 操作类型
+         * <p>EM_OPERATE_FACERECONGNITIONDB_TYPE</p>
+         */
+        public int emOperateType;
+        /**
+         * 人员信息
+         */
+        public FACERECOGNITION_PERSON_INFO stPersonInfo;
+        /**
+         * 缓冲地址
+         */
+        public Pointer pBuffer;
+        /**
+         * 缓冲数据长度
+         */
+        public int nBufferLen;
+
+        public NET_IN_OPERATE_FACERECONGNITIONDB() {
+            this.dwSize = this.size();
+        }
+    }
+
+    /**
+     * 人员信息
+     */
+    class FACERECOGNITION_PERSON_INFO extends Structure {
+        /**
+         * 姓名
+         *
+         * @deprecated
+         */
+        public byte[] szPersonName = new byte[DH_MAX_NAME_LEN];
+        /**
+         * 出生年,作为查询条件时,此参数填0,则表示此参数无效
+         */
+        public short wYear;
+        /**
+         * 出生月,作为查询条件时,此参数填0,则表示此参数无效
+         */
+        public byte byMonth;
+        /**
+         * 出生日,作为查询条件时,此参数填0,则表示此参数无效
+         */
+        public byte byDay;
+        /**
+         * 人员唯一标示(身份证号码,工号,或其他编号)
+         */
+        public byte[] szID = new byte[DH_MAX_PERSON_ID_LEN];
+        /**
+         * 人员重要等级,1~10,数值越高越重要,作为查询条件时,此参数填0,则表示此参数无效
+         */
+        public byte bImportantRank;
+        /**
+         * 性别,1-男,2-女,作为查询条件时,此参数填0,则表示此参数无效
+         */
+        public byte bySex;
+        /**
+         * 图片张数
+         */
+        public short wFacePicNum;
+        /**
+         * 当前人员对应的图片信息
+         */
+        public DH_PIC_INFO[] szFacePicInfo = (DH_PIC_INFO[]) new DH_PIC_INFO().toArray(DH_MAX_PERSON_IMAGE_NUM);
+        /**
+         * 人员类型
+         *
+         * @see PersonType
+         */
+        public byte byType;
+        /**
+         * 证件类型
+         *
+         * @see CertificateType
+         */
+        public byte byIDType;
+        /**
+         * 字节对齐
+         */
+        public byte[] bReserved1 = new byte[2];
+        /**
+         * 省份
+         */
+        public byte[] szProvince = new byte[DH_MAX_PROVINCE_NAME_LEN];
+        /**
+         * 城市
+         */
+        public byte[] szCity = new byte[DH_MAX_CITY_NAME_LEN];
+        /**
+         * 姓名(因存在姓名过长,16字节无法存放问题,故增加此参数)
+         */
+        public byte[] szPersonNameEx = new byte[DH_MAX_PERSON_NAME_LEN];
+        /**
+         * 保留字段
+         */
+        public byte[] bReserved = new byte[60];
+    }
+
+    /**
+     * 图片文件信息
+     */
+    class DH_PIC_INFO extends Structure {
+        /**
+         * 文件在二进制数据块中的偏移位置, 单位:字节
+         */
+        public int dwOffSet;
+        /**
+         * 文件大小, 单位:字节
+         */
+        public int dwFileLenth;
+        /**
+         * 图片宽度, 单位:像素
+         */
+        public short wWidth;
+        /**
+         * 图片高度, 单位:像素
+         */
+        public short wHeight;
+        /**
+         * 保留字节
+         */
+        public byte[] bReserved = new byte[7];
+    }
+
+    /**
+     * CLIENT_OperateFaceRecognitionDB接口输出参数
+     */
+    class NET_OUT_OPERATE_FACERECONGNITIONDB extends Structure {
+        public int dwSize;
+
+        public NET_OUT_OPERATE_FACERECONGNITIONDB() {
+            this.dwSize = this.size();
+        }
+    }
+
+    /**
+     * CLIENT_DoFindFaceRecognition 接口输入参数
+     */
+    class NET_IN_DOFIND_FACERECONGNITION extends Structure {
+        public int dwSize;
+        /**
+         * 查询句柄
+         */
+        public LLong lFindHandle;
+        /**
+         * 查询起始序号
+         */
+        public int nBeginNum;
+        /**
+         * 当前想查询的记录条数
+         */
+        public int nCount;
+
+        public NET_IN_DOFIND_FACERECONGNITION() {
+            this.dwSize = this.size();
+        }
+    }
+
+    /**
+     * CLIENT_DoFindFaceRecognition接口输出参数
+     */
+    class NET_OUT_DOFIND_FACERECONGNITION extends Structure {
+        public int dwSize;
+        /**
+         * 实际返回的候选信息结构体个数
+         */
+        public int nCadidateNum;
+        /**
+         * 候选信息数组
+         */
+        public CANDIDATE_INFO[] stCadidateInfo = (CANDIDATE_INFO[]) new CANDIDATE_INFO().toArray(MAX_FIND_COUNT);
+        /**
+         * 缓冲地址
+         */
+        public Pointer pBuffer;
+        /**
+         * 缓冲数据长度
+         */
+        public int nBufferLen;
+
+        public NET_OUT_DOFIND_FACERECONGNITION() {
+            this.dwSize = this.size();
+        }
+    }
+
+    /**
+     * 候选人员信息
+     */
+    class CANDIDATE_INFO extends Structure {
+        /**
+         * 人员信息
+         */
+        public FACERECOGNITION_PERSON_INFO stPersonInfo;
+        /**
+         * 和查询图片的相似度,百分比表示,1~100
+         */
+        public byte bySimilarity;
+        /**
+         * 人员所属数据库范围
+         *
+         * @see FaceDbType
+         */
+        public byte byRange;
+        public byte[] byReserved1 = new byte[2];
+        /**
+         * 当byRange为历史数据库时有效,表示查询人员出现的时间
+         */
+        public NET_TIME stTime;
+        /**
+         * 当byRange为历史数据库时有效,表示查询人员出现的地点
+         */
+        public byte[] szAddress = new byte[MAX_PATH];
+        /**
+         * 保留字节
+         */
+        public byte[] byReserved = new byte[128];
+    }
+
+    /**
+     * 时间
+     */
+    class NET_TIME extends Structure {
+        /**
+         * 年
+         */
+        public int dwYear;
+        /**
+         * 月
+         */
+        public int dwMonth;
+        /**
+         * 日
+         */
+        public int dwDay;
+        /**
+         * 时
+         */
+        public int dwHour;
+        /**
+         * 分
+         */
+        public int dwMinute;
+        /**
+         * 秒
+         */
+        public int dwSecond;
+
+        public NET_TIME() {
+            this.dwYear = 0;
+            this.dwMonth = 0;
+            this.dwDay = 0;
+            this.dwHour = 0;
+            this.dwMinute = 0;
+            this.dwSecond = 0;
+        }
+
+        public void setTime(int year, int month, int day, int hour, int minute, int second) {
+            this.dwYear = year;
+            this.dwMonth = month;
+            this.dwDay = day;
+            this.dwHour = hour;
+            this.dwMinute = minute;
+            this.dwSecond = second;
+        }
+
+        public NET_TIME(NET_TIME other) {
+            this.dwYear = other.dwYear;
+            this.dwMonth = other.dwMonth;
+            this.dwDay = other.dwDay;
+            this.dwHour = other.dwHour;
+            this.dwMinute = other.dwMinute;
+            this.dwSecond = other.dwSecond;
+        }
+
+        public String toStringTime() {
+            return String.format("%02d/%02d/%02d %02d:%02d:%02d", dwYear, dwMonth, dwDay, dwHour, dwMinute, dwSecond);
+        }
+
+        @Override
+        public String toString() {
+            return String.format("%02d%02d%02d%02d%02d%02d", dwYear, dwMonth, dwDay, dwHour, dwMinute, dwSecond);
+        }
+    }
+
+    /**
+     * CLIENT_StartFindFaceRecognition接口输入参数
+     */
+    class NET_IN_STARTFIND_FACERECONGNITION extends Structure {
+        public int dwSize;
+        /**
+         * 人员信息查询条件是否有效,取值0或1
+         */
+        public int bPersonEnable;
+        /**
+         * 人员信息查询条件
+         */
+        public FACERECOGNITION_PERSON_INFO stPerson;
+        /**
+         * 人脸匹配选项
+         */
+        public NET_FACE_MATCH_OPTIONS stMatchOptions;
+        /**
+         * 查询过滤条件
+         */
+        public NET_FACE_FILTER_CONDTION stFilterInfo;
+        /**
+         * 缓冲地址
+         */
+        public Pointer pBuffer;
+        /**
+         * 缓冲数据长度
+         */
+        public int nBufferLen;
+
+        public NET_IN_STARTFIND_FACERECONGNITION() {
+            this.dwSize = this.size();
+        }
+    }
+
+    /**
+     * 人脸匹配选项
+     */
+    class NET_FACE_MATCH_OPTIONS extends Structure {
+        public int dwSize;
+        /**
+         * 人员重要等级 1~10,数值越高越重要,(查询重要等级大于等于此等级的人员)
+         */
+        public int nMatchImportant;
+        /**
+         * 人脸比对模式
+         *
+         * @see FaceCompareMode
+         */
+        public int emMode;
+        /**
+         * 人脸区域个数
+         */
+        public int nAreaNum;
+        /**
+         * 人脸区域组合, emMode为NET_FACE_COMPARE_MODE_AREA时有效, 数组元素取FaceArea中的值
+         *
+         * @see FaceAreaType
+         */
+        public int[] szAreas = new int[MAX_FACE_AREA_NUM];
+        /**
+         * 识别精度(取值1~10,随着值增大,检测精度提高,检测速度下降。最小值为1 表示检测速度优先,最大值为10表示检测精度优先。 暂时只对人脸检测有效)
+         */
+        public int nAccuracy;
+        /**
+         * 相似度(必须大于该相识度才报告;百分比表示,1~100)
+         */
+        public int nSimilarity;
+        /**
+         * 报告的最大候选个数(根据相似度进行排序,取相似度最大的候选人数报告)
+         */
+        public int nMaxCandidate;
+
+        public NET_FACE_MATCH_OPTIONS() {
+            this.dwSize = this.size();
+        }
+    }
+
+    /**
+     * 查询过滤条件
+     */
+    class NET_FACE_FILTER_CONDTION extends Structure {
+        public int dwSize;
+        /**
+         * 开始时间
+         */
+        public NET_TIME stStartTime;
+        /**
+         * 结束时间
+         */
+        public NET_TIME stEndTime;
+        /**
+         * 地点,支持模糊匹配
+         */
+        public byte[] szMachineAddress = new byte[MAX_PATH];
+        /**
+         * 实际数据库个数
+         */
+        public int nRangeNum;
+        /**
+         * 待查询数据库类型
+         *
+         * @see FaceDbType
+         */
+        public byte[] szRange = new byte[MAX_FACE_DB_NUM];
+        /**
+         * 待查询人脸类型
+         *
+         * @see FaceRecognitionFaceType
+         */
+        public int emFaceType;
+
+        public NET_FACE_FILTER_CONDTION() {
+            this.dwSize = this.size();
+        }
+    }
+
+    /**
+     * CLIENT_StartFindFaceRecognition接口输出参数
+     */
+    class NET_OUT_STARTFIND_FACERECONGNITION extends Structure {
+        public int dwSize;
+        /**
+         * 返回的符合查询条件的记录个数
+         */
+        public int nTotalCount;
+        /**
+         * 查询句柄
+         */
+        public LLong lFindHandle;
+
+        public NET_OUT_STARTFIND_FACERECONGNITION() {
+            this.dwSize = this.size();
+        }
+    }
+
+    /**
+     * CLIENT_DetectFace接口输入参数
+     */
+    class NET_IN_DETECT_FACE extends Structure {
+        public int dwSize;
+        /**
+         * 大图信息
+         */
+        public DH_PIC_INFO stPicInfo;
+        /**
+         * 缓冲地址
+         */
+        public Pointer pBuffer;
+        /**
+         * 缓冲数据长度
+         */
+        public int nBufferLen;
+
+        public NET_IN_DETECT_FACE() {
+            this.dwSize = this.size();
+        }
+    }
+
+    /**
+     * CLIENT_DetectFace接口输出参数
+     */
+    class NET_OUT_DETECT_FACE extends Structure {
+        public int dwSize;
+        /**
+         * 检测出的人脸图片信息,由用户申请空间
+         */
+        public Pointer pPicInfo;
+        /**
+         * 最大人脸图片信息个数
+         */
+        public int nMaxPicNum;
+        /**
+         * 实际返回的人脸图片个数
+         */
+        public int nRetPicNum;
+        /**
+         * 缓冲地址,由用户申请空间,存放检测出的人脸图片数据
+         */
+        public Pointer pBuffer;
+        /**
+         * 缓冲数据长度
+         */
+        public int nBufferLen;
+
+        public NET_OUT_DETECT_FACE() {
+            this.dwSize = this.size();
+        }
+    }
+
+    /*******************回调*******************/
+
+    /**
+     * 断线回调
+     */
+    interface fDisConnect extends StdCallCallback {
+        /**
+         * @param lLoginID CLIENT_LoginEx2的返回值
+         * @param pchDVRIP 设备IP
+         * @param nDVRPort 设备端口
+         * @param dwUser   用户数据
+         */
+        void invoke(NativeLong lLoginID, String pchDVRIP, int nDVRPort, NativeLong dwUser);
+    }
+
+    /**
+     * 断线后重连回调
+     */
+    interface fHaveReConnect extends StdCallCallback {
+        /**
+         * @param lLoginID CLIENT_LoginEx2的返回值
+         * @param pchDVRIP 设备IP
+         * @param nDVRPort 设备端口
+         * @param dwUser   用户数据
+         */
+        void invoke(NativeLong lLoginID, String pchDVRIP, int nDVRPort, NativeLong dwUser);
+    }
+
+    /*******************用户管理*******************/
+    /**
+     * 设置用户信息
+     *
+     * @param lLoginID     登陆句柄,CLIENT_Login的返回值
+     * @param nOperateType 操作类型
+     * @param opParam      设置用户信息的输入缓冲,具体见上面nOperateType说明
+     * @param subParam     设置用户信息的辅助输入缓冲,当设置类型为修改信息的时候,此处应传进来部分原始用户信息,具体见上面nOperateType说明
+     * @param waittime     等待时间
+     * @return
+     * @see OperateType
+     */
+    boolean CLIENT_OperateUserInfoEx(NativeLong lLoginID, int nOperateType, Pointer opParam, Pointer subParam, int waittime);
+}

+ 45 - 0
src/main/java/com/usoftchina/ss/dahua/lib/OperateType.java

@@ -0,0 +1,45 @@
+package com.usoftchina.ss.dahua.lib;
+
+/**
+ * 操作类型
+ *
+ * @author yingp
+ * @date 2019/2/27
+ */
+public class OperateType {
+    /**
+     * 增加用户组
+     * <p>USER_GROUP_INFO_EX</p>
+     */
+    public static final int USER_GROUP_ADD = 0;
+    /**
+     * 删除用户组
+     * <p>USER_GROUP_INFO_EX</p>
+     */
+    public static final int USER_GROUP_DELETE = 1;
+    /**
+     * 修改用户组
+     * <p>USER_GROUP_INFO_EX</p>
+     */
+    public static final int USER_GROUP_MODIFY = 2;
+    /**
+     * 增加用户
+     * <p>USER_INFO_EX</p>
+     */
+    public static final int USER_ADD = 3;
+    /**
+     * 删除用户
+     * <p>USER_INFO_EX</p>
+     */
+    public static final int USER_DELETE = 4;
+    /**
+     * 修改用户
+     * <p>USER_INFO_EX</p>
+     */
+    public static final int USER_MODIFY = 5;
+    /**
+     * 修改用户密码
+     * <p>USER_INFO_EX</p>
+     */
+    public static final int USER_MODIFY_PASSWORD = 6;
+}

+ 19 - 0
src/main/java/com/usoftchina/ss/dahua/lib/PersonType.java

@@ -0,0 +1,19 @@
+package com.usoftchina.ss.dahua.lib;
+
+/**
+ * 人员类型
+ *
+ * @author yingp
+ * @date 2019/2/15
+ */
+public class PersonType {
+    public static final int PERSON_TYPE_UNKNOWN = 0;
+    /**
+     * 普通人员
+     */
+    public static final int PERSON_TYPE_NORMAL = 1;
+    /**
+     * 嫌疑人员
+     */
+    public static final int PERSON_TYPE_SUSPICION = 2;
+}

+ 1 - 0
src/main/java/com/usoftchina/ss/dahua/package-info.java

@@ -0,0 +1 @@
+package com.usoftchina.ss.dahua;

BIN
src/main/resources/H264Parser.dll


BIN
src/main/resources/HWDec.dll


BIN
src/main/resources/HevcParser.dll


BIN
src/main/resources/Infra.dll


BIN
src/main/resources/IvsDrawer.dll


BIN
src/main/resources/Json.dll


BIN
src/main/resources/NetFramework.dll


BIN
src/main/resources/Stream.dll


BIN
src/main/resources/StreamSvr.dll


BIN
src/main/resources/aacdec.dll


BIN
src/main/resources/adpcmdec.dll


BIN
src/main/resources/amrdec.dll


BIN
src/main/resources/avnetsdk.dll


BIN
src/main/resources/dhconfigsdk.dll


BIN
src/main/resources/dhconfigsdk.lib


BIN
src/main/resources/dhnetsdk.dll


BIN
src/main/resources/dhnetsdk.lib


BIN
src/main/resources/dhplay.dll


BIN
src/main/resources/fisheye.dll


BIN
src/main/resources/g7221dec.dll


BIN
src/main/resources/g729dec.dll


BIN
src/main/resources/h264dec.dll


BIN
src/main/resources/h26ldec.dll


BIN
src/main/resources/hevcdec.dll


BIN
src/main/resources/mjpegdec.dll


BIN
src/main/resources/mp2dec.dll


BIN
src/main/resources/mp3dec.dll


BIN
src/main/resources/mpeg4dec.dll


BIN
src/main/resources/postproc.dll


BIN
src/main/resources/svac_dec.dll


BIN
src/main/resources/swscale.dll


+ 23 - 0
src/test/java/com/usoftchina/ss/dahua/Main.java

@@ -0,0 +1,23 @@
+package com.usoftchina.ss.dahua;
+
+import com.usoftchina.ss.dahua.lib.INetSdk;
+
+/**
+ * @author yingp
+ * @date 2019/2/15
+ */
+public class Main {
+    public static void main(String[] args) {
+        INetSdk sdk = new INetSdk();
+        sdk.init();
+        try {
+            sdk.login("10.1.80.208", 37777, "admin", "A12345678");
+        } finally {
+            try {
+                sdk.logout();
+            } finally {
+                sdk.cleanup();
+            }
+        }
+    }
+}