|
@@ -65,6 +65,14 @@ public class DeJuRFIDService implements IService {
|
|
|
close(hardware);
|
|
close(hardware);
|
|
|
open(hardware);
|
|
open(hardware);
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ MsgBaseSetBaseband msgBaseSetBaseband = setSession(hardware, client);
|
|
|
|
|
+ if (0 != msgBaseSetBaseband.getRtCode()) {
|
|
|
|
|
+ log.error("Session epc error.");
|
|
|
|
|
+ reset(client);
|
|
|
|
|
+ close(hardware);
|
|
|
|
|
+ open(hardware);
|
|
|
|
|
+ }
|
|
|
} else {
|
|
} else {
|
|
|
throw new ServiceException("Connect failure.");
|
|
throw new ServiceException("Connect failure.");
|
|
|
}
|
|
}
|
|
@@ -115,6 +123,17 @@ public class DeJuRFIDService implements IService {
|
|
|
return msgBaseSetPower;
|
|
return msgBaseSetPower;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ public static MsgBaseSetBaseband setSession(RemoteLabHardware hardware, GClient client){
|
|
|
|
|
+ MsgBaseGetBaseband msgBaseGetBaseband=new MsgBaseGetBaseband();
|
|
|
|
|
+ MsgBaseSetBaseband msgBaseSetBaseband=new MsgBaseSetBaseband();
|
|
|
|
|
+ client.sendSynMsg(msgBaseGetBaseband);
|
|
|
|
|
+ if (0==msgBaseGetBaseband.getRtCode()){
|
|
|
|
|
+ msgBaseSetBaseband.setSession(hardware.getSessionIndex());
|
|
|
|
|
+ client.sendSynMsg(msgBaseSetBaseband);
|
|
|
|
|
+ }
|
|
|
|
|
+ return msgBaseSetBaseband;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
public static void reset(GClient client) {
|
|
public static void reset(GClient client) {
|
|
|
MsgAppReset msgAppReset = new MsgAppReset();
|
|
MsgAppReset msgAppReset = new MsgAppReset();
|
|
|
client.sendSynMsg(msgAppReset);
|
|
client.sendSynMsg(msgAppReset);
|