longan před 11 měsíci
rodič
revize
645a26b5c0
10 změnil soubory, kde provedl 334 přidání a 114 odebrání
  1. 5 0
      .gitignore
  2. 15 6
      go.mod
  3. 20 3
      go.sum
  4. 19 7
      lc/IDevice.go
  5. 3 5
      lc/loudspeaker.go
  6. 32 25
      lc/screen.go
  7. 38 59
      lc/server.go
  8. 186 0
      log/info.20231211.log
  9. 11 6
      main.go
  10. 5 3
      util/logrus.go

+ 5 - 0
.gitignore

@@ -0,0 +1,5 @@
+/build/
+log
+.idea
+main_demo.go
+/example/

+ 15 - 6
go.mod

@@ -3,12 +3,21 @@ module lc-smartX
 go 1.20
 
 require (
-	github.com/chzyer/readline v1.5.1 // indirect
-	github.com/lestrrat/go-file-rotatelogs v0.0.0-20180223000712-d3151e2a480f // indirect
+	github.com/chzyer/readline v1.5.1
+	github.com/lestrrat/go-file-rotatelogs v0.0.0-20180223000712-d3151e2a480f
+	github.com/sirupsen/logrus v1.9.3
+	golang.org/x/text v0.14.0
+	gopkg.in/yaml.v3 v3.0.1
+)
+
+require (
+	github.com/fastly/go-utils v0.0.0-20180712184237-d95a45783239 // indirect
+	github.com/jehiah/go-strftime v0.0.0-20171201141054-1d33003b3869 // indirect
+	github.com/jonboulle/clockwork v0.4.0 // indirect
+	github.com/lestrrat/go-envload v0.0.0-20180220120943-6ed08b54a570 // indirect
 	github.com/lestrrat/go-strftime v0.0.0-20180220042222-ba3bf9c1d042 // indirect
 	github.com/pkg/errors v0.9.1 // indirect
-	github.com/sirupsen/logrus v1.9.3 // indirect
-	golang.org/x/sys v0.5.0 // indirect
-	golang.org/x/text v0.14.0 // indirect
-	gopkg.in/yaml.v3 v3.0.1 // indirect
+	github.com/tebeka/strftime v0.1.5 // indirect
+	golang.org/x/net v0.19.0 // indirect
+	golang.org/x/sys v0.15.0 // indirect
 )

+ 20 - 3
go.sum

@@ -1,27 +1,44 @@
+github.com/chzyer/logex v1.2.1 h1:XHDu3E6q+gdHgsdTPH6ImJMIp436vR6MPtH8gP05QzM=
 github.com/chzyer/logex v1.2.1/go.mod h1:JLbx6lG2kDbNRFnfkgvh4eRJRPX1QCoOIWomwysCBrQ=
 github.com/chzyer/readline v1.5.1 h1:upd/6fQk4src78LMRzh5vItIt361/o4uq553V8B5sGI=
 github.com/chzyer/readline v1.5.1/go.mod h1:Eh+b79XXUwfKfcPLepksvw2tcLE/Ct21YObkaSkeBlk=
+github.com/chzyer/test v1.0.0 h1:p3BQDXSxOhOG0P9z6/hGnII4LGiEPOYBhs8asl/fC04=
 github.com/chzyer/test v1.0.0/go.mod h1:2JlltgoNkt4TW/z9V/IzDdFaMTM2JPIi26O1pF38GC8=
 github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
 github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/fastly/go-utils v0.0.0-20180712184237-d95a45783239 h1:Ghm4eQYC0nEPnSJdVkTrXpu9KtoVCSo1hg7mtI7G9KU=
+github.com/fastly/go-utils v0.0.0-20180712184237-d95a45783239/go.mod h1:Gdwt2ce0yfBxPvZrHkprdPPTTS3N5rwmLE8T22KBXlw=
+github.com/jehiah/go-strftime v0.0.0-20171201141054-1d33003b3869 h1:IPJ3dvxmJ4uczJe5YQdrYB16oTJlGSC/OyZDqUk9xX4=
+github.com/jehiah/go-strftime v0.0.0-20171201141054-1d33003b3869/go.mod h1:cJ6Cj7dQo+O6GJNiMx+Pa94qKj+TG8ONdKHgMNIyyag=
+github.com/jonboulle/clockwork v0.4.0 h1:p4Cf1aMWXnXAUh8lVfewRBx1zaTSYKrKMF2g3ST4RZ4=
+github.com/jonboulle/clockwork v0.4.0/go.mod h1:xgRqUGwRcjKCO1vbZUEtSLrqKoPSsUpK7fnezOII0kc=
+github.com/lestrrat/go-envload v0.0.0-20180220120943-6ed08b54a570 h1:0iQektZGS248WXmGIYOwRXSQhD4qn3icjMpuxwO7qlo=
+github.com/lestrrat/go-envload v0.0.0-20180220120943-6ed08b54a570/go.mod h1:BLt8L9ld7wVsvEWQbuLrUZnCMnUmLZ+CGDzKtclrTlE=
 github.com/lestrrat/go-file-rotatelogs v0.0.0-20180223000712-d3151e2a480f h1:sgUSP4zdTUZYZgAGGtN5Lxk92rK+JUFOwf+FT99EEI4=
 github.com/lestrrat/go-file-rotatelogs v0.0.0-20180223000712-d3151e2a480f/go.mod h1:UGmTpUd3rjbtfIpwAPrcfmGf/Z1HS95TATB+m57TPB8=
 github.com/lestrrat/go-strftime v0.0.0-20180220042222-ba3bf9c1d042 h1:Bvq8AziQ5jFF4BHGAEDSqwPW1NJS3XshxbRCxtjFAZc=
 github.com/lestrrat/go-strftime v0.0.0-20180220042222-ba3bf9c1d042/go.mod h1:TPpsiPUEh0zFL1Snz4crhMlBe60PYxRHr5oFF3rRYg0=
 github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
 github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
+github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
 github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
 github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
 github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
 github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
+github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
 github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
+github.com/tebeka/strftime v0.1.5 h1:1NQKN1NiQgkqd/2moD6ySP/5CoZQsKa1d3ZhJ44Jpmg=
+github.com/tebeka/strftime v0.1.5/go.mod h1:29/OidkoWHdEKZqzyDLUyC+LmgDgdHo4WAFCDT7D/Ig=
+golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c=
+golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U=
 golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 h1:0A+M6Uqn+Eje4kHMK80dtF3JCXC4ykBgQG4Fe06QRhQ=
 golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU=
-golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc=
+golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
 golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
 golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
+gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
 gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
 gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
 gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=

+ 19 - 7
lc/IDevice.go

@@ -1,20 +1,31 @@
 package lc
 
 import (
-	"fmt"
 	"github.com/sirupsen/logrus"
 	"lc-smartX/util"
 	"net"
 	"time"
 )
 
+type CorrectTimer interface {
+	Correct()
+}
+
+func DoCorrectTime(a any) {
+	if c, ok := a.(CorrectTimer); ok {
+		c.Correct()
+	}
+}
+
 // IDevice 抽象设备,包含屏和喇叭
 type IDevice interface {
-	// Call 通知输出设备,输出信息
+	// Call 通知输出设备,输出信息。屏显示来车警告信息,扬声器语音提示
 	Call()
+	// Back 屏显示原来的无车提醒信息
+	Back()
 	ReConnect()
 	// Correct time 校时
-	Correct()
+	CorrectTimer
 }
 
 type IntersectionDevice struct {
@@ -27,6 +38,9 @@ func (id *IntersectionDevice) Call() {
 	id.L.Speak()
 	id.S.Display()
 }
+func (id *IntersectionDevice) Back() {
+	id.S.Back()
+}
 
 func (id *IntersectionDevice) ReConnect() {
 	//重连屏
@@ -37,7 +51,6 @@ func (id *IntersectionDevice) ReConnect() {
 			return
 		}
 		logrus.Info("连接", id.Info.ScreenIp, "成功!")
-		fmt.Println("连接", id.Info.ScreenIp, "成功!")
 		id.S.Conn = conn
 		id.S.IsLive = true
 	}
@@ -45,7 +58,6 @@ func (id *IntersectionDevice) ReConnect() {
 }
 
 func (id *IntersectionDevice) Correct() {
-	t := time.Now()
-	id.S.CorrectTime(t)
-	id.L.CorrectTime(t)
+	DoCorrectTime(id.S)
+	DoCorrectTime(id.L)
 }

+ 3 - 5
lc/loudspeaker.go

@@ -2,12 +2,10 @@ package lc
 
 import (
 	"fmt"
-	"time"
 )
 
 type Loudspeaker interface {
 	Speak()
-	CorrectTime(time.Time)
 }
 
 type IpCast struct {
@@ -17,6 +15,6 @@ func (ip IpCast) Speak() {
 	fmt.Println("语音")
 }
 
-func (ip IpCast) CorrectTime(t time.Time) {
-
-}
+//func (ip IpCast) CorrectTime(t time.Time) {
+//
+//}

+ 32 - 25
lc/screen.go

@@ -12,7 +12,6 @@ import (
 
 type Screener interface {
 	Display()
-	CorrectTime(time.Time)
 }
 
 type Screen struct {
@@ -39,9 +38,27 @@ func NewScreen(name string, conn net.Conn) Screen {
 }
 
 func (s *Screen) Display() {
+	if !s.IsLive {
+		return
+	}
 	s.Lock(1, "P001")
 }
 
+func (s *Screen) Back() {
+	s.Lock(1, "P000")
+}
+
+// Correct 校正时间
+func (s *Screen) Correct() {
+	now := time.Now()
+	if !s.IsLive {
+		return
+	}
+	cmd := bx.NewBxCmdSystemClockCorrect(now)
+	data := bx.NewBxDataPackCmd(cmd)
+	s.send(data.Pack())
+}
+
 func (s *Screen) send(data []byte) {
 	if !s.IsLive {
 		return
@@ -53,16 +70,6 @@ func (s *Screen) send(data []byte) {
 	}
 }
 
-// CorrectTime 校正时间
-func (s *Screen) CorrectTime(now time.Time) {
-	if !s.IsLive {
-		return
-	}
-	cmd := bx.NewBxCmdSystemClockCorrect(now)
-	data := bx.NewBxDataPackCmd(cmd)
-	s.send(data.Pack())
-}
-
 type Color byte
 
 const (
@@ -84,21 +91,19 @@ const (
 // 0x04——向右移动
 // 0x05——向上移动
 // 0x06——向下移动
-func (s *Screen) TextRam(ft FlashFile) {
+func (s *Screen) TextRam(ff FlashFile) {
 	if !s.IsLive {
 		return
 	}
 	var areas []bx.BxArea
-	//var id byte
-	//var x, y int16
-	//var w, h int16 = 64, 16
 	encoder := simplifiedchinese.GB18030.NewEncoder()
-	bytes, err := encoder.Bytes([]byte("\\C" + strconv.Itoa(int(ft.color)) + ft.msg))
-	if err != nil {
-		logrus.Error("编码转换失败:", err)
-		return
+	var bytes []byte
+	if ff.color == None || ff.color == Default {
+		bytes, _ = encoder.Bytes([]byte(ff.msg))
+	} else {
+		bytes, _ = encoder.Bytes([]byte("\\C" + strconv.Itoa(int(ff.color)) + ff.msg))
 	}
-	area := bx.NewBxAreaDynamic(s.StateInfo.DynaAreaNum, 0, byte(ft.dispMode), ft.originX, ft.originY, ft.width, ft.height, bytes, false)
+	area := bx.NewBxAreaDynamic(s.StateInfo.DynaAreaNum, 0, byte(ff.dispMode), ff.originX, ff.originY, ff.width, ff.height, bytes, false)
 	areas = append(areas, area)
 	//
 	cmd := bx.NewBxCmdSendDynamicArea(areas)
@@ -181,7 +186,7 @@ func (ft *FlashFile) SetOrigin(x uint16, xIsPixel bool, y uint16) {
 	ft.originX = x
 }
 
-// SetArea isPixel=true表示像素单位, =false表示以字节(8像素)为单位
+// SetArea yIsPixel=true表示像素单位, =false表示以字节(8像素)为单位
 func (ft *FlashFile) SetArea(w uint16, yIsPixel bool, h uint16) {
 	ft.height = h
 	if yIsPixel {
@@ -191,21 +196,23 @@ func (ft *FlashFile) SetArea(w uint16, yIsPixel bool, h uint16) {
 	ft.width = w
 }
 
-func (s *Screen) TextFlash(ft FlashFile) {
+func (s *Screen) TextFlash(ft FlashFile, isLogo bool) {
 	if !s.IsLive {
 		return
 	}
 	encoder := simplifiedchinese.GB18030.NewEncoder()
 	var bytes []byte
-	//
-	if ft.color == None {
-		bytes = []byte(ft.msg)
+	if ft.color == None || ft.color == Default {
+		bytes, _ = encoder.Bytes([]byte(ft.msg))
 	} else {
 		bytes, _ = encoder.Bytes([]byte("\\C" + strconv.Itoa(int(ft.color)) + ft.msg))
 	}
 	area := bx.NewBxAreaDynamic(0xff, byte(ft.runMode), byte(ft.dispMode), ft.originX, ft.originY, ft.width, ft.height, bytes, false)
 	//if s.FileNum
 	name := fmt.Sprintf("P%03d", s.StateInfo.ProgramNum)
+	if isLogo {
+		name = "LOGO"
+	}
 	file := bx.NewBxFile(name, "", []bx.BxArea{area})
 	cmd := file.NewCmdWriteFile()
 	pack := bx.NewBxDataPackCmd(cmd)

+ 38 - 59
lc/server.go

@@ -1,7 +1,6 @@
 package lc
 
 import (
-	"fmt"
 	"github.com/sirupsen/logrus"
 	"lc-smartX/util"
 	"lc-smartX/util/gopool"
@@ -16,105 +15,85 @@ func StartSmartXServer(s SmartXServer) {
 	s.Serve()
 }
 
-type IntersectionCtl struct {
+type IntersectionServer struct {
 	MainState   byte
 	SubState    byte
-	MainDevices []IntersectionDevice
-	SubDevices  []IntersectionDevice
+	MainDevices []IDevice
+	SubDevices  []IDevice
 	ReTicker    *time.Ticker
 	Main        *time.Ticker
 	Sub         *time.Ticker
 }
 
-type MainNotifier struct{ ctl *IntersectionCtl }
+type MainNotifier struct{ s *IntersectionServer }
 
 // Notify 主路来车,通知支路设备
 func (m MainNotifier) Notify() {
-	m.ctl.Main.Reset(5 * time.Second)
-	if m.ctl.MainState != 1 {
-		m.ctl.MainState = 1
-		for _, v := range m.ctl.SubDevices {
-			if v.S.IsLive {
-				gopool.Go(v.Call)
-			}
+	m.s.Main.Reset(5 * time.Second)
+	if m.s.MainState != 1 {
+		m.s.MainState = 1
+		for _, v := range m.s.SubDevices {
+			gopool.Go(v.Call)
 		}
 	}
 }
 
-type SubNotifier struct{ ctl *IntersectionCtl }
+type SubNotifier struct{ s *IntersectionServer }
 
 // Notify 支路来车,通知主路设备
 func (s SubNotifier) Notify() {
-	s.ctl.Sub.Reset(5 * time.Second)
-	if s.ctl.SubState != 1 {
-		s.ctl.SubState = 1
-		for _, v := range s.ctl.MainDevices {
-			if v.S.IsLive {
-				gopool.Go(v.Call)
-			}
+	s.s.Sub.Reset(5 * time.Second)
+	if s.s.SubState != 1 {
+		s.s.SubState = 1
+		for _, v := range s.s.MainDevices {
+
+			gopool.Go(v.Call)
+
 		}
 	}
 }
 
-func (ctl *IntersectionCtl) Serve() {
-	RegisterCallback(1, &SubNotifier{ctl})
-	RegisterCallback(0, &MainNotifier{ctl})
+func (is *IntersectionServer) Serve() {
+	RegisterCallback(1, &SubNotifier{is})
+	RegisterCallback(0, &MainNotifier{is})
 	//先创建响应设备
 	for _, v := range util.Config.OutputDevices {
-		iDevice := IntersectionDevice{
+		iDevice := &IntersectionDevice{
 			Info: v,
 		}
 		iDevice.ReConnect() //初次连接
 		if iDevice.Info.Branch == 1 {
-			ctl.MainDevices = append(ctl.MainDevices, iDevice)
+			is.MainDevices = append(is.MainDevices, iDevice)
 		} else {
-			ctl.SubDevices = append(ctl.SubDevices, iDevice)
+			is.SubDevices = append(is.SubDevices, iDevice)
 		}
 	}
-	logrus.Info("主路输出设备列表:", ctl.MainDevices)
-	logrus.Info("支路输出设备列表:", ctl.SubDevices)
-	fmt.Println("主路输出设备列表:", ctl.MainDevices)
-	fmt.Println("支路输出设备列表:", ctl.SubDevices)
+	logrus.Info("主路输出设备列表:", is.MainDevices)
+	logrus.Info("支路输出设备列表:", is.SubDevices)
 	for {
 		select {
-		case <-ctl.Main.C: //检查主路状态->支路输出设备作出响应
-			for _, v := range ctl.SubDevices {
-				if v.S.IsLive && ctl.MainState == 1 {
-					back := func() {
-						v.S.Lock(1, "P000")
-					}
-					gopool.Go(back)
+		case <-is.Main.C: //检查主路状态->支路输出设备回到初始状态
+			for _, v := range is.SubDevices {
+				if is.MainState == 1 {
+					gopool.Go(v.Back)
 				}
 			}
-			ctl.MainState = 0
-		case <-ctl.Sub.C: //检查支路状态->主路输出设备作出响应
-			for _, v := range ctl.MainDevices {
-				if v.S.IsLive && ctl.SubState == 1 {
-					back := func() {
-						v.S.Lock(1, "P000")
-					}
-					gopool.Go(back)
+			is.MainState = 0
+		case <-is.Sub.C: //检查支路状态->主路输出设备作出响应
+			for _, v := range is.MainDevices {
+				if is.SubState == 1 {
+					gopool.Go(v.Back)
 				}
 			}
-			ctl.SubState = 0
-		case <-ctl.ReTicker.C: //每18s尝试重连
+			is.SubState = 0
+		case <-is.ReTicker.C: //每19s检查并尝试重连
 			gopool.Go(func() {
-				for _, v := range ctl.MainDevices {
-					if v.S.IsLive {
-						continue
-					}
-					logrus.Info("reconnect")
-					fmt.Println("reconnect")
+				for _, v := range is.MainDevices {
 					v.ReConnect()
 				}
 			})
 			gopool.Go(func() {
-				for _, v := range ctl.SubDevices {
-					if v.S.IsLive {
-						continue
-					}
-					logrus.Info("reconnect")
-					fmt.Println("reconnect")
+				for _, v := range is.SubDevices {
 					v.ReConnect()
 				}
 			})

+ 186 - 0
log/info.20231211.log

@@ -0,0 +1,186 @@
+{"file":"D:/goProject/lc-smartX/lc/IDevice.go:53","func":"lc-smartX/lc.(*IntersectionDevice).ReConnect","level":"info","msg":"连接192.168.110.200成功!","time":"2023-12-11T08:52:53+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/server.go:72","func":"lc-smartX/lc.(*IntersectionServer).Serve","level":"info","msg":"主路输出设备列表:[0xc0000ac000]","time":"2023-12-11T08:52:53+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/server.go:73","func":"lc-smartX/lc.(*IntersectionServer).Serve","level":"info","msg":"支路输出设备列表:[]","time":"2023-12-11T08:52:53+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T08:53:18+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T08:53:26+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T08:53:59+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T08:54:21+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T08:56:22+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T08:56:36+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T08:56:42+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T08:57:02+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T08:57:17+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T08:57:22+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T08:57:23+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T08:57:44+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T08:57:47+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T08:58:29+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T08:58:33+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T08:58:42+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T08:58:43+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T08:59:05+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T08:59:46+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:00:32+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:00:37+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:00:37+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:00:42+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:00:50+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:02:31+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:03:00+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:03:22+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:03:22+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:03:25+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:03:28+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:03:30+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:04:09+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:04:15+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:04:16+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:04:20+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:04:24+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:04:43+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:05:58+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:06:00+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:06:03+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:06:08+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:06:10+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:06:13+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:06:18+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:06:20+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:06:20+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:07:07+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:07:08+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:07:10+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:08:09+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:08:47+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:09:36+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:09:54+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:10:26+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:10:47+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:10:49+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:10:52+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:10:54+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:10:59+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:11:10+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:12:05+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:12:26+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:13:18+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:13:36+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:14:33+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:14:34+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:14:37+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:14:43+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:14:47+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:15:23+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:15:26+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:15:35+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:15:36+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:15:37+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:15:40+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:15:52+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:16:09+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:16:22+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:16:27+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:16:30+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:16:32+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:16:59+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:17:52+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:17:55+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:18:19+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:18:22+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:18:26+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:19:21+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:19:45+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:19:47+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:19:49+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:20:43+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:20:47+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:21:13+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:21:16+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:21:38+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:21:55+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:22:10+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:22:37+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:24:13+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:24:24+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:25:53+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:26:08+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:27:13+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:27:25+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:27:31+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:27:33+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:28:08+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:28:13+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:28:39+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:29:12+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:29:15+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:29:16+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:31:25+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:32:22+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:32:28+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:33:06+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/IDevice.go:53","func":"lc-smartX/lc.(*IntersectionDevice).ReConnect","level":"info","msg":"连接192.168.110.200成功!","time":"2023-12-11T09:34:21+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/server.go:72","func":"lc-smartX/lc.(*IntersectionServer).Serve","level":"info","msg":"主路输出设备列表:[0xc00006c000]","time":"2023-12-11T09:34:21+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/server.go:73","func":"lc-smartX/lc.(*IntersectionServer).Serve","level":"info","msg":"支路输出设备列表:[]","time":"2023-12-11T09:34:21+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:34:58+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:35:00+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:35:06+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:36:16+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:36:29+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:36:43+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:37:16+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:37:21+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:37:23+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:38:19+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:38:23+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:38:25+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:39:04+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:39:25+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:39:33+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:39:44+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:41:11+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:41:41+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:42:03+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:42:27+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:42:45+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:43:12+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:44:04+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:44:07+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:44:10+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:44:12+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:44:18+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:44:19+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:44:26+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:44:39+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:44:42+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:45:07+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:47:08+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:47:08+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:47:11+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:47:13+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:47:22+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:47:42+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:47:42+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:47:44+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:48:27+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:49:14+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:49:21+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:50:03+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:50:27+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:50:33+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:50:34+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:50:37+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:50:40+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:51:56+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:52:09+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:52:13+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:52:16+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:52:18+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:52:37+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:52:56+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:53:02+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:53:03+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:53:27+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:53:31+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:53:33+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:53:42+08:00"}
+{"file":"D:/goProject/lc-smartX/lc/event.go:57","func":"lc-smartX/lc.(*Server).Callback","level":"debug","msg":"camera 192.168.1.64 Callback","time":"2023-12-11T09:54:01+08:00"}

+ 11 - 6
main.go

@@ -11,13 +11,14 @@ func main() {
 	gopool.Go(lc.StartEventServer)
 	//等事件服务先启动
 	time.Sleep(1 * time.Second)
-	ctl := &lc.IntersectionCtl{
+	is := &lc.IntersectionServer{
 		Main:     time.NewTicker(5 * time.Second),
 		Sub:      time.NewTicker(5 * time.Second),
-		ReTicker: time.NewTicker(18 * time.Second),
+		ReTicker: time.NewTicker(19 * time.Second),
 	}
-	lc.StartSmartXServer(ctl)
+	lc.StartSmartXServer(is)
 
+	//单个屏设备连接不能并发发送数据,未作实现
 	//conn, err := net.Dial("tcp", "192.168.110.200:5000")
 	//if err != nil {
 	//	logrus.Fatalln("建立连接失败:", err)
@@ -29,9 +30,11 @@ func main() {
 
 	//清除所有文件
 	//client.DelFile("")
+	//time.Sleep(1 * time.Second)
 
 	//删除指定文件
 	//client.DelFile("P002")
+	//time.Sleep(1*time.Second)
 
 	//发送flash文件节目
 	//file := lc.FlashFile{}
@@ -39,7 +42,8 @@ func main() {
 	//file.SetMode(lc.DefaultRunMode, lc.DefaultDispMode)
 	//file.SetOrigin(0, true, 0)
 	//file.SetArea(64, true, 16)
-	//client.TextFlash(file)
+	//client.TextFlash(file, true)
+	//time.Sleep(1 * time.Second)
 
 	//发送位图文件-不报错,不成功
 	//file, err := os.ReadFile("./lc/bitmap/T000.bcm")
@@ -48,6 +52,7 @@ func main() {
 	//	return
 	//}
 	//client.Bitmap("T000", file)
+	//time.Sleep(1*time.Second)
 
 	//发送动态区
 	//file1 := lc.FlashFile{}
@@ -57,15 +62,15 @@ func main() {
 	//file1.SetArea(32, true, 16)
 	//client.TextFlash(file1)
 	//client.TextRam(file1)
+	//time.Sleep(1*time.Second)
 
 	//锁定/解锁节目
 	//client.Lock(1, "P000")
+	//time.Sleep(1*time.Second)
 
 	//删除动态区
 	//client.DelRamText(0)
 
-	//client.Lock(1, "P000")
-	//time.Sleep(time.Second * 1)
 	////查询当前状态
 	//client.State()
 	//time.Sleep(time.Second * 1)

+ 5 - 3
util/logrus.go

@@ -8,10 +8,11 @@ import (
 	"time"
 )
 
-func InitLogrus() {
+var _ = func() error {
 	err := os.MkdirAll("./log", os.ModeDir)
 	if err != nil {
-		panic(err)
+		logrus.Error("创建日志目录失败!", err)
+		return err
 	}
 	fileName := path.Join("./log", "info")
 	writer, _ := rotatelogs.New(
@@ -24,4 +25,5 @@ func InitLogrus() {
 	logrus.SetOutput(os.Stdout)
 	logrus.SetReportCaller(true)
 	logrus.SetOutput(writer)
-}
+	return nil
+}()