-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTest.java
More file actions
23 lines (20 loc) · 706 Bytes
/
Test.java
File metadata and controls
23 lines (20 loc) · 706 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import fang.device.DeviceMsgQueue;
import fang.device.DeviceRepo;
import fang.device.DeviceService;
public class Test {
public static void main(String[] args) throws InterruptedException {
//test DeviceMsg Decode function
// DeviceMsg deviceMsg = new DeviceMsg();
// String msg = "hdu12345&pm25:100,temperature:14,humidity:24";
// if(!deviceMsg.decode(msg))
// System.out.println("failed decode");
// System.out.println("decode success");
// deviceMsg.toString();
DeviceService.getInstance().startService();
while(true){
Thread.sleep(2000);
System.out.println("MsgQ:"+DeviceMsgQueue.getInstance().size());
System.out.println("Repo:"+DeviceRepo.getInstance().size());
}
}
}