|
|
@ -4,6 +4,7 @@ import com.iflytop.digester.underframework.dao.model.UfMdbActuatorCmd; |
|
|
|
import com.iflytop.digester.underframework.dao.record.UfActiveRecord; |
|
|
|
import com.iflytop.digester.underframework.util.TsByteBuffer; |
|
|
|
import com.iflytop.digester.underframework.util.UfClassHelper; |
|
|
|
import com.iflytop.digester.underframework.util.UfCommon; |
|
|
|
import org.java_websocket.client.WebSocketClient; |
|
|
|
import org.java_websocket.handshake.ServerHandshake; |
|
|
|
import java.net.URI; |
|
|
@ -67,6 +68,8 @@ public class UfZcancmderWebsocket extends UfConnectionBase { |
|
|
|
|
|
|
|
@Override |
|
|
|
synchronized public String execute(UfMdbActuatorCmd command) { |
|
|
|
UfCommon.delay(20); // 先延时个20ms,测试一下会不会死掉 |
|
|
|
|
|
|
|
var parts = command.cmdKey.split("_"); |
|
|
|
for (int i = 0; i < parts.length; i++) { |
|
|
|
parts[i] = parts[i].substring(0, 1).toUpperCase() + parts[i].substring(1); |
|
|
@ -157,7 +160,8 @@ public class UfZcancmderWebsocket extends UfConnectionBase { |
|
|
|
String cmd = this.buildCommand(actuatorCmd); |
|
|
|
|
|
|
|
UfMdbActuator actuator = UfMdbActuator.findOne(UfMdbActuator.class, actuatorCmd.actuatorId); |
|
|
|
LOG.info(" [Command-Executor:{}] {}({}) => {}", actuator.name, actuatorCmd.cmdKey, actuatorCmd.parameters, cmd); |
|
|
|
this.log("%s.%s(%s) => %s", actuator.name, actuatorCmd.cmdKey, actuatorCmd.parameters, cmd); |
|
|
|
|
|
|
|
this.reconnectIfClosed(); |
|
|
|
|
|
|
|
TimerTask task = new TimerTask() { |
|
|
|