1
zhanghua
2024-09-28 d385d4d35e20d7b24bc6a00cac20c5fd5374c2d8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
package com.dahua.netsdk.lib.callback.securityCheck;
 
 
import com.dahua.netsdk.lib.NetSDKLib;
import com.dahua.netsdk.lib.ToolKits;
import com.dahua.netsdk.lib.structure.NET_POPULATION_STATISTICS_INFO;
import com.sun.jna.Pointer;
 
/**
 * @author 291189
 * @version 1.0
 * @description    人数变化信息回调函数
 * @date 2021/7/5
 */
public class NotifyPopulationStatisticsInfoCallBack implements fNotifyPopulationStatisticsInfo{
 
 
    public static NotifyPopulationStatisticsInfoCallBack singleton;
 
    private NotifyPopulationStatisticsInfoCallBack(){
    }
 
    public static NotifyPopulationStatisticsInfoCallBack getInstance(){
        if(singleton==null){
                    singleton=new NotifyPopulationStatisticsInfoCallBack();
                    return singleton;
        }
        return singleton;
    }
 
 
 
    @Override
    public void invoke(NetSDKLib.LLong lPopulationStatisticsHandle, Pointer pstuPopulationStatisticsInfos, Pointer dwUser) {
 
   //     NET_POPULATION_STATISTICS_INFO*
 
        NET_POPULATION_STATISTICS_INFO     msg  = new NET_POPULATION_STATISTICS_INFO();
 
        ToolKits.GetPointerData(pstuPopulationStatisticsInfos, msg);
 
        int nPassPopulation = msg.nPassPopulation; // 正向通过人数
 
        System.out.println("正向通过人数:"+nPassPopulation);
 
        int nMetalAlarmPopulation = msg.nMetalAlarmPopulation;
 
        System.out.println("正向触发金属报警人数:"+nMetalAlarmPopulation);
 
        int nReversePassPopulation = msg.nReversePassPopulation;
 
        System.out.println("反向通过人数:"+nReversePassPopulation);
 
        int nReverseMetalAlarmPopulation = msg.nReverseMetalAlarmPopulation;
 
        System.out.println("反向触发金属报警人数:"+nReverseMetalAlarmPopulation);
 
        long nTempNormalPopulation = msg.nTempNormalPopulation;
 
        System.out.println("体温正常人数:"+nTempNormalPopulation);
 
        long nTempAlarmPopulation = msg.nTempAlarmPopulation;
 
        System.out.println("体温异常人数:"+nTempAlarmPopulation);
    }
}