houzhongjian
2024-11-06 7412dd652c0ac48c5a17b5d9b61d5d2a0f686137
提交 | 用户 | 时间
149dd0 1 package com.iailab.netsdk.lib.structure;
H 2 /**
3  * @author 47081
4  * @desc
5  * @version 1.0.0
6  * @date 2021/4/9
7  */
8 import com.iailab.netsdk.lib.NetSDKLib;
9 import com.sun.jna.ptr.IntByReference;
10
11 import java.util.Arrays;
12
7412dd 13 import static com.iailab.netsdk.lib.NetSDKLib.MAX_REC_TSECT;
H 14 import static com.iailab.netsdk.lib.constant.SDKStructureFieldLenth.*;
149dd0 15
H 16 /**
17  * @author 47081
18  * @description 动态监测报警配置,对应接口 {@link
7412dd 19  *     com.iailab.netsdk.lib.NetSDKLib#CLIENT_GetNewDevConfig(NetSDKLib.LLong, String, int, byte[], int,
149dd0 20  *     IntByReference, int)}和{@link NetSDKLib#CLIENT_SetNewDevConfig(NetSDKLib.LLong, String, int,
H 21  *     byte[], int, IntByReference, IntByReference, int)}
22  * @date 2021/4/9
23  * @version 1.0
24  */
25 public class CFG_MOTION_INFO extends NetSDKLib.SdkStructure {
26   /** 报警通道号(0开始), nVersion=1时,此字段无效 */
27   public int nChannelID;
28   /** 使能开关 */
29   public int bEnable;
30   /** 一代动检灵敏度1~6 */
31   public int nSenseLevel;
32   /** 一代动态检测区域的行数 */
33   public int nMotionRow;
34   /** 一代动态检测区域的列数 */
35   public int nMotionCol;
36   /** 一代检测区域,最多32*32块区域 */
37   public BYTE_32[] byRegion = new BYTE_32[MAX_MOTION_ROW];
38   /** 报警联动 */
39   public NetSDKLib.CFG_ALARM_MSG_HANDLE stuEventHandler=new NetSDKLib.CFG_ALARM_MSG_HANDLE();
40   /** 事件响应时间段,时间段获取和设置以此成员为准,忽略 stuEventHandler 中的stuTimeSection */
41   public NetSDKLib.CFG_TIME_SECTION[] stuTimeSection =
42           new NetSDKLib.CFG_TIME_SECTION[WEEK_DAY_NUM * MAX_REC_TSECT];
43   /** 0, 1, 由能力集确定, 只读, 等于1时以下字段有效 */
44   public int nVersion;
45   /** 只读,决定nSenseLevel是否有效 */
46   public int bSenseLevelEn;
47   /** 只读,面积占用比使能, 决定nVolumeRatio是否有效 */
48   public int bVRatioEn;
49   /** 一代动检的面积占用比,1-100 */
50   public int nVolumeRatio;
51   /** 只读,灵敏度使能,决定nSubRatio值是否有效 */
52   public int bSRatioEn;
53   /** 一代动检的残差阈值, 1-100 */
54   public int nSubRatio;
55   /** 此字段及以下两个字段已废弃 */
56   public int abWindow;
57   /** 视频窗口个数 */
58   @Deprecated public int nWindowCount;
59   /** 视频窗口数组 */
60   @Deprecated
61   public CFG_MOTION_WINDOW[] stuWindows = new CFG_MOTION_WINDOW[MAX_MOTION_WINDOW];
62   /** 只读, 1:nRegionCount,stuRegion有效 0:nMotionRow,nMotionCol,byRegion有效 */
63   public int abDetectRegion;
64   /** 三代动态检测区域个数 */
65   public int nRegionCount;
66   /** 三代动态检测区域 */
67   public CFG_DETECT_REGION[] stuRegion =
68     new CFG_DETECT_REGION[MAX_MOTION_WINDOW];
69   /** 前端动态检测联动 */
70   public NetSDKLib.CFG_ALARM_MSG_HANDLE stuRemoteEventHandler=new NetSDKLib.CFG_ALARM_MSG_HANDLE();
71   /** 前端动态检测联动, 事件响应时间段,时间段获取和设置以此成员为准,忽略 stuRemoteEventHandler中的stuTimeSection */
72   public NetSDKLib.CFG_TIME_SECTION[] stuRemoteTimeSection =
73           new NetSDKLib.CFG_TIME_SECTION[WEEK_DAY_NUM * MAX_REC_TSECT];
74
75   @Override
76   public String toString() {
77     return "CFG_MOTION_INFO{" +
78             "nChannelID=" + nChannelID +
79             ", bEnable=" + bEnable +
80             ", nSenseLevel=" + nSenseLevel +
81             ", nMotionRow=" + nMotionRow +
82             ", nMotionCol=" + nMotionCol +
83             ", byRegion=" + Arrays.toString(byRegion) +
84             ", stuEventHandler=" + stuEventHandler +
85             ", stuTimeSection=" + Arrays.toString(stuTimeSection) +
86             ", nVersion=" + nVersion +
87             ", bSenseLevelEn=" + bSenseLevelEn +
88             ", bVRatioEn=" + bVRatioEn +
89             ", nVolumeRatio=" + nVolumeRatio +
90             ", bSRatioEn=" + bSRatioEn +
91             ", nSubRatio=" + nSubRatio +
92             ", abWindow=" + abWindow +
93             ", nWindowCount=" + nWindowCount +
94             ", stuWindows=" + Arrays.toString(stuWindows) +
95             ", abDetectRegion=" + abDetectRegion +
96             ", nRegionCount=" + nRegionCount +
97             ", stuRegion=" + Arrays.toString(stuRegion) +
98             ", stuRemoteEventHandler=" + stuRemoteEventHandler +
99             ", stuRemoteTimeSection=" + Arrays.toString(stuRemoteTimeSection) +
100             '}';
101   }
102       public  CFG_MOTION_INFO(){
103             for(int i=0;i<byRegion.length;i++){
104               byRegion[i]=new BYTE_32();
105             }
106
107
108             for(int i=0;i<stuTimeSection.length;i++){
109               stuTimeSection[i]=new  NetSDKLib.CFG_TIME_SECTION();
110             }
111
112             for(int i=0;i<stuWindows.length;i++){
113               stuWindows[i]=new CFG_MOTION_WINDOW();
114             }
115
116             for(int i=0;i<stuRegion.length;i++){
117               stuRegion[i]= new  CFG_DETECT_REGION();
118             }
119             for(int i=0;i<stuRemoteTimeSection.length;i++){
120               stuRemoteTimeSection[i]=new NetSDKLib.CFG_TIME_SECTION();
121             }
122
123       }
124
125 }