|
|
@@ -68,30 +68,18 @@ public class DeJuRFIDService implements IService {
|
|
|
log.info("Power configuration successful.");
|
|
|
} else {
|
|
|
log.info("Power configuration error.");
|
|
|
- stopScanner(client);
|
|
|
+ reset(client);
|
|
|
disconnect(hardware);
|
|
|
start(hardware);
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
|
log.info("Power configuration error.");
|
|
|
- stopScanner(client);
|
|
|
+ reset(client);
|
|
|
disconnect(hardware);
|
|
|
start(hardware);
|
|
|
}
|
|
|
|
|
|
- //蜂鸣器设置
|
|
|
-// MsgAppSetBeep msgAppSetBeep = new MsgAppSetBeep();
|
|
|
-// msgAppSetBeep.setBeepMode(hardware.getSessionIndex() > 1 ? 1 : 0);
|
|
|
-// msgAppSetBeep.setBeepStatus(1);
|
|
|
-// client.sendSynMsg(msgAppSetBeep);
|
|
|
-//
|
|
|
-// if (0 == msgAppSetBeep.getRtCode()) {
|
|
|
-// log.info("Beep epc successful.");
|
|
|
-// } else {
|
|
|
-// log.info("Beep epc error.");
|
|
|
-// }
|
|
|
-
|
|
|
//天线读卡, 读取EPC数据区以及TID数据区
|
|
|
MsgBaseInventoryEpc msgBaseInventoryEpc = new MsgBaseInventoryEpc();
|
|
|
switch (hardware.getChannels()) {
|
|
|
@@ -115,7 +103,7 @@ public class DeJuRFIDService implements IService {
|
|
|
log.info("Inventory epc successful.");
|
|
|
} else {
|
|
|
log.info("Inventory epc error.");
|
|
|
- stopScanner(client);
|
|
|
+ reset(client);
|
|
|
disconnect(hardware);
|
|
|
start(hardware);
|
|
|
}
|
|
|
@@ -124,6 +112,15 @@ public class DeJuRFIDService implements IService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ public void reset(GClient client){
|
|
|
+ MsgAppReset msgAppReset=new MsgAppReset();
|
|
|
+ client.sendSynMsg(msgAppReset);
|
|
|
+ if (0 == msgAppReset.getRtCode()) {
|
|
|
+ log.info("Reset epc successful.");
|
|
|
+ } else {
|
|
|
+ log.info("Reset epc error.");
|
|
|
+ }
|
|
|
+ }
|
|
|
public void stopScanner(GClient client){
|
|
|
MsgBaseStop msgBaseStop=new MsgBaseStop();
|
|
|
client.sendSynMsg(msgBaseStop);
|
|
|
@@ -200,7 +197,6 @@ public class DeJuRFIDService implements IService {
|
|
|
sendService.send(tag);
|
|
|
}
|
|
|
};
|
|
|
-
|
|
|
client.onTagEpcOver = (s, logBaseEpcOver) -> log.info("HandlerTagEpcOver");
|
|
|
}
|
|
|
}
|