zsh_root
2024-01-02 7b595546af704983dbafcd0d385c8768ddacefc2
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
package BaoWen;
import DataBase.DatabaseManagement;
import person.Person;
import person.person_Dell;
import tag.Tag_Dell;
public class Dell_display {    
    static String[] dis;
    /**
     * Î»Öñ¨ÎÄ
     * display,[lenth],[tagid],[baoxu],[timestamp],[layer],[x],[y],[z], [vbat],[state],[sos],[mark]
     * Ê¾Àý£º
     * display,64,2012,70,2020-12-14 13:08:33.479,0,648,367,150,32,0,0,1
     * ËµÃ÷£º
     * 1    display:°üÍ·
     * 2    [length]£º±¨Îij¤¶È
     * 3    [tagid] £º±êÇ©µÄIDºÅ£¬Î¨Ò»±àºÅ
     * 4    [baoxu] £º°üÐò£¨0~255Ñ­»·£©
     * 5    [timestamp] £ºÊ±¼ä´Á£¨ÕâÌõ±¨ÎÄ·¢³öµÄʱ¼ä£©
     * 6    [layer] £º±êÇ©ËùÔڵIJã
     * 7    [x] £º±êÇ©µÄX×ø±ê£¬µ¥Î»ÀåÃ×
     * 8    [y] £º±êÇ©µÄY×ø±ê£¬µ¥Î»ÀåÃ×
     * 9    [z] £º±êÇ©µÄZ×ø±ê£¬µ¥Î»ÀåÃ×
     * 10    [vbat] £º±êÇ©µÄµçÁ¿ÐÅÏ¢£¬£¨0~100£©
     * 11    [state] £º±êÇ©µÄ״̬£¬¾²Ö¹Îª1£¬Ô˶¯Îª0
     * 12    [sos] £º±êÇ©µÄSOS°´¼ü״̬£¬°´ÏÂΪ1£¬Ã»Óа´ÏÂΪ0
     * 13    [mark] £º±ê־λ£¬Çø±ð´ÓÄĸöÒýÇæÉÏ´«Êý¾Ý£¬ÊÊÓÃÓÚ¶à¸öÏîÄ¿´«ÈëÒ»¸öƽ̨£¬Ä¬ÈÏΪ0**/
    @SuppressWarnings("unused")
 
    public static  void display(String message) {
        dis=message.split(",");//±êÇ©ID        
        String tagid=dis[2].toUpperCase();//±êÇ©ID        
        String baoxu=dis[3];//°üÐò
        String timestamp=dis[4];//ʱ¼ä´Á        
        String floor=dis[5];//²ã        
        String posx=dis[6];//X×ø±ê
        String posy=dis[7];//y×ø±ê
        String posz=dis[8];//z×ø±ê
        String vbat=dis[9];//µçÁ¿
        String imustate=dis[10];//±êǩ״̬IMU´«¸ÐÆ÷״̬
        String sos=dis[11];//µçÁ¿
        String mark=dis[12];//±êÖ¾        
        int x=Integer.parseInt(posx);
        int y=Integer.parseInt(posy);
        int z=Integer.parseInt(posz);
        int c=Integer.parseInt(floor);
        int imu=Integer.parseInt(imustate);
 
        if(Tag_Dell.get_tag(tagid) ==null) {
            Tag_Dell.add_tag(tagid,"δ°ó¶¨",posz,"1000", "1",0,"",3);
        }
        Person person= person_Dell.get_Person(tagid);
        if(person !=null ) {
            AA0CToJNA.dell_xyz(person,baoxu, tagid,timestamp,vbat, sos,1, x, y, z, c,imu,z);
        }
    }
 
 
    /**ÓÃÓÚ¸øtb_personÊý¾Ý¿âÿ¸ô100ºÁÃë¸üÐÂλÖÃÊý¾Ý*/
    public static void gengxin_tb_person_xyz_power() {
        int size=person_Dell.getPerson_vector().size();
        for(int i=0;i<size;i++) {
            Person prs=person_Dell.getPerson_vector().get(i);
            String p_x=String.valueOf(prs.getP_x());
            String p_y=String.valueOf(prs.getP_y());
            String p_floor=prs.getP_floor();
            String p_power=prs.getP_power();
            String p_sos=prs.getP_sos();
            String p_addtiem=prs.getP_addtiem();
            String p_tagid=prs.getP_tagid();
            String[]  ziduan= {
                    "p_x",
                    "p_y",     
                    "p_floor",
                    "p_power",
                    "p_sos",
                    "p_addtiem",
            "p_tagid"};
 
            String[] zhi= {
                    p_x,
                    p_y,     
                    p_floor,
                    p_power,
                    p_sos,
                    p_addtiem,
                    p_tagid};
            DatabaseManagement.fast_alert_dbase("tb_person", ziduan, zhi);
        }
 
    }
}