yangys
2024-01-29 3ef1c88e46ba88f46e70377b158062096dd286e0
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
package com.qianwen.mdc.service.focas;
 
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
 
import com.alibaba.fastjson.JSONObject;
import com.sun.jna.Native;
import com.sun.jna.ptr.ShortByReference;
@Disabled
public class FocasClientTest {
    public static String IP = "192.168.1.8";
    public static short port = 8193;
    @Test
    public void testReadState() {
        ShortByReference flibHndl = new ShortByReference();
        
        FocasClient c = new FocasClient();
        c.setIp(IP);
        c.setPort(port);
        try {
            int result =  c.connect();
            JSONObject stateObj = c.readState();
            //System.out.print("result="+result);
            System.out.print(stateObj);
        } catch (Exception e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }finally {
            c.disconnect();
        }
        
    }
}