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();
|
}
|
|
}
|
}
|