dtu_client.go 372 B

12345678910111213141516171819202122
  1. package iotStruct
  2. import (
  3. "IotAdmin/core/tcpserver"
  4. "sync"
  5. "time"
  6. )
  7. type DtuClient struct {
  8. FD *tcpserver.Client
  9. Config *DtuConfig
  10. Times int64 //心跳计时器
  11. Online bool //在线状态
  12. TmOnline string
  13. TmOffline string
  14. MLock sync.Mutex
  15. }
  16. // UpdateTime 更新时间
  17. func (cm *DtuClient) UpdateTime() {
  18. cm.Times = time.Now().Unix()
  19. }