|
@@ -1,6 +1,7 @@
|
|
|
package com.its.cctv.entity;
|
|
|
|
|
|
import com.its.app.utils.SysUtils;
|
|
|
+import com.its.cctv.config.DebugConfig;
|
|
|
import com.its.cctv.domain.NET;
|
|
|
import com.its.cctv.xnettcp.cctv.handler.CctvTcpClientIdleHandler;
|
|
|
import com.its.cctv.xnettcp.cctv.protocol.CctvProtocol;
|
|
@@ -22,6 +23,7 @@ import java.nio.ByteBuffer;
|
|
|
@Setter
|
|
|
@ToString
|
|
|
public class TbCctvCtlr {
|
|
|
+ private DebugConfig debugConfig;
|
|
|
private int index;
|
|
|
private String CCTV_CTLR_NMBR;
|
|
|
private String CCTV_CTLR_ID;
|
|
@@ -65,6 +67,7 @@ public class TbCctvCtlr {
|
|
|
}
|
|
|
|
|
|
public TbCctvCtlr() {
|
|
|
+ this.debugConfig = null;
|
|
|
this.stts = new TbCctvCtlrStts();
|
|
|
this.psetVal = new CctvPresetValue();
|
|
|
this.paramVal = new CctvParamValue();
|
|
@@ -78,7 +81,7 @@ public class TbCctvCtlr {
|
|
|
initNet();
|
|
|
}
|
|
|
|
|
|
- public String getLogKey() {
|
|
|
+ public String getLogKey() {
|
|
|
return this.CCTV_CTLR_ID;
|
|
|
}
|
|
|
|
|
@@ -167,7 +170,13 @@ public class TbCctvCtlr {
|
|
|
f.awaitUninterruptibly();
|
|
|
if (f.isDone() || f.isSuccess()) {
|
|
|
result = true;
|
|
|
- log.info("[{}]. sendData: OK. {}, {} Bytes.", this.CCTV_CTLR_ID, packetDesc, sendBuffer.array().length);
|
|
|
+ if (this.debugConfig != null && this.debugConfig.isSttsLog()) {
|
|
|
+ log.info("[{}]. sendData: OK. {}, {} Bytes.", this.CCTV_CTLR_ID, packetDesc, sendBuffer.array().length);
|
|
|
+ } else {
|
|
|
+ if (packetDesc != null && packetDesc.contains("cctv_Ptz")) {
|
|
|
+ log.info("[{}]. sendData: OK. {}, {} Bytes.", this.CCTV_CTLR_ID, packetDesc, sendBuffer.array().length);
|
|
|
+ }
|
|
|
+ }
|
|
|
if (delayMilliSeconds > 0) {
|
|
|
CctvProtocol.sleep(delayMilliSeconds);
|
|
|
}
|