@@ -0,0 +1,8 @@
+# Default ignored files
+/shelf/
+/workspace.xml
+# Editor-based HTTP Client requests
+/httpRequests/
+# Datasource local storage ignored files
+/dataSources/
+/dataSources.local.xml
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="ProjectModuleManager">
+ <modules>
+ <module fileurl="file://$PROJECT_DIR$/.idea/smartIntersection_edge.iml" filepath="$PROJECT_DIR$/.idea/smartIntersection_edge.iml" />
+ </modules>
+ </component>
+</project>
@@ -0,0 +1,9 @@
+<module type="WEB_MODULE" version="4">
+ <component name="Go" enabled="true" />
+ <component name="NewModuleRootManager">
+ <content url="file://$MODULE_DIR$" />
+ <orderEntry type="inheritedJdk" />
+ <orderEntry type="sourceFolder" forTests="false" />
+</module>
@@ -0,0 +1,6 @@
+ <component name="VcsDirectoryMappings">
+ <mapping directory="" vcs="Git" />
@@ -1,8 +1,8 @@
{
"ledScreens": [
- "Sn": "071995171560000000c40808",
- "ScreensName": "测试屏幕三"
+ "Sn": "07dd95171560000000c40810",
+ "ScreensName": "测试lc"
}
]
@@ -50,6 +50,10 @@ func NewMqttClient(server, clientId, user, password string, timeout uint, mqttOn
o.mqtt = client
err = client.Connect(o.Ctx())
+ if err != nil {
+ logger.Logger.Errorln("MClient.NewMqttClient: Connect err,原因:", err)
+ return nil
+ }
return &o
@@ -56,6 +56,7 @@ func (s *Device) Process() {
data := string(buf[:n])
//fmt.Println("读取", string(buf[:n]), time.Now())
if data[2:7] == "login" {
+ fmt.Println("登录 login*****")
s.Conn.Write([]byte("login:successful"))
@@ -2,6 +2,7 @@ package service
import (
"errors"
+ "fmt"
"net"
"strings"
"sync"
@@ -25,6 +26,7 @@ func ListenTcp() {
for {
conn, err := listen.Accept()
+ fmt.Println("监听连接:", conn.LocalAddr())
if err != nil {
continue