From 025ce634be776644180b7f1f361b5533a063a230 Mon Sep 17 00:00:00 2001
From: zhoushihao <zsh19950802@163.com>
Date: 星期二, 07 五月 2024 21:37:25 +0800
Subject: [PATCH] fixbug:代码被后续提交覆盖代码恢复 移除maven工具包 新增定时任务 忽略日志文件 新增日志输入 Merge branch 'security 20240424' 权限管理开发基本功能已完成,待前端对接
---
hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/common/S7object.java | 36 ++++++++++++++++++++++++++++++++++++
1 files changed, 36 insertions(+), 0 deletions(-)
diff --git a/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/common/S7object.java b/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/common/S7object.java
new file mode 100644
index 0000000..2929123
--- /dev/null
+++ b/hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/common/S7object.java
@@ -0,0 +1,36 @@
+package com.mes.common;
+
+import com.github.xingshuangs.iot.protocol.s7.enums.EPlcType;
+import com.mes.tools.S7control;
+
+/**
+ * @Author : zhoush
+ * @Date: 2024/4/9 15:13
+ * @Description:
+ */
+public class S7object {
+ public S7control plccontrol; // PLC閫氳绫诲疄渚�
+ private EPlcType plcType = EPlcType.S1200; // 瑗块棬瀛怭LC绫诲瀷
+ private String ip = "192.168.10.1"; // plc ip鍦板潃
+ private int port = 102; // plc 绔彛鍙�
+
+ private static volatile S7object instance = null;
+
+ private S7object() {
+ if (plccontrol == null) {
+ plccontrol = new S7control(plcType, ip, port, 0, 0);
+ }
+ }
+
+ // 鍗曚緥妯″紡 鑾峰彇绫荤殑鍞竴瀹炰緥
+ public static S7object getinstance() {
+ if (instance == null) {
+ synchronized (S7object.class) {
+ if (instance == null) {
+ instance = new S7object();
+ }
+ }
+ }
+ return instance;
+ }
+}
--
Gitblit v1.8.0