fix: 日志文件乱码修复日志配置,修复读取信号转换异常
This commit is contained in:
@@ -138,6 +138,9 @@ public class ItemProtocol {
|
|||||||
setIsonline(true);
|
setIsonline(true);
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
if (item_mode.equals(protocol)) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -260,7 +260,7 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme
|
|||||||
last_inst_message = inst_message;
|
last_inst_message = inst_message;
|
||||||
if ("true".equals(this.device.getExtraValue().get("ship_device_update"))) {
|
if ("true".equals(this.device.getExtraValue().get("ship_device_update"))) {
|
||||||
this.requiresShipDeviceUpdate = false;
|
this.requiresShipDeviceUpdate = false;
|
||||||
if (mode > 0) {
|
if (mode >= 0) {
|
||||||
shipDeviceUpdate();
|
shipDeviceUpdate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -150,13 +150,13 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
|
|||||||
/**
|
/**
|
||||||
* 下发目标站
|
* 下发目标站
|
||||||
*/
|
*/
|
||||||
int to_target = 0;
|
String to_target = null;
|
||||||
int last_to_target = 0;
|
String last_to_target = null;
|
||||||
/**
|
/**
|
||||||
* 下发任务号
|
* 下发任务号
|
||||||
*/
|
*/
|
||||||
int to_task = 0;
|
String to_task = null;
|
||||||
int last_to_task = 0;
|
String last_to_task = null;
|
||||||
/**
|
/**
|
||||||
* 下发接纯数字托盘号
|
* 下发接纯数字托盘号
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -110,15 +110,15 @@ public class ItemProtocol {
|
|||||||
return this.getOpcIntegerValue(item_task);
|
return this.getOpcIntegerValue(item_task);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getTo_task() {
|
public String getTo_task() {
|
||||||
return this.getOpcIntegerValue(item_to_task);
|
return this.getOpcStringValue(item_to_task);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public int getTotarget() {
|
public String getTotarget() {
|
||||||
return this.getOpcIntegerValue(item_to_target);
|
return this.getOpcStringValue(item_to_target);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getTo_command() {
|
public String getTo_command() {
|
||||||
|
|||||||
@@ -121,8 +121,8 @@ public class ConveyorWithScannerWeightDeviceDriver extends AbstractOpcDeviceDriv
|
|||||||
String to_task = null;
|
String to_task = null;
|
||||||
String last_to_task = null;
|
String last_to_task = null;
|
||||||
|
|
||||||
int to_container_type = 0;
|
String to_container_type = null;
|
||||||
int last_to_container_type = 0;
|
String last_to_container_type = null;
|
||||||
|
|
||||||
String to_height_level = null;
|
String to_height_level = null;
|
||||||
String last_to_height_level = null;
|
String last_to_height_level = null;
|
||||||
|
|||||||
@@ -148,8 +148,8 @@ public class ItemProtocol {
|
|||||||
return this.getOpcIntegerValue(item_container_type);
|
return this.getOpcIntegerValue(item_container_type);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getTo_container_type(){
|
public String getTo_container_type(){
|
||||||
return this.getOpcIntegerValue(item_to_container_type);
|
return this.getOpcStringValue(item_to_container_type);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getTo_height_level(){
|
public String getTo_height_level(){
|
||||||
|
|||||||
@@ -30,11 +30,9 @@ https://juejin.cn/post/6844903775631572999
|
|||||||
<withJansi>true</withJansi>
|
<withJansi>true</withJansi>
|
||||||
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
|
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
|
||||||
<pattern>${log.pattern}</pattern>
|
<pattern>${log.pattern}</pattern>
|
||||||
<charset>${log.charset}</charset>
|
<!--<charset>${log.charset}</charset>-->
|
||||||
</encoder>
|
</encoder>
|
||||||
</appender>
|
</appender>
|
||||||
|
|
||||||
|
|
||||||
<!-- 按照每天生成日志文件 -->
|
<!-- 按照每天生成日志文件 -->
|
||||||
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||||
@@ -50,6 +48,7 @@ https://juejin.cn/post/6844903775631572999
|
|||||||
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
|
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
|
||||||
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
|
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
|
||||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
|
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
|
||||||
|
<charset>${log.charset}</charset>
|
||||||
</encoder>
|
</encoder>
|
||||||
</appender>
|
</appender>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user