From 578b74f9de4b96e88e2fddb726c7c6f78162b033 Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期六, 21 十月 2023 14:34:23 +0800
Subject: [PATCH] 启停生产者

---
 conf/config.go |   25 +++++++++++++++++++------
 1 files changed, 19 insertions(+), 6 deletions(-)

diff --git a/conf/config.go b/conf/config.go
index 0216051..53f53ea 100644
--- a/conf/config.go
+++ b/conf/config.go
@@ -58,6 +58,7 @@
 
 	Services struct {
 		ApsServer string
+		Serial    string
 	}
 
 	nsqConf struct {
@@ -66,9 +67,18 @@
 		NsqlookupdAddr string
 	}
 
-	PLCAddressItem struct {
-		FieldName string
-		Address   int
+	plc struct {
+		FinishNumberTimeInterval int
+		TotalNumberTimeInterval  int
+		ModbusIntType            string
+		SlaveId                  int
+		Package                  string
+		StandbyTime              int64
+	}
+
+	Prompt struct {
+		SafeProduce     string `json:"safeProduce,omitempty"`
+		PlcNotConnected string `json:"plcNotConnected,omitempty"`
 	}
 
 	config struct {
@@ -87,8 +97,10 @@
 		//NsqConf
 		NsqConf nsqConf
 
-		//PLC write address
-		PLCAddresses []PLCAddressItem
+		//PLC
+		PLC plc
+
+		Prompt Prompt
 	}
 )
 
@@ -127,6 +139,7 @@
 	log.Println("......................................................")
 	log.Printf("   System:                %+v", Conf.System)
 	log.Printf("   Log:                   %+v", Conf.Log)
-	log.Printf("   plc address:                  %+v", Conf.PLCAddresses)
+	log.Printf("   plc :                  %+v", Conf.PLC)
+	log.Printf("   services :                  %+v", Conf.Services)
 	log.Println("......................................................")
 }

--
Gitblit v1.8.0