terry 1 год назад
Родитель
Сommit
3ac5500bab
71 измененных файлов с 0 добавлено и 10438 удалено
  1. 0 17
      edge/its/Makefile
  2. 0 27
      edge/its/conf/app.json
  3. 0 25
      edge/its/conf/its.json
  4. 0 33
      edge/its/conf/log.conf
  5. 0 33
      edge/its/config.go
  6. 0 217
      edge/its/datamgr.go
  7. BIN
      edge/its/dll/libcurl.so
  8. BIN
      edge/its/dll/libimos_mw_sdk.so
  9. BIN
      edge/its/dll/libmw_sdk_bp.so
  10. BIN
      edge/its/dll/libmw_sdk_ipc.so
  11. BIN
      edge/its/dll/libmw_sdk_player.so
  12. BIN
      edge/its/dll/libmw_sdk_rm.so
  13. 0 1215
      edge/its/include/imos_sdk_def.h
  14. 0 567
      edge/its/include/imos_sdk_func.h
  15. 0 1172
      edge/its/include/imos_sdk_pub.h
  16. BIN
      edge/its/its
  17. BIN
      edge/its/its_demo
  18. BIN
      edge/its/lib/ITSSDK_V122_LINUX(湖南龙驰2010301700).zip
  19. BIN
      edge/its/lib/libimos_mw_sdk.so
  20. BIN
      edge/its/lib/libmw_sdk_bp.so
  21. BIN
      edge/its/lib/libmw_sdk_ipc.so
  22. BIN
      edge/its/lib/libmw_sdk_player.so
  23. BIN
      edge/its/lib/libmw_sdk_rm.so
  24. 0 1
      edge/its/lib/read.txt
  25. 0 71
      edge/its/main.go
  26. 0 125
      edge/its/mqttclient.go
  27. 0 180
      edge/its/mqttmgr.go
  28. 0 59
      edge/its/pool.go
  29. 0 40
      edge/its/public/fonts/DIGITAL.TXT
  30. BIN
      edge/its/public/fonts/DS-DIGI.TTF
  31. BIN
      edge/its/public/fonts/DS-DIGIB.TTF
  32. BIN
      edge/its/public/fonts/DS-DIGII.TTF
  33. BIN
      edge/its/public/fonts/DS-DIGIT.TTF
  34. BIN
      edge/its/public/html.zip
  35. 0 265
      edge/its/public/index_128_160_B.html
  36. 0 309
      edge/its/public/index_128_160_lukou.html
  37. 0 309
      edge/its/public/index_128_160_qiaoliang.html
  38. 0 309
      edge/its/public/index_128_160_wandao.html
  39. 0 285
      edge/its/public/index_128_256_B.html
  40. 0 310
      edge/its/public/index_128_256_laiche.html
  41. 0 310
      edge/its/public/index_128_256_lukou.html
  42. 0 310
      edge/its/public/index_128_256_qiaoliang.html
  43. 0 310
      edge/its/public/index_128_256_wandao.html
  44. 0 6
      edge/its/public/js/jquery.min.js
  45. 0 256
      edge/its/websvr.go
  46. 0 370
      edge/its/wrap.go
  47. 0 33
      edge/its/wrapstruct.go
  48. 0 27
      edge/its_win/conf/app.json
  49. 0 25
      edge/its_win/conf/its.json
  50. 0 33
      edge/its_win/conf/log.conf
  51. 0 33
      edge/its_win/config.go
  52. 0 52
      edge/its_win/main.go
  53. 0 125
      edge/its_win/mqttclient.go
  54. 0 180
      edge/its_win/mqttmgr.go
  55. 0 59
      edge/its_win/pool.go
  56. 0 40
      edge/its_win/public/fonts/DIGITAL.TXT
  57. BIN
      edge/its_win/public/fonts/DS-DIGI.TTF
  58. BIN
      edge/its_win/public/fonts/DS-DIGIB.TTF
  59. BIN
      edge/its_win/public/fonts/DS-DIGII.TTF
  60. BIN
      edge/its_win/public/fonts/DS-DIGIT.TTF
  61. 0 265
      edge/its_win/public/index_128_160_B.html
  62. 0 309
      edge/its_win/public/index_128_160_lukou.html
  63. 0 309
      edge/its_win/public/index_128_160_qiaoliang.html
  64. 0 309
      edge/its_win/public/index_128_160_wandao.html
  65. 0 285
      edge/its_win/public/index_128_256_B.html
  66. 0 310
      edge/its_win/public/index_128_256_lukou.html
  67. 0 310
      edge/its_win/public/index_128_256_qiaoliang.html
  68. 0 310
      edge/its_win/public/index_128_256_wandao.html
  69. 0 6
      edge/its_win/public/js/jquery.min.js
  70. 0 255
      edge/its_win/websvr.go
  71. 0 32
      edge/its_win/wrapstruct.go

+ 0 - 17
edge/its/Makefile

@@ -1,17 +0,0 @@
-#打包程序名称
-APP_NAME="its"
-
-#BINARY="../../build/edge/${APP_NAME}"
-BINARY="./${APP_NAME}_demo"
-VERSION=1.0.0
-export GOARCH=arm
-export GOOS=linux
-export GOARM=7
-export CGO_ENABLED=1
-export CC=arm-openwrt-linux-gcc -I/usr/staging_dir/target-arm_cortex-a7+neon_uClibc-0.9.33.2_eabi/usr/include -I/root/tmppath/edge/its/include -L/root/tmppath/edge/its/lib -limos_mw_sdk -lmw_sdk_bp -lmw_sdk_ipc -lmw_sdk_player -lmw_sdk_rm -lm -L/usr/staging_dir/target-arm_cortex-a7+neon_uClibc-0.9.33.2_eabi/usr/lib/libiconv-stub/lib -liconv
-#export CXX=arm-openwrt-linux-uclibcgnueabi-c++
-
-clear:
-	@$(RM) ${BINARY}
-build:
-	@go build -o ${BINARY} ./

+ 0 - 27
edge/its/conf/app.json

@@ -1,27 +0,0 @@
-{
-  "Name":"网关",
-  "Tenant":"000000",
-  "GID":"T183761385",
-  "SN":"2020040102321223",
-  "Upgrade":true,
-  "Edge":{
-    "mqtt":{
-      "server":"tcp://127.0.0.1:1883",
-      "user":"",
-      "password":"",
-      "Timeout":1000
-    },
-    "redis":{
-      "server":"127.0.0.1:6379",
-      "password":""
-    }
-  },
-  "Cloud":{
-    "mqtt": {
-      "server": "tcp://106.52.134.22:1883",
-      "user": "admin",
-      "password": "admin",
-      "Timeout": 3000
-    }
-  }
-}

+ 0 - 25
edge/its/conf/its.json

@@ -1,25 +0,0 @@
-{
-  "IPAddr":"0.0.0.0:9180",
-  "SuggestSpeed":40,
-  "Duration":60,
-  "EnvID": "HJ001001",
-  "DefProvince": "湘",
-  "DefCity": "湘F",
-  "RemotePub": 0,
-  "RemoteSub": "210235C4FY320A000161",
-  "dev": [
-    {
-      "Code": "210235C4FY320A0001621",
-      "ID": "210235C4FY320A0001621",
-      "TollgateID": "1A5DF3",
-      "Name": "抓拍单元",
-      "Brand": "UNIVIEW",
-      "Model": "HC131@GDM-L32S",
-      "DevType": 4,
-      "User": "admin",
-      "Password": "Admin8888",
-      "IP": "192.168.1.13",
-      "Port": 80
-    }
-  ]
-}

+ 0 - 33
edge/its/conf/log.conf

@@ -1,33 +0,0 @@
-debug {
-        level = "debug"
-        formatter.name = "text"
-        formatter.options  {
-                            force-colors      = true
-                            disable-colors    = false
-                            disable-timestamp = false
-                            full-timestamp    = false
-                            timestamp-format  = "2006-01-02 15:04:05"
-                            disable-sorting   = false
-        }
-}
-release {
-        level = "info"
-        out.name = "rotatelogs"
-        out.options {
-                    path =  ./log/%Y%m%d.log
-                    #clock=
-                    #location=
-                    #link-name= logs/release/current.log
-                    #rotation-time=   #default 24hour
-                    #max-age=         #default 24hour * 7
-        }
-        formatter.name = "json"
-        formatter.options  {
-                            force-colors      = false
-                            disable-colors    = false
-                            disable-timestamp = false
-                            full-timestamp    = false
-                            timestamp-format  = "2006-01-02 15:04:05"
-                            disable-sorting   = false
-        }
-}

+ 0 - 33
edge/its/config.go

@@ -1,33 +0,0 @@
-package main
-
-import (
-	"lc/common/configor"
-	"lc/common/protocol"
-	"lc/common/util"
-)
-
-func GetTopic(devtype, id, topic string) string {
-	return appConfig.Tenant + "/" + devtype + "/" + id + "/" + topic
-}
-
-var appConfig protocol.AppConfig
-var itsConfig protocol.ITSDevConfig
-
-func loadAppConfig() error {
-	var o protocol.AppConfig
-	err := configor.Load(&o, util.GetPath(0)+"app.json")
-	if err == nil && o.GID != "" {
-		appConfig = o
-	}
-	return err
-}
-
-func LoadITSDevConfig() error {
-	var o protocol.ITSDevConfig
-	err := configor.Load(&o, util.GetPath(0)+"its.json")
-	if err == nil {
-		itsConfig = o
-		return nil
-	}
-	return err
-}

+ 0 - 217
edge/its/datamgr.go

@@ -1,217 +0,0 @@
-package main
-
-import (
-	"context"
-	"runtime/debug"
-	"sync"
-	"time"
-
-	"github.com/sirupsen/logrus"
-
-	"lc/common/mqtt"
-	"lc/common/protocol"
-	"lc/common/util"
-)
-
-var _onceITSDeviceMgr sync.Once
-var _singleITSDeviceMgr *ITSDeviceMgr
-
-func GetITSDeviceMgr() *ITSDeviceMgr {
-	_onceITSDeviceMgr.Do(func() {
-		ctx, cancel := context.WithCancel(context.Background())
-		_singleITSDeviceMgr = &ITSDeviceMgr{
-			Queue:          util.NewQueue(2000),
-			MapITSDevice:   make(map[string]*ITSDevice),
-			ctx:            ctx,
-			cancel:         cancel,
-			downQueue:      util.NewQueue(100),
-			mapTopicHandle: make(map[string]func(m mqtt.Message)),
-		}
-
-	})
-	return _singleITSDeviceMgr
-}
-
-type ITSDeviceMgr struct {
-	Queue          *util.MlQueue         //数据队列,来自SDK
-	MapITSDevice   map[string]*ITSDevice //TollgateID->ITSDevice
-	logouts        []string              //退出登陆的userid
-	logoutsmu      sync.Mutex
-	ctx            context.Context
-	cancel         context.CancelFunc
-	downQueue      *util.MlQueue
-	mapTopicHandle map[string]func(m mqtt.Message)
-}
-
-func (o *ITSDeviceMgr) LoadITSDevice() {
-	for _, v := range itsConfig.Its {
-		o.MapITSDevice[v.TollgateID] = NewITSDevice(v.TollgateID, v.ID, v.User, v.Password, v.IP, v.Port)
-	}
-	o.mapTopicHandle[GetTopic(protocol.DT_GATEWAY, appConfig.GID, protocol.TP_GW_ITS)] = o.HandleTpGwIts
-	GetMQTTMgr().Subscribe(GetTopic(protocol.DT_GATEWAY, appConfig.GID, protocol.TP_GW_ITS), mqtt.AtMostOnce, o.HandleMessage, ToAll)
-}
-
-func (o *ITSDeviceMgr) HandleMessage(m mqtt.Message) {
-	o.downQueue.Put(m)
-}
-
-// HandleTpGwIts 上报配置信息
-func (o *ITSDeviceMgr) HandleTpGwIts(m mqtt.Message) {
-	var obj protocol.Pack_IDObject
-	if err := obj.DeCode(m.PayloadString()); err != nil {
-		return
-	}
-	if obj.Gid != appConfig.GID {
-		return
-	}
-	var ret protocol.Pack_ITSDev
-	if str, err := ret.EnCode(appConfig.GID, obj.Seq, &itsConfig); err == nil {
-		GetMQTTMgr().Publish(GetTopic(protocol.DT_GATEWAY, appConfig.GID, protocol.TP_GW_ITS_ACK), str, 0, ToCloud)
-	}
-}
-
-func (o *ITSDeviceMgr) CheckOnline(dev *ITSDevice, online uint8) {
-	var obj protocol.Pack_IPCState
-	if str, err := obj.EnCode(dev.CamID, appConfig.GID, GetNextUint64(), util.MlNow(), online); err == nil {
-		GetMQTTMgr().Publish(GetTopic(protocol.DT_ITS, dev.CamID, protocol.TP_ITSDEV_STATE), str, mqtt.AtMostOnce, ToCloud)
-	}
-}
-
-func (o *ITSDeviceMgr) CheckLogin() {
-	for _, v := range o.MapITSDevice {
-		if v.UserID != "" {
-			o.CheckOnline(v, protocol.SUCCESS)
-			continue
-		}
-		if err := v.Login(); err == nil {
-			logrus.Infof("抓拍单元[%s]SDK登陆成功", v.CamID)
-			if bdi, err := v.GetDeviceStatus(); err == nil {
-				logrus.Infof("获取抓拍单元[%s]信息成功,信息内容:%v", v.CamID, bdi)
-			} else {
-				logrus.Errorf("获取抓拍单元[%s]信息失败:%s", v.CamID, err.Error())
-			}
-			if err := v.SetPicStreamDataCallback(); err != nil {
-				logrus.Errorf("抓拍单元[%s]执行SetPicStreamDataCallback失败:%s", v.CamID, err.Error())
-			}
-			//if err := v.Reboot(); err != nil {
-			//	logrus.Errorf("设备[%s]重启失败:%s", err.Error())
-			//}
-			v.Reconn = 0
-			o.CheckOnline(v, protocol.SUCCESS)
-		} else {
-			v.Reconn++
-			o.CheckOnline(v, protocol.FAILED)
-			logrus.Errorf("抓拍单元[%s]SDK登陆失败:%s,已重连%d次", v.CamID, err.Error(), v.Reconn)
-		}
-	}
-}
-
-func (o *ITSDeviceMgr) HandleLogout() {
-	o.logoutsmu.Lock()
-	defer o.logoutsmu.Unlock()
-	for _, v := range o.logouts {
-		for _, dev := range o.MapITSDevice {
-			if v == dev.UserID {
-				dev.StopMediaStream()
-				dev.UserID = ""
-				logrus.Warnf("%s logout.", dev.CamID)
-				break
-			}
-		}
-	}
-	o.logouts = nil
-}
-
-func (o *ITSDeviceMgr) NotifyLogout(userid string) {
-	o.logoutsmu.Lock()
-	defer o.logoutsmu.Unlock()
-	o.logouts = append(o.logouts, userid)
-}
-
-func (o *ITSDeviceMgr) PushData(data *tagVehicleInfo) {
-	o.Queue.Put(data)
-}
-
-func (o *ITSDeviceMgr) HandleData(data *tagVehicleInfo) {
-	s, ok := o.MapITSDevice[data.TollgateID]
-	if ok {
-		data.CamID = s.CamID
-		s.ToStatic(data)
-	}
-	GetWebSvr().Update(data)
-
-	if itsConfig.RemotePub > 0 {
-		o.RemotePub(data)
-	}
-}
-
-func (o *ITSDeviceMgr) SendData(t time.Time) {
-	for _, v := range o.MapITSDevice {
-		v.SendStatic(t)
-	}
-}
-
-func (o *ITSDeviceMgr) RemotePub(data *tagVehicleInfo) {
-	var obj protocol.Pack_VehicleSpeed
-	vs := protocol.VehicleSpeed{
-		Plate: data.VehiclePlate,
-		Time:  protocol.BJTime(data.PassTime),
-		Type:  data.VehicleType,
-		Speed: data.VehicleSpeed,
-	}
-	if str, err := obj.EnCode(data.CamID, appConfig.GID, GetNextUint64(), &vs); err == nil {
-		topic := GetTopic(protocol.DT_ITS, data.CamID, protocol.TP_ITS_VEHICLESPEED)
-		GetMQTTMgr().Publish(topic, str, 0, ToCloud)
-	}
-}
-
-func (o *ITSDeviceMgr) Handle(args ...interface{}) interface{} {
-	defer func() {
-		if err := recover(); err != nil {
-			logrus.Errorf("ITSDeviceMgr.HandleData发生异常:%v", err)
-			logrus.Errorf("ITSDeviceMgr.HandleData发生异常,堆栈信息:%s", string(debug.Stack()))
-			gopool.Add(o.Handle, args)
-		}
-	}()
-	o.CheckLogin()
-	timer := time.NewTicker(1 * time.Minute)
-	currHour := util.New(util.MlNow()).BeginningOfHour() //data time
-	LastHour := currHour.Add(1 * time.Hour)              //send time
-	exit := false
-	for {
-		select {
-		case <-o.ctx.Done():
-			exit = true
-		case <-timer.C:
-			o.HandleLogout()
-			o.CheckLogin()
-		default:
-			if util.MlNow().After(LastHour) {
-				o.SendData(currHour)
-				currHour = currHour.Add(1 * time.Hour)
-				LastHour = currHour.Add(1 * time.Hour)
-			}
-			//从队列钟获取指令执行
-			if m, ok, _ := o.downQueue.Get(); ok {
-				if mm, ok := m.(mqtt.Message); ok {
-					if fn, ok := o.mapTopicHandle[mm.Topic()]; ok {
-						fn(mm)
-					} else {
-						logrus.Errorf("ITSDeviceMgr.Handle:不支持的主题:%s", mm.Topic())
-					}
-				}
-			}
-			if v, ok, _ := o.Queue.Get(); ok {
-				if vi, ok := v.(*tagVehicleInfo); ok {
-					o.HandleData(vi)
-				}
-			} else {
-				if exit {
-					logrus.Warnf("ITSDeviceMgr.HandleData退出,原因:%v", o.ctx.Err())
-					return 0
-				}
-				time.Sleep(50 * time.Millisecond)
-			}
-		}
-	}
-}

BIN
edge/its/dll/libcurl.so


BIN
edge/its/dll/libimos_mw_sdk.so


BIN
edge/its/dll/libmw_sdk_bp.so


BIN
edge/its/dll/libmw_sdk_ipc.so


BIN
edge/its/dll/libmw_sdk_player.so


BIN
edge/its/dll/libmw_sdk_rm.so


Разница между файлами не показана из-за своего большого размера
+ 0 - 1215
edge/its/include/imos_sdk_def.h


+ 0 - 567
edge/its/include/imos_sdk_func.h

@@ -1,567 +0,0 @@
-/*******************************************************************************
- Copyright (c) 2013,  Zhejiang Uniview Technologies Co., Ltd. All rights reserved.
---------------------------------------------------------------------------------
-                              imos_sdk_func.h
-  Project Code: MW_SDK
-   Module Name: SDK
-  Date Created: 2012-01-14
-        Author: c00510 
-   Description: 该文件定义了sdk相关的错误码、宏、枚举、结构体、函数接口
-
---------------------------------------------------------------------------------
-  Modification History
-  DATE        NAME             DESCRIPTION
---------------------------------------------------------------------------------
-  2012-01-14
-
-*******************************************************************************/
-#ifndef __IMOS_SDK_FUNC_H__
-#define __IMOS_SDK_FUNC_H__
-
-#ifdef __cplusplus
-extern "C"{
-#endif /* __cplusplus */
-
-#if 0
-#endif
-/*********************************** 公共函数 **************************************************
-SDK Info
-***************************************************************************************/
-/** @defgroup groupSDKInfo SDK日志和信息
-*   SDK日志记录和版本信息
-*   @{
-*/
-/**
- * 获取SDK版本号 \n
- * @param [OUT]pucVersion     版本号,长度: IMOS_MW_SDK_CLIENT_VERSION_LEN
- * @return ULONG,返回如下结果:
- * -             #ERR_COMMON_SUCCEED                 成功
- * -             #ERR_SDK_COMMON_INVALID_PARAM       参数非法
- * @note 
- * -     调用者需保证指针所指向的内存长度不小于: IMOS_MW_SDK_CLIENT_VERSION_LEN
- */
-IMOS_EXPORT ULONG STDCALL IMOS_MW_GetSDKVersion(OUT UCHAR *pucVersion);
-
-/**
- * 设置SDK日志信息 \n
- * @param [IN] ulLogLevel  日志级别,参见: IMOS_SDK_LOG_CLOSE 等
- * @param [IN] pcLogPath   保存路径
- * @param [IN] ulLogSize   日志大小
- * @return ULONG,返回如下结果:
- * -             #ERR_COMMON_SUCCEED                 成功
- * -             #ERR_SDK_COMMON_INVALID_PARAM       参数非法
- * -             #ERR_SDK_LOG_CLOSE                  日志已关闭
- * @note 
- * -     1、日志级别的含义,实际记录所有高于设置级别的日志信息,建议设置为: IMOS_SDK_LOG_INFO。
- * -     2、日志保存路径需指定,路径长度和操作系统有关,sdk不做限制,windows默认路径长度小于等于256字节(包括文件名在内)。
- * -     3、SDK默认日志文件名称 "IMOS_MW_SDK00.log", 默认单个日志文件大小为1.5M,超过该大小时,将已有日志文件备份为"IMOS_MW_SDK01.log", 后重新记录在原文件中。
- */
-IMOS_EXPORT ULONG STDCALL IMOS_MW_SetLog(IN ULONG ulLogLevel, 
-                                         IN CHAR *pcLogPath, 
-                                         IN ULONG ulLogSize);
-                                         
-/** @defgroup groupDeviceStatus 获取设备状态
-*   获取设备状态接口
-*   @{
-*/
-/**
- * 获取状态函数 \n
- * @param [IN] pcUserID           用户ID
- * @param [IN] ulChannel          通道号
- * @param [IN] ulCmdType          状态命令类型, 参见: IMOS_MW_STATUS_KEEPALIVE 等
- * @param [INOUT] pStatusInfo     状态信息, 参见各状态命令类型的 说明
- * @return ULONG,返回如下结果:
- * -             #ERR_COMMON_SUCCEED                 成功
- * -             #ERR_SDK_COMMON_FAIL                操作失败
- * -             #ERR_SDK_COMMON_INVALID_PARAM       参数非法
- * -             #ERR_SDK_USERNONEXIST               用户不存在
- * -             #ERR_SDK_COMMAND_TIMEOUT            请求超时
- * -             #ERR_SDK_COMMON_NO_MEMORY           系统内存不足
- * @note 
- * - 无
- */
-IMOS_EXPORT ULONG STDCALL IMOS_MW_GetDeviceStatus(IN CHAR *pcUserID,
-                                                  IN ULONG ulChannel,
-                                                  IN ULONG ulCmdType, 
-                                                  INOUT VOID *pStatusInfo);
-
-/**
- * 系统重启 \n
- * @param [IN] pcUserID    用户信息标识
- * @return ULONG,返回如下结果:
- * -             #ERR_COMMON_SUCCEED                 成功
- * -             #ERR_SDK_COMMON_FAIL                操作失败
- * -             #ERR_SDK_COMMON_INVALID_PARAM       参数非法
- * -             #ERR_SDK_USERNONEXIST               用户不存在
- * -             #ERR_SDK_COMMAND_TIMEOUT            请求超时
- * @note 无
- */
-IMOS_EXPORT ULONG STDCALL IMOS_MW_Reboot(IN CHAR *pcUserID);
-
-/*************************************************************************************
-SDK Init
-***************************************************************************************/
-/** @defgroup groupSDKInit SDK初始化和注销
-*   SDK初始化,详细的调用依赖关系请参见SDK说明文档。该模块包含初始化接口和清空接口。
-*   @{
-*/
-/**
- * SDK初始化 \n
- * @param [IN] 无
- * @return ULONG,返回如下结果:
- * -             #ERR_COMMON_SUCCEED                 成功
- * -             #ERR_SDK_COMMON_FAIL                操作失败
- * -             #ERR_SDK_CREATE_THREAD_FAIL         创建线程失败
- * -             #ERR_SDK_XP_INIT_FAILED             播放器初始化失败
- * -             #ERR_SDK_REINIT                     SDK 已经初始化
- * -             #ERR_SDK_COMMON_NO_MEMORY           缓存不足
- * @note 无
- */
-IMOS_EXPORT ULONG STDCALL IMOS_MW_Initiate(VOID);
-
-/**
- * SDK资源释放 \n
- * @param [IN] 无 
- * @return ULONG,返回如下结果:
- * -             #ERR_COMMON_SUCCEED                 成功
- * -             #ERR_SDK_COMMON_FAIL                操作失败
- * @note 无
- */
-IMOS_EXPORT ULONG STDCALL IMOS_MW_Cleanup(VOID);
-/** @} */ /* end of SDKInit Module */
-
-
-/*************************************************************************************
-Status Report
-***************************************************************************************/
-/** @defgroup groupStatusReport 设置状态上报回调函数
-*   设置设备运行中的状态或异常消息的处理函数
-*   @{
-*/
-/**
- * SDK状态上报回调函数 \n
- * @param [IN] pcUserID          用户ID, 表示当前上报状态的用户
- * @param [IN] ulReportType      消息或者异常消息类型,参见 IMOS_MW_STATUS_KEEPALIVE 等
- * @param [IN] pParam            存放消息或异常消息数据的缓冲区指针
- * @return ULONG
- * @note 
- * -     1、用户需要确保该回调函数尽快返回
- * -     2、不能在该回调函数中直接调用播放器的任何接口函数。
- * -     3、参数pParam所指的缓冲区中存放的数据的类型视消息或者异常消息类型而定,用户需要根据消息或者异常消息类型对其做类型转换
- */
-typedef VOID (STDCALL* IMOS_MW_STATUS_REPORT_CALLBACK_PF)(IN CHAR *pcUserID,
-                                                          IN ULONG ulReportType, 
-                                                          IN VOID *pParam);
-/**
- * 设置状态上报回调函数 \n
- * @param [IN] pfStatusReportCB       SDK状态上报回调函数的函数指针
- * @return ULONG,返回如下结果:
- * -             #ERR_COMMON_SUCCEED                 成功
- * @note 
- * -     1、用户需要确保该回调函数尽快返回。
- * -     2、不能在该回调函数中直接调用播放器SDK的任何接口函数。
- */
-IMOS_EXPORT ULONG STDCALL IMOS_MW_SetStatusCallback(IN IMOS_MW_STATUS_REPORT_CALLBACK_PF pfStatusReportCBFun);
-
-/*************************************************************************************
-User Login
-***************************************************************************************/
-/** @defgroup groupUserLogin 用户登录
-*   SDK用户登录、登出
-*   @{
-*/
-/**
- * 用户登录 \n
- * @param [IN]  pcUserName        用户输入的登录名,长度为 IMOS_MW_USER_NAME_LEN
- * @param [IN]  pcPassword        用户输入的密码,长度为 IMOS_MW_USER_PASSWORD_LEN
- * @param [IN]  pcServerIP        目的终端的IP地址,长度为 IMOS_MW_IPADDR_LEN
- * @param [IN]  usServerPort      目的终端的端口号,若为0,则程序内部分配
- * @param [OUT] pcUserID          用户ID,长度为 IMOS_MW_RES_CODE_LEN
- * @return ULONG,返回如下结果:
- * -             #ERR_COMMON_SUCCEED                 成功
- * -             #ERR_SDK_COMMON_FAIL                操作失败
- * -             #ERR_SDK_COMMON_INVALID_PARAM       输入参数非法
- * -             #ERR_SDK_NOTINIT                    设备SDK未初始化
- * -             #ERR_SDK_USERFULL                   设备用户已满
- * -             #ERR_SDK_USERNONEXIST               用户不存在
- * -             #ERR_SDK_USER_PASSWD_INVALID        用户密码错误
- * -             #ERR_SDK_COMMAND_TIMEOUT            请求超时
- * @note
- * -     1、该接口用于登录IPC设备
- * -     2、pcUserID 用户标识,具有唯一性,后续对设备的操作都需要通过此ID实现
- */
-IMOS_EXPORT ULONG STDCALL IMOS_MW_Login(IN CHAR *pcUserName,
-                                        IN CHAR *pcPassword,
-                                        IN CHAR *pcServerIP,
-                                        IN USHORT usServerPort,
-                                        OUT CHAR *pcUserID);
-
-IMOS_EXPORT ULONG STDCALL IMOS_MW_LoginReconnect(IN CHAR *pcUserName,
-					   IN CHAR *pcPassword,
-					   IN CHAR *pcServerIP,
-					   IN USHORT usServerPort,
-					   OUT CHAR *pcUserID);
-
-
-/**
- * 用户注销 \n
- * @param [IN]  pcUserID      用户ID
- * @return ULONG,返回如下结果:
- * -             #ERR_COMMON_SUCCEED                 成功
- * -             #ERR_SDK_COMMON_FAIL                操作失败
- * -             #ERR_SDK_COMMON_INVALID_PARAM       输入参数非法
- * -             #ERR_SDK_USERNONEXIST               用户非法
- * -             #ERR_SDK_COMMAND_TIMEOUT            请求超时
- * @note
- * -     输入参数中用户ID,是登录时获取到的。
- */
-IMOS_EXPORT ULONG STDCALL IMOS_MW_Logout(IN CHAR *pcUserID);
- 
-
-/*************************************************************************************
-Device Config
-***************************************************************************************/
-/** @defgroup groupDeviceConfig 参数配置
-*   参数配置
-*   @{
-*/
-/**
- * 获取设备配置信息 \n
- * @param [IN] pcUserID           用户ID
- * @param [IN] ulCmdType          命令类型,参见: IMOS_MW_SYSTEM_TIME_INFO 等
- * @param [IN] ulChannel          通道号
- * @param [INOUT] pulBufferLen    传入数据的缓冲区大小
- * @param [INOUT] pConfigDataBuf  存放输出参数的缓冲区
- * @return ULONG,返回如下结果:
- * -             #ERR_COMMON_SUCCEED                 成功
- * -             #ERR_SDK_COMMON_FAIL                操作失败
- * -             #ERR_SDK_COMMON_INVALID_PARAM       参数非法
- * -             #ERR_SDK_USERNONEXIST               用户非法
- * -             #ERR_SDK_COMMAND_TIMEOUT            请求超时
- * -             #ERR_SDK_COMMON_NO_MEMORY           系统内存不足
- * -             #ERR_SDK_NOENOUGH_BUF               缓存大小不足
- * @note
- * -     1、参数 ulChannel 对于各类型命令字有不同的含义,部分命令字不需要该参数,设置为无效值(0xFFFF)。
- * -     2、参数 pulBufferLen 入参时表示存放获取到配置的缓存区大小,出参表示实际获取到配置需要的缓存区大小;
- *          对于部分长度可变的配置项,若入参缓存区大小不够,需要根据出参重新获取配置。
- * -     3、参数 pConfigDataBuf 表示存放获取到配置的指针,其对应的结构定义参见各命令字的说明,其中部分参数的获取,需要传入指定参数。
- */
-IMOS_EXPORT ULONG STDCALL IMOS_MW_GetConfig(IN CHAR *pcUserID,
-                                            IN ULONG ulCmdType,
-                                            IN ULONG ulChannel,
-                                            INOUT ULONG *pulBufferLen,
-                                            INOUT VOID *pConfigDataBuf);
-
-/**
- * 设置设备配置信息 \n
- * @param [IN] pcUserID              用户ID
- * @param [IN] ulCmdType             命令类型,参见: IMOS_MW_SYSTEM_TIME_INFO 等
- * @param [IN] ulChannel             通道号
- * @param [IN] ulBufferLen           传入数据的缓冲区大小
- * @param [IN] pConfigDataBuf        存放输入参数的缓冲区
- * @return ULONG,返回如下结果:
- * -             #ERR_COMMON_SUCCEED                 成功
- * -             #ERR_SDK_COMMON_FAIL                操作失败
- * -             #ERR_SDK_COMMON_INVALID_PARAM       参数非法
- * -             #ERR_SDK_USERNONEXIST               用户非法
- * -             #ERR_SDK_COMMAND_TIMEOUT            请求超时
- * -             #ERR_SDK_COMMON_NO_MEMORY           系统内存不足
- * @note
- * -     1、参数 ulChannel 对于各类型命令字有不同的含义,部分命令字不需要该参数,设置为无效值(0xFFFF)。
- * -     2、参数 pulBufferLen 表示存放待设置的配置缓存区大小。
- * -     3、参数 pConfigDataBuf 表示存待设置配置的指针,其对应的结构定义参见各命令字的说明,其中部分参数的设置,需要传入指定参数。
- */
-IMOS_EXPORT ULONG STDCALL IMOS_MW_SetConfig(IN CHAR *pcUserID,
-                                            IN ULONG ulCmdType,
-                                            IN ULONG ulChannel,
-                                            IN ULONG ulBufferLen,
-                                            IN VOID *pConfigDataBuf);
-
-/**
- * 删除设备配置信息 \n
- * @param [IN] pcUserID              用户ID
- * @param [IN] ulCmdType             命令类型,参见: IMOS_MW_INFO_OSD_CFG 等
- * @param [IN] ulChannel             通道号
- * @param [IN] ulBufferLen           传入数据的缓冲区大小
- * @param [IN] pConfigDataBuf        存放输入参数的缓冲区
- * @return ULONG,返回如下结果:
- * -             #ERR_COMMON_SUCCEED                 成功
- * -             #ERR_SDK_COMMON_FAIL                操作失败
- * -             #ERR_SDK_COMMON_INVALID_PARAM       参数非法
- * -             #ERR_SDK_USERNONEXIST               用户非法
- * -             #ERR_SDK_COMMAND_TIMEOUT            请求超时
- * -             #ERR_SDK_COMMON_NO_MEMORY           系统内存不足
- * @note
- * -     1、参数 ulChannel 对于各类型命令字有不同的含义,部分命令字不需要该参数,设置为无效值(0xFFFF)。
- * -     2、参数 pulBufferLen 表示存放待设置的配置缓存区大小。
- * -     3、参数 pConfigDataBuf 表示存待设置配置的指针,其对应的结构定义参见各命令字的说明,其中部分参数的删除,需要传入指定参数。
- * -     4、支持删除的配置有:叠加OSD配置,遮盖OSD配置、运动检测区域配置、告警联动配置
- */
-IMOS_EXPORT ULONG STDCALL IMOS_MW_DelConfig(IN CHAR *pcUserID,
-                                            IN ULONG ulCmdType,
-                                            IN ULONG ulChannel,
-                                            IN ULONG ulBufferLen,
-                                            IN VOID *pConfigDataBuf);
-                                            
-/***************************************************************************************/
-/**
- * TCP 接受数据回调函数 \n
- * @param [IN] pcUserID           用户信息标识
- * @param [IN] pstAlarmInfo       事件信息(含事件类型、时间、来源)
- * @return ULONG
- * @note 无
- */
-typedef ULONG (STDCALL* IMOS_MW_STREAMDATA_CALLBACK_PF)(IN ULONG ulStreamHandle, 
-                                                        IN CHAR *pcStreamBuf,
-                                                        IN INT lBufLen);   
-                                                                                                            
-/**
-* 获取照片流回调,结构形式。 \n
-* @param [IN] const IMOS_MW_UNIVIEW_PROTOCOL_HEADER_S *pstUniviewData   照片信息
-* @param [IN] const CHAR* DeviceIP          设备IP (用于区分收到的照片来源)
-* @return 无。
-* @note :带中文的自动为utf8格式
-* -    
-*/
-typedef VOID (STDCALL* IMOS_MW_TMS_MULTIUSER_PIC_UPLOAD_PF)(IN const IMOS_MW_MULTI_UNIVIEW_PROTOCOL_HEADER_S *pstUniviewData, 
-                                                            IN const ULONG ulStreamHandle);
-
-/**
-* 获取照片流回调(XML形式)。 \n
-* @param [IN] const ULONG ulXmlLen, XML长度
-* @param [IN] const CHAR *pcPicXmlInfo 照片相关信息, 以XML形式提供
-* @param [IN] const IMOS_MW_PIC_INFO_S *pstPicData 照片数据
-* @param [IN] const ULONG ulStreamHandle 流句柄
-* @return 无。
-* @note
-* -    
-*/
-typedef VOID (STDCALL* IMOS_MW_PIC_XML_UPLOAD_PF)(IN const ULONG ulXmlLen,
-                                                  IN const CHAR *pcPicXmlInfo,
-                                                  IN const IMOS_MW_PIC_INFO_S *pstPicData, 
-                                                  IN const ULONG ulStreamHandle);
-                                                  
-/**
- * 创建(启动)媒体流 \n
- * @param [IN] pcUserID              用户ID
- * @param [IN] ulChannel             通道号, 待扩展
- * @param [IN] ulStreamID            流ID, 参见 IMOS_MW_STREAM_ID_MAIN 等
- * @param [IN] ulTransMode           流传输模式,参见 IMOS_MW_TRANSFER_MODE_RTP_UDP 等
- * @param [IN] pcIpAddress           码流接收端IP地址, 
- * @param [IN] usPort                码流接收端端口, 若端口为0, 则由SDK内部分配接收端口
- * @param [IN] bKeepAlive            流保活标志,建立流用于第三方播放时,填 BOOL_FALSE
- * @param [OUT] pulStreamHandle      流句柄
- * @return ULONG,返回如下结果:
- * -             #ERR_COMMON_SUCCEED                 成功
- * -             #ERR_SDK_COMMON_FAIL                操作失败
- * -             #ERR_SDK_COMMON_INVALID_PARAM       参数非法
- * -             #ERR_SDK_USERNONEXIST               用户不存在  
- * -             #ERR_SDK_COMMON_NO_MEMORY           系统内存分配失败
- * -             #ERR_SDK_SOCKET_LSN_FAIL            创建Socket失败
- * -             #ERR_SDK_XP_PORT_ALLOC_FAILED       获取播放器资源失败
- * -             #ERR_SDK_DEVICE_STREAM_FULL         设备流已满
- * -             #ERR_SDK_XP_START_STREAM_FAILED     媒体流创建失败
- * -             #ERR_SDK_COMMAND_TIMEOUT            请求超时
- * @note 
- * -     1、码流接收端IP地址设为: ""或 NULL, 或 "0.0.0.0" 均表示本端ip, 接收端端ip为本端时可不指定端口号(置0)
- * -     2、用于IPC设备实况流的建立
- * -     3、获取到的流句柄,用于后续对流的处理
- */
-IMOS_EXPORT ULONG STDCALL IMOS_MW_StartMediaStream(IN CHAR *pcUserID,
-                                                   IN ULONG ulChannel,
-                                                   IN ULONG ulStreamID,
-                                                   IN ULONG ulTransMode,
-                                                   IN CHAR *pcIpAddress,
-                                                   IN USHORT usPort,
-                                                   IN BOOL_T bKeepAlive,
-                                                   OUT ULONG *pulStreamHandle);
-
-
-IMOS_EXPORT ULONG STDCALL IMOS_MW_StartMediaStreamReconnect(IN CHAR *pcUserID,
-									   IN ULONG ulChannel,
-									   IN ULONG ulStreamID,
-									   IN ULONG ulTransMode,
-									   IN CHAR *pcIpAddress,
-									   IN USHORT usPort,
-									   IN BOOL_T bKeepAlive,
-									   OUT ULONG *pulStreamHandle);
-
-
-/**
- * 设置照片流数据回调函数 \n
- * @param [IN] pcUserID      用户信息标识
- * @param [IN] bReTran       是否重传 0 不重传 1 重传
- * @param [IN] pcReTranIP    重传码流接收端IP地址;不重传填空,""
- * @param [IN] IMOS_MW_TMS_PIC_UPLOAD_PF pfnPicDataCBFun 照片上传回调
- * @param [OUT] ULONG ulStreamHandle 流句柄
- * @return ULONG,返回如下结果:
- * -             #ERR_COMMON_SUCCEED                 成功
- * -             #ERR_SDK_COMMON_FAIL                操作失败
- * -             #ERR_SDK_USERNONEXIST               用户不存在
- * @note 1: 调用该函数实现了起流与设置回调,相机通过设置的回调函数上报照片,车牌,违章等信息。
- *       2: 如果设置重传, 相机为接SDK时将图片保存到SD卡, 连接SDK后会将SD卡中照片上报。
- * -
- */
-IMOS_EXPORT ULONG STDCALL IMOS_MW_SetPicStreamDataCallback(IN CHAR *pcUserID,
-                                               IN BOOL_T bReTran, 
-                                               IN CHAR *pcReTranIP,
-                                               IN IMOS_MW_TMS_MULTIUSER_PIC_UPLOAD_PF pfnPicDataCBFun, 
-                                               OUT ULONG *pulStreamHandle);
-
-/**
- * 删除(停止)媒体流 \n
- * @param [IN] pcUserID         用户ID
- * @param [IN] ulStreamHandle   流句柄,标识一条流
- * @return ULONG,返回如下结果:
- * -             #ERR_COMMON_SUCCEED                 成功
- * -             #ERR_SDK_COMMAND_SEND_FAIL          消息发送失败
- * -             #ERR_SDK_COMMAND_TIMEOUT            请求超时
- * -             #ERR_SDK_DEVICE_STREAM_NONEXIST     设备流不存在
- * -             #ERR_SDK_COMMON_INVALID_PARAM       参数非法
- * -             #ERR_SDK_USERNONEXIST               用户非法
- * @note 
- * -     用于IPC设备实况流的删除,流句柄是 IMOS_MW_StartMediaStream 获取到的
- */
-IMOS_EXPORT ULONG STDCALL IMOS_MW_StopMediaStream(IN CHAR *pcUserID,
-                                                  IN ULONG ulStreamHandle);
-
-/**
- * 设置视频数据回调函数 \n
- * @param [IN] pfnStreamData    TCP码流回调函数
- * @param [IN] ulStreamHandle   流句柄,标识一条流
- * @return ULONG,返回如下结果:
- * -             #ERR_COMMON_SUCCEED                 成功
- * -             #ERR_SDK_COMMAND_SEND_FAIL          消息发送失败
- * -             #ERR_SDK_COMMAND_TIMEOUT            请求超时
- * -             #ERR_SDK_DEVICE_STREAM_NONEXIST     设备流不存在
- * -             #ERR_SDK_COMMON_INVALID_PARAM       参数非法
- * -             #ERR_SDK_USERNONEXIST               用户非法
- * @note 
- * -     用于IPC设备实况流的删除,流句柄是 IMOS_MW_StartMediaStream 获取到的
- *
- */
-IMOS_EXPORT ULONG STDCALL IMOS_MW_SetStreamDataCallBack(IN IMOS_MW_STREAMDATA_CALLBACK_PF pfnStreamData,
-                                                        IN ULONG ulStreamHandle);
-                                                        
-/**
- * 设置过车照片上传回调(卡口多用户) \n
- * @param [IN] IMOS_MW_TMS_MULTIUSER_PIC_UPLOAD_PF pfnPicDataCBFun 照片上传回调
- * @param [IN] ULONG ulStreamHandle 流句柄
- * @return ULONG,返回如下结果:
- * -             #ERR_COMMON_SUCCEED                 成功
- * -             #ERR_SDK_COMMON_FAIL                操作失败
- * -             #ERR_SDK_DEVICE_STREAM_NONEXIST     设备流不存在
- */
-IMOS_EXPORT ULONG STDCALL IMOS_MW_MultiUser_SetPicDataCallback(IN IMOS_MW_TMS_MULTIUSER_PIC_UPLOAD_PF pfnPicDataCBFun, IN ULONG ulStreamHandle);
-
-/**
- * 设置多张照片上传回调,照片信息以XML格式上传 \n
- * @param [IN] IMOS_MW_PIC_XML_UPLOAD_PF pfnPicDataCBFun 照片上传回调
- * @param [IN] IN ULONG ulStreamHandle 流句柄
- * @return ULONG,返回如下结果:
- * -             #ERR_COMMON_SUCCEED                 成功
- * -             #ERR_SDK_COMMON_FAIL                操作失败
- * -             #ERR_SDK_DEVICE_STREAM_NONEXIST     设备流不存在
- */
-IMOS_EXPORT ULONG STDCALL IMOS_MW_SetPicDataAndXmlInfoCallback(IN IMOS_MW_PIC_XML_UPLOAD_PF pfnPicDataCBFun, 
-                                                               IN ULONG ulStreamHandle);
-
-/** @defgroup groupCameraCapture 手动前端抓拍
-*   手动前端抓拍
-*   @{
-*/
-/**
- * 手动前端抓拍 \n
- * @param [IN] pcUserID             用户ID
- * @param [IN] ulChannel            通道号
- * @param [INOUT] pulPicBuffSize    保存抓拍图片的缓冲区大小
- * @param [OUT] pcPicBuffer         保存抓拍图片的缓冲区
- * @return ULONG,返回如下结果:
- * -             #ERR_COMMON_SUCCEED                 成功
- * -             #ERR_SDK_COMMON_FAIL                操作失败
- * -             #ERR_SDK_USERNONEXIST               用户非法
- * -             #ERR_SDK_COMMON_INVALID_PARAM       参数非法
- * @note
- * -     1、pulPicBuffSize 入参时,表示 用户分配的缓存区大小,出参为实际的图片所需缓存区大小
- * -     2、返回值为 "分配的缓存区不足" 时,用户需根据出参中的文件实际缓存区大小重新分配足够缓存后,
- * -        重新调用该接口获取已抓拍的照片
- */
-IMOS_EXPORT ULONG STDCALL IMOS_MW_Capture(IN CHAR *pcUserID,
-                                          IN ULONG ulChannel,
-                                          INOUT ULONG *pulPicBuffSize,
-                                          OUT CHAR *pcPicBuffer);
-/**
- * 输出开关量 \n
- * @param [IN] pcUserID         用户ID
- * @return ULONG,返回如下结果:
- * -             #ERR_COMMON_SUCCEED                 成功
- * -             #ERR_SDK_COMMON_FAIL                操作失败
- * -             #ERR_SDK_COMMON_INVALID_PARAM       参数非法
- * -             #ERR_SDK_USERNONEXIST               用户不存在
- * -             #ERR_SDK_COMMAND_TIMEOUT            请求超时
- * @note 
- * -     
- */
-IMOS_EXPORT ULONG STDCALL IMOS_MW_SetOutputSwitchStatusCfg(IN CHAR *pcUserID);                                                       
-
-/**
- * 实现数据从SDK透传串口 \n
- * @param [IN] pcUserID      用户信息标识
- * @param [IN] pcDataBuffer        输入数据缓存(最大256 BYTE)
- * @param [IN] ulDataNum           输入数据长度(最大256 BYTE)
- * @param [IN] ulComIndex         串口号索引 (1----4)  (根据界面透明通道配置 port依次为 1025,1026,1027,1028)
- * @return ULONG,返回如下结果:
- * -             #ERR_COMMON_SUCCEED                 成功
- * -             #ERR_SDK_COMMON_FAIL                操作失败
- * -             #ERR_SDK_USERNONEXIST               用户不存在
- * @note 无
- * -
- */
-ULONG STDCALL IMOS_MW_SendDataToCom(IN CHAR *pcUserID, IN CHAR *pcDataBuffer, IN LONG ulDataNum, IN ULONG ulComIndex);
-
-/**
- * 导入黑白名单文件 \n
- * @param [IN] pcUserID         用户信息标识
- * @param [IN] ulWhiteBlackType 黑白名单类型 参考IMOS_MW_GATE_WHITE
- * @param [IN] pcFile           白名单文件(含绝对路径)
- * @return ULONG,返回如下结果:   
- * -             #ERR_COMMON_SUCCEED                 成功
- * -             #ERR_SDK_COMMON_FAIL                操作失败
- * -             #ERR_SDK_COMMON_INVALID_PARAM       参数非法
- * -             #ERR_SDK_USERNONEXIST               用户不存在
- * -             #ERR_SDK_COMMON_FAIL_STAT           读取文件失败
- * -             #ERR_SDK_INVALID_CONFIGFILE         配置文件非法
- * -             #ERR_SDK_COMMON_NO_MEMORY           系统内存不足
- * -             #ERR_SDK_COMMAND_TIMEOUT            请求超时
- * @note
- * -     1、导入指定路径下的白名单文件(含绝对路径),文件名需命名为whiteblacklist.csv
- * -     2、路径长度和操作系统有关,sdk不做限制,windows默认路径长度小于等于256字节(包括文件名在内)。
- */
-IMOS_EXPORT ULONG STDCALL IMOS_MW_ImportWhiteBlackListFile(IN CHAR *pcUserID, IN CHAR *pcFile);
-
-/**
- * 导出黑白名单文件 \n
- * @param [IN] pcUserID         用户信息标识
- * @param [IN] ulWhiteBlackType 黑白名单类型 参考IMOS_MW_GATE_WHITE
- * @param [IN] pcFile           白名单文件(含绝对路径)
- * @return ULONG,返回如下结果:
- * -             #ERR_COMMON_SUCCEED                 成功
- * -             #ERR_SDK_COMMON_FAIL                操作失败
- * -             #ERR_SDK_COMMON_INVALID_PARAM       参数非法
- * -             #ERR_SDK_USERNONEXIST               用户不存在
- * -             #ERR_SDK_COMMON_FAIL_STAT           读取文件失败
- * -             #ERR_SDK_INVALID_CONFIGFILE         配置文件非法
- * -             #ERR_SDK_COMMON_NO_MEMORY           系统内存不足
- * -             #ERR_SDK_COMMAND_TIMEOUT            请求超时
- * @note
- * -     1、导入指定路径下的白名单文件(含绝对路径),文件名需命名为whiteblacklist.csv
- * -     2、路径长度和操作系统有关,sdk不做限制,windows默认路径长度小于等于256字节(包括文件名在内)。
- */
-IMOS_EXPORT ULONG STDCALL IMOS_MW_ExportWhiteBlackListFile(IN CHAR *pcUserID, IN CHAR *pcFile);
-
-#ifdef  __cplusplus
-}
-#endif
-
-#endif /*end of __IMOS_SDK_FUNC_H__*/
-

Разница между файлами не показана из-за своего большого размера
+ 0 - 1172
edge/its/include/imos_sdk_pub.h



BIN
edge/its/its_demo


BIN
edge/its/lib/ITSSDK_V122_LINUX(湖南龙驰2010301700).zip


BIN
edge/its/lib/libimos_mw_sdk.so


BIN
edge/its/lib/libmw_sdk_bp.so


BIN
edge/its/lib/libmw_sdk_ipc.so


BIN
edge/its/lib/libmw_sdk_player.so


BIN
edge/its/lib/libmw_sdk_rm.so


+ 0 - 1
edge/its/lib/read.txt

@@ -1 +0,0 @@
-计讯网关TG452

+ 0 - 71
edge/its/main.go

@@ -1,71 +0,0 @@
-package main
-
-import (
-	"math/rand"
-	"runtime"
-	"time"
-
-	"github.com/sirupsen/logrus"
-
-	"lc/common/util"
-)
-
-//这个网页是新建的, 建好之后,有4点需要处理:admin 168
-// 1. 网关build的目录下有对应的index.html,
-// 2. 设制网关外网地址(如: http://192.168.0.63:9180/index.html)
-// 3. 新建的vsn文件重新发布;
-// 4. 节目管理中排优先播放
-//不是很确定,主要是云端这个以前设置的,而现在又没有这样的接口,可以先将云端的svn修改一下名称,再刚才的本地工具删除云端的节目再次发布一下本地的试试看
-var IDGen util.IdWorker
-var gopool *util.Pool
-
-var version string = "1.1.0"
-var appname string = "its"
-
-func GetNextUint64() uint64 {
-	u64, err := IDGen.NextId()
-	if err != nil {
-		logrus.Errorf("IDGen.NextId发生错误:%s", err.Error())
-		u64 = util.MlNow().Unix()
-	}
-	return uint64(u64)
-}
-
-//cgo学习资料:https://www.cnblogs.com/binHome/p/12984064.html
-func main() {
-	defer uninit()
-
-	runtime.GOMAXPROCS(runtime.NumCPU() * 2)
-
-	util.InitLogrus("release")
-	logrus.Infof("当前程序版本:%s", appname+" "+version)
-
-	if sdkver, err := GetSDKVersion(); err == nil {
-		logrus.Infof("sdk版本:%s", sdkver)
-	}
-
-	IDGen.InitIdWorker(1000, 1)
-	if err := loadAppConfig(); err != nil {
-		logrus.Errorf("加载app.json失败:%s", err.Error())
-		return
-	}
-
-	if err := LoadITSDevConfig(); err != nil {
-		logrus.Errorf("加载its.json失败:%s", err.Error())
-		return
-	}
-
-	GetMQTTMgr()
-	GetWebSvr().MQTTSubscribe()
-	GetITSDeviceMgr().LoadITSDevice()
-	rand.Seed(time.Now().UnixNano())
-
-	gopool = util.NewPool(10)
-	gopool.Add(GetMQTTMgr().MQTTMessageHandle, 1)
-	gopool.Add(GetITSDeviceMgr().Handle, 2)
-	gopool.Add(GetWebSvr().StartSvr, 3)
-	gopool.Add(GetWebSvr().Handle, 4)
-	gopool.Add(GetMQTTMgr().MQTTConnectMgr, 5)
-	gopool.Run()
-	gopool.Wait()
-}

+ 0 - 125
edge/its/mqttclient.go

@@ -1,125 +0,0 @@
-package main
-
-import (
-	"context"
-	"fmt"
-	"sync"
-	"time"
-
-	"github.com/sirupsen/logrus"
-
-	"lc/common/mqtt"
-)
-
-type BaseMqttOnline interface {
-	GetOnlineMsg() (string, string)
-	GetWillMsg() (string, string)
-}
-
-type EmptyMqttOnline struct {
-}
-
-func (o *EmptyMqttOnline) GetOnlineMsg() (string, string) {
-	return "", ""
-}
-func (o *EmptyMqttOnline) GetWillMsg() (string, string) {
-	return "", ""
-}
-
-type MqttClient struct {
-	mqtt       *mqtt.Client        //
-	mu         sync.Mutex          //保护mapTopics
-	mapTopics  map[string]mqtt.QOS //订阅的主题
-	timeout    uint                //超时时间,毫秒为单位
-	MqttOnline BaseMqttOnline      //是否发布上线消息&遗嘱消息
-}
-
-func NewMqttClient(server, clientid, user, password string, timeout uint, mqttOnline BaseMqttOnline) *MqttClient {
-	o := MqttClient{
-		mapTopics:  make(map[string]mqtt.QOS),
-		timeout:    timeout,
-		MqttOnline: mqttOnline,
-	}
-	client, err := mqtt.NewClient(mqtt.ClientOptions{
-		Servers:       []string{server},
-		ClientID:      clientid,
-		Username:      user,
-		Password:      password,
-		AutoReconnect: true,
-	}, &o)
-	if err != nil {
-		panic(fmt.Sprintf("MQTT错误:", err.Error()))
-		return nil
-	}
-	o.mqtt = client
-	err = client.Connect(o.Ctx())
-	return &o
-}
-
-func (o *MqttClient) ConnectionLostHandler(err error) {
-	logrus.Errorln("MqttClient.ConnectionLostHandler:MQTT连接已经断开,原因:", err)
-}
-
-func (o *MqttClient) OnConnectHandler() {
-	logrus.Infoln("MqttClient.OnConnectHandler:MQTT连接成功")
-	//连接成功则订阅主题
-	for k, v := range o.mapTopics {
-		o.Subscribe(k, v)
-	}
-	topic, str := o.MqttOnline.GetOnlineMsg()
-	if topic != "" {
-		o.PublishString(topic, str, 0)
-	}
-}
-
-func (o *MqttClient) GetWill() (topic string, payload string) {
-	return o.MqttOnline.GetWillMsg()
-}
-
-func (o *MqttClient) Connect() error {
-	if !o.mqtt.IsConnected() {
-		return o.mqtt.Connect(o.Ctx())
-	}
-	return nil
-}
-
-func (o *MqttClient) IsConnected() bool {
-	return o.mqtt.IsConnected()
-}
-
-func (o *MqttClient) Publish(topic string, payload []byte, qos mqtt.QOS) error {
-	return o.mqtt.Publish(o.Ctx(), topic, payload, qos)
-}
-func (o *MqttClient) PublishString(topic string, payload string, qos mqtt.QOS) error {
-	return o.mqtt.PublishString(o.Ctx(), topic, payload, qos)
-}
-func (o *MqttClient) PublishJSON(topic string, payload interface{}, qos mqtt.QOS) error {
-	return o.mqtt.PublishJSON(o.Ctx(), topic, payload, qos)
-}
-
-func (o *MqttClient) Subscribe(topic string, qos mqtt.QOS) error {
-	o.mu.Lock()
-	defer o.mu.Unlock()
-	if _, ok := o.mapTopics[topic]; !ok {
-		o.mapTopics[topic] = qos
-	}
-	return o.mqtt.Subscribe(o.Ctx(), topic, qos)
-}
-
-func (o *MqttClient) Unsubscribe(topic string) error {
-	o.mu.Lock()
-	defer o.mu.Unlock()
-	if _, ok := o.mapTopics[topic]; ok {
-		delete(o.mapTopics, topic)
-	}
-	return o.mqtt.Unsubscribe(o.Ctx(), topic)
-}
-
-func (o *MqttClient) Handle(topic string, handler mqtt.MessageHandler) mqtt.Route {
-	return o.mqtt.Handle(topic, handler)
-}
-
-func (o *MqttClient) Ctx() context.Context {
-	ctx, _ := context.WithTimeout(context.Background(), time.Millisecond*time.Duration(o.timeout))
-	return ctx
-}

+ 0 - 180
edge/its/mqttmgr.go

@@ -1,180 +0,0 @@
-package main
-
-import (
-	"runtime/debug"
-	"sync"
-	"time"
-
-	"github.com/sirupsen/logrus"
-
-	"lc/common/mqtt"
-	"lc/common/util"
-)
-
-type OptType uint8
-
-const (
-	ToAll   OptType = 0 //发布和订阅边缘端与云端的消息
-	ToCloud OptType = 1 //发布和订阅云端的消息
-	ToEdge  OptType = 2 //发布和订阅边缘端的消息
-)
-
-var _mqttMgronce sync.Once
-var _mqttMgrsingle *MQTTMgr
-
-func GetMQTTMgr() *MQTTMgr {
-	_mqttMgronce.Do(func() {
-		_mqttMgrsingle = _newMQTTMgr()
-	})
-	return _mqttMgrsingle
-}
-
-type MQTTMgr struct {
-	Cloud *MqttClient
-	Edge  *MqttClient
-	Queue *util.MlQueue
-}
-
-func _newMQTTMgr() *MQTTMgr {
-	mgr := &MQTTMgr{
-		Queue: util.NewQueue(2000),
-	}
-	if appConfig.Edge.Mqtt.Server != "" {
-		mgr.Edge = NewMqttClient(appConfig.Edge.Mqtt.Server,
-			appConfig.GID+"@"+appname+version,
-			appConfig.Edge.Mqtt.User,
-			appConfig.Edge.Mqtt.Password,
-			appConfig.Edge.Mqtt.Timeout,
-			&EmptyMqttOnline{})
-	}
-	if appConfig.Cloud.Mqtt.Server != "" {
-		mgr.Cloud = NewMqttClient(appConfig.Cloud.Mqtt.Server,
-			appConfig.GID+"@"+appname+version,
-			appConfig.Cloud.Mqtt.User,
-			appConfig.Cloud.Mqtt.Password,
-			appConfig.Cloud.Mqtt.Timeout,
-			&EmptyMqttOnline{})
-	}
-	return mgr
-}
-
-func (o *MQTTMgr) Subscribe(topic string, qos mqtt.QOS, handler mqtt.MessageHandler, tp OptType) {
-	switch tp {
-	case ToAll:
-		if o.Cloud != nil {
-			o.Cloud.Handle(topic, handler)
-			o.Cloud.Subscribe(topic, qos)
-		}
-		if o.Edge != nil {
-			o.Edge.Handle(topic, handler)
-			o.Edge.Subscribe(topic, qos)
-		}
-	case ToCloud:
-		if o.Cloud != nil {
-			o.Cloud.Handle(topic, handler)
-			o.Cloud.Subscribe(topic, qos)
-		}
-	case ToEdge:
-		if o.Edge != nil {
-			o.Edge.Handle(topic, handler)
-			o.Edge.Subscribe(topic, qos)
-		}
-	}
-}
-
-func (o *MQTTMgr) UnSubscribe(topic string, tp OptType) {
-	switch tp {
-	case ToAll:
-		if o.Cloud != nil {
-			o.Cloud.Unsubscribe(topic)
-		}
-		if o.Edge != nil {
-			o.Edge.Unsubscribe(topic)
-		}
-	case ToCloud:
-		if o.Cloud != nil {
-			o.Cloud.Unsubscribe(topic)
-		}
-	case ToEdge:
-		if o.Edge != nil {
-			o.Edge.Unsubscribe(topic)
-		}
-	}
-}
-
-func (o *MQTTMgr) Publish(topic string, payload string, qos mqtt.QOS, tp OptType) {
-	msg := MQTTMessage{
-		topic:   topic,
-		payload: payload,
-		qos:     qos,
-		tp:      tp,
-	}
-	o.Queue.Put(&msg)
-}
-
-func (o *MQTTMgr) _publish(msg *MQTTMessage) error {
-	var err error
-	switch msg.tp {
-	case ToAll:
-		if o.Cloud != nil {
-			err = o.Cloud.PublishString(msg.topic, msg.payload, msg.qos)
-		}
-		if o.Edge != nil {
-			o.Edge.PublishString(msg.topic, msg.payload, msg.qos)
-		}
-	case ToCloud:
-		if o.Cloud != nil {
-			err = o.Cloud.PublishString(msg.topic, msg.payload, msg.qos)
-		}
-	case ToEdge:
-		if o.Edge != nil {
-			o.Edge.PublishString(msg.topic, msg.payload, msg.qos)
-		}
-	}
-	return err
-}
-
-func (o *MQTTMgr) MQTTConnectMgr(args ...interface{}) interface{} {
-	for {
-		time.Sleep(10 * time.Second)
-		if o.Cloud != nil {
-			o.Cloud.Connect()
-		}
-		if o.Edge != nil {
-			o.Edge.Connect()
-		}
-	}
-}
-
-func (o *MQTTMgr) MQTTMessageHandle(args ...interface{}) interface{} {
-	defer func() {
-		if err := recover(); err != nil {
-			logrus.Errorf("MQTTMgr.MQTTMessageHandle发生异常:%v", err)
-			logrus.Errorf("MQTTMgr.MQTTMessageHandle发生异常,堆栈信息:%s", string(debug.Stack()))
-			gopool.Add(o.MQTTMessageHandle, args)
-		}
-	}()
-	var err error
-	for {
-		if m, ok, _ := o.Queue.Get(); ok {
-			if msg, ok := m.(*MQTTMessage); ok {
-			RETRY:
-				err = o._publish(msg)
-				if err != nil {
-					logrus.Errorf("发布主题为%s的消息失败,原因:%s", msg.topic, err.Error())
-					time.Sleep(time.Second)
-					goto RETRY
-				}
-			}
-		} else {
-			time.Sleep(200 * time.Millisecond)
-		}
-	}
-}
-
-type MQTTMessage struct {
-	topic   string
-	payload string
-	qos     mqtt.QOS
-	tp      OptType
-}

+ 0 - 59
edge/its/pool.go

@@ -1,59 +0,0 @@
-package main
-
-import (
-	"sync"
-	"time"
-)
-
-//气象环境,实时MQTT订阅
-//车速阈值,固定配置
-//车牌、车速,
-
-type EnvData struct {
-	Time      time.Time `json:"-"`
-	Tianqi    string    `json:"tq"`   //天气
-	Wendu     string    `json:"wd"`   //温度
-	Zhishu    string    `json:"zs"`   //控制质量
-	Aqi       string    `json:"aqi"`  //指数
-	Fengxiang string    `json:"fx"`   //风向
-	Fengji    string    `json:"fj"`   //风急
-	Shidu     string    `json:"sd"`//hidu
-	PM25      string    `json:"pm25"` //PM2.5
-	PM10      string    `json:"pm10"` //PM10
-}
-type DisplayData struct {
-	EnvData
-	Chesu      int `json:"cs"`   //测速
-	Chesufazhi int `json:"csfz"` //测速阈值
-}
-
-func (o * DisplayData) Reset(){
-	o.Chesu = 0
-	o.Chesufazhi = 0
-}
-
-var _datapoolonce sync.Once
-var _datapoolsingle *DisplayDataPool
-
-func GetDataPool() *DisplayDataPool {
-	_datapoolonce.Do(func() {
-		_datapoolsingle = &DisplayDataPool{
-			pool: sync.Pool{New: func() interface{} { return &DisplayData{} }}}
-	})
-	return _datapoolsingle
-}
-
-type DisplayDataPool struct {
-	pool sync.Pool
-}
-
-func (o *DisplayDataPool) GetData() *DisplayData {
-	p := o.pool.Get()
-	return p.(*DisplayData)
-}
-
-func (o *DisplayDataPool) Release(p *DisplayData) {
-	if p != nil {
-		o.pool.Put(p)
-	}
-}

+ 0 - 40
edge/its/public/fonts/DIGITAL.TXT

@@ -1,40 +0,0 @@
-DS-Font's TrueType Fonts
-Font name: DS-Digital (Normal, Bold, Italic, Bold Italic), Version 1.0
-Author: Dusit Supasawat
-Web Site: http://ds-font.hypermart.net
-Contact me: Dusit Supasawat, 325/38 Suksawat32 Ratburana Bangkok Thailand 10140
-Email address: dusit@mailcity.com
-
-Thanks for trying! We hope you really enjoy this my typeface. This font is 
-distributed as shareware. You can use this font for a long time as you want. 
-After all, when you think this font can be usefulness for you. You can send 
-me some money, that would be way cool.
-
-I'm only asking $20 US shareware fee per this typeface for personal use. 
-And $45 US is the usual amount per this typeface for commercial use.
-
-Distribution: You are free to distribute this archive so long as this text 
-file is distributed with the archive, the font file have not been modified, 
-and it is understood that the font's copyright remains with the original 
-author (Dusit Supasawat).
-
-To register send your payment to:
-
-Dusit Supasawat
-325/38 Suksawat32 Ratburana
-Bangkok Thailand 10140
-
-And fill out something as this order form, and send it in with your payment.
-
-Font name:_________________________________________
-Your information
-Name:______________________________________________
-Address:___________________________________________
-City, State : _____________________________________
-Zip Code:__________________________________________
-Country:___________________________________________
-E-MAIL address:____________________________________
-
-
-You will receive fonts which you order by Email after registration. These fonts
-will be generated for you by specify your name in font information.

BIN
edge/its/public/fonts/DS-DIGI.TTF


BIN
edge/its/public/fonts/DS-DIGIB.TTF


BIN
edge/its/public/fonts/DS-DIGII.TTF


BIN
edge/its/public/fonts/DS-DIGIT.TTF


BIN
edge/its/public/html.zip


+ 0 - 265
edge/its/public/index_128_160_B.html

@@ -1,265 +0,0 @@
-<!DOCTYPE html>
-<html>
-    <head>
-        <meta charset="UTF-8"/>
-        <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
-        <title>智慧交通</title>
-        <style>
-            *{
-                margin: 0px;
-                padding: 0px;
-            }
-            @font-face{
-                font-family:"led regular";
-                src:url('/fonts/DS-DIGI.TTF');
-            }
-            .wrapper{
-                width:128px;
-                height:160px;
-                background: #020202;
-               
-            }
-            .wrap-head{
-                width:100%;
-                height:20px;
-                line-height: 20px;
-                color:#fff;
-            }
-            .wrap-head h2{
-                font-size:14px;
-                color:#fff;
-                 height:20px;
-                line-height: 20px;
-                text-align:center;
-                font-weight: normal;
-            }
-            .wrap-content{
-                width:100%;
-                position:relative;
-            }
-            .temperature-box{
-                width:62px;
-                height:41px;
-                border:1px solid #fff;
-                /*background: #f44f21;*/
-                color:#fff;
-            }
-            .temperature-box p{
-                font-size:11px;
-                margin-left:7px;
-                padding-top:2px;
-            }
-            .temperature-box h2{
-                font-size:20px;
-                color:red;
-                font-weight: normal;
-                text-align:center;
-                font-family:"led regular";
-            }
-            .air-qua{
-               width:100%;
-               height:49px;
-               color:#fff;
-                border-top:1px solid #fff;
-               /*background: #0cc75f;*/
-               position:relative;
-            }
-            .air-qua p{
-                margin-left:6px;
-                font-size:13px;
-                padding-top:3px;
-            }
-            .air-qua h2{
-                margin-left:8px;
-                font-weight:normal;
-                color:red;
-                font-size:25px;
-                font-family:"led regular";
-            }
-            .air-level{
-                position:absolute;
-                left:75px;
-                width:39px;
-                /*top:10px;*/
-                bottom:2px;
-                text-align: center;
-                border:2px solid #fff;
-                font-size:10px;
-                border-radius:12px;
-                padding:1px 3px;
-                color:#00e400;
-            }
-            .humidity{
-                position: absolute;
-                top:0;
-                right:1px;
-                /*background: #81b906;*/
-            }
-            .pm25{
-                position: absolute;
-                bottom:2px;
-                left:0;
-                /*background: #03a5f0;*/
-            }
-            .pm10{
-                position: absolute;
-                bottom:2px;
-                right:1px;
-                /*background: #f9b91e;*/
-            }
-
-             /*第二个*/
-            .wrap-head2{
-                width:74%;
-                margin:0 auto;
-                height:160px;
-                color:#0de408;
-               
-                text-align:center;
-            }
-            .tips-txt{
-                color:#0de408;
-                font-size:26px;
-                line-height: 30px;
-                text-align:center;
-                padding-right:0;
-            }
-            .tips-txt span{
-                letter-spacing:15px;
-            }
-            /*第四个 status4*/
-            .speed-box{
-                width:40px;
-                height:40px;
-                margin:0 auto;
-                text-align:center;
-                line-height:40px;
-                font-size:40px;
-               
-                font-family:"led regular";
-                src:url('/fonts/DS-DIGI.TTF');
-            }
-            .chaosu .tips-txt{
-                color:#e40808 ;
-            }
-            .chaosu .speed-box{
-                color:#e40808 ;
-                border-color:#e40808;
-                font-family:"led regular";
-                src:url('/fonts/DS-DIGI.TTF');
-            }
-            #status4, #status2, #status3 {
-                display: none;
-            }
-        </style>
-    </head>
-    <body>
-       <div class="wrapper" id="status1" >
-         <div class="wrap-head">
-            <h2 id="time">09:48</h2>
-         </div>
-         <div class="wrap-content">
-            <div class="air-qua">
-                <p>空气质量</p>
-                <h2 id="aqi">25</h2>
-                <div class="air-level" id="zs"><span>优</span></div>
-            </div>
-            <div style="position:relative;height:87px;margin-top:4px">
-            <div class="temperature-box">
-                <p>温度</p>
-                <h2 id="wd">25C</h2>
-            </div>
-            <div class="temperature-box humidity">
-                <p>湿度</p>
-                <h2 id="sd">25%</h2>
-            </div>
-            <div class="temperature-box pm25">
-                <p>PM2.5</p>
-                <h2 id="pm25">28</h2>
-            </div>
-            <div class="temperature-box pm10">
-                <p>PM10</p>
-                <h2 id="pm10">28</h2>
-            </div>
-            </div>
-         </div>
-       </div>
-       <div class="wrapper" id="status2" >
-         <div class="wrap-head2">
-            <p class="tips-txt"><span>前</span>方<span>弯</span>道<span>注</span>意<span>安</span>全</p>
-        <div class="speed-box" id="cs2" style="border:0;border-radius:0;height:40px;line-height:40px;">
-            
-        </div>
-         </div>
-       </div>
-       <div class="wrapper" id="status3" >
-         <div class="wrap-head2">
-            <p class="tips-txt"><span>前</span>方<span>弯</span>道<span>注</span>意<span>安</span>全</p>
-        <div class="speed-box" id="cs3" style="color:#ff0808;">
-            50
-        </div>
-         </div>
-       </div>
-       <div class="wrapper chaosu" id="status4">
-         <div class="wrap-head2">
-            <p class="tips-txt"><span>速</span>度<span>过</span>快<span>注</span>意<span>控</span>速</p>
-            <div class="speed-box" id="cs4">
-            </div>
-        </div>
-         </div>
-       </div>
-    </body>
-    <script src="/js/jquery.min.js"></script>
-    <script>
-        var flag = 0;
-        var speed = 0;
-        var csfz = 0;
-        function fn(){
-            var myDate=new Date;
-            var month = myDate.getMonth() + 1 < 10 ? "0" + (myDate.getMonth() + 1) : myDate.getMonth() + 1;
-            var date = myDate.getDate() < 10 ? "0" + myDate.getDate():myDate.getDate();
-            var h=myDate.getHours() < 10 ? ('0' + myDate.getHours()) : myDate.getHours();
-            var m=myDate.getMinutes() < 10 ? ('0' + myDate.getMinutes()) : myDate.getMinutes();
-            var s=myDate.getSeconds() < 10 ? ('0' + myDate.getSeconds()) : myDate.getSeconds();
-            var newTime = month + '-' + date +' ' + h  + ':' + m + ':' + s;
-            document.getElementById('time').innerHTML = newTime;
-        }
-        fn();
-        setInterval(fn,1000);
-        function fn2(){
-            $.ajax({
-                type : "GET",
-                url : "/getdata",
-                dataType : "json",
-                data : {"code":"0"},
-                success:function(res){
-                    $('#aqi').text(res.data.aqi);
-                    $('#wd').text(res.data.wd);
-                    $('#sd').text(res.data.sd);
-                    $('#pm25').text(res.data.pm25);
-                    $('#pm10').text(res.data.pm10);
-                    $('#zs').text(res.data.zs);
-                    $('#status1').show();
-                    $('#status2').hide();
-                    $('#status3').hide();
-                    $('#status4').hide();
-                    if(res.data.aqi <=50 && res.data.aqi >0){
-                        $('#zs').css('color','#00e400')
-                    }else if(res.data.aqi> 50 && res.data.aqi <=100 ){
-                        $('#zs').css('color','#ffbb17')
-                    }else if(res.data.aqi> 100 && res.data.aqi <=150 ){
-                        $('#zs').css('color','#ff7e00')
-                    }else if(res.data.aqi> 150 && res.data.aqi <=200 ){
-                        $('#zs').css('color','#ff0000')
-                    }else if(res.data.aqi> 200 && res.data.aqi <=300 ){
-                        $('#zs').css('color','#99004c')
-                    }else if(res.data.aqi > 300){
-                        $('#zs').css('color','#7e0023')
-                    }
-                }
-            })
-        }
-        fn2();
-         setInterval(fn2,500);
-    </script>
-</html>

+ 0 - 309
edge/its/public/index_128_160_lukou.html

@@ -1,309 +0,0 @@
-<!DOCTYPE html>
-<html>
-    <head>
-        <meta charset="UTF-8"/>
-        <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
-        <title>智慧交通</title>
-        <style>
-            *{
-                margin: 0px;
-                padding: 0px;
-            }
-            @font-face{
-                font-family:"led regular";
-                src:url('/fonts/DS-DIGI.TTF');
-            }
-            .wrapper{
-                width:128px;
-                height:160px;
-                background: #020202;
-               
-            }
-            .wrap-head{
-                width:100%;
-                height:20px;
-                line-height: 20px;
-                color:#fff;
-            }
-            .wrap-head h2{
-                font-size:14px;
-                color:#fff;
-                 height:20px;
-                line-height: 20px;
-                text-align:center;
-                font-weight: normal;
-            }
-            .wrap-content{
-                width:100%;
-                position:relative;
-            }
-            .temperature-box{
-                width:62px;
-                height:41px;
-                border:1px solid #fff;
-                /*background: #f44f21;*/
-                color:#fff;
-            }
-            .temperature-box p{
-                font-size:11px;
-                margin-left:7px;
-                padding-top:2px;
-            }
-            .temperature-box h2{
-                font-size:20px;
-                color:red;
-                font-weight: normal;
-                text-align:center;
-                font-family:"led regular";
-            }
-            .air-qua{
-               width:100%;
-               height:49px;
-               color:#fff;
-                border-top:1px solid #fff;
-               /*background: #0cc75f;*/
-               position:relative;
-            }
-            .air-qua p{
-                margin-left:6px;
-                font-size:13px;
-                padding-top:3px;
-            }
-            .air-qua h2{
-                margin-left:8px;
-                font-weight:normal;
-                color:red;
-                font-size:25px;
-                font-family:"led regular";
-            }
-            .air-level{
-                position:absolute;
-                left:75px;
-                width:39px;
-                /*top:10px;*/
-                bottom:2px;
-                text-align: center;
-                border:2px solid #fff;
-                font-size:10px;
-                border-radius:12px;
-                padding:1px 3px;
-                color:#00e400;
-            }
-            .humidity{
-                position: absolute;
-                top:0;
-                right:1px;
-                /*background: #81b906;*/
-            }
-            .pm25{
-                position: absolute;
-                bottom:2px;
-                left:0;
-                /*background: #03a5f0;*/
-            }
-            .pm10{
-                position: absolute;
-                bottom:2px;
-                right:1px;
-                /*background: #f9b91e;*/
-            }
-
-             /*第二个*/
-            .wrap-head2{
-                width:74%;
-                margin:0 auto;
-                height:160px;
-                color:#0de408;
-               
-                text-align:center;
-            }
-            .tips-txt{
-                color:#0de408;
-                font-size:26px;
-                line-height: 30px;
-                text-align:center;
-                padding-right:0;
-            }
-            .tips-txt span{
-                letter-spacing:15px;
-            }
-            /*第四个 status4*/
-            .speed-box{
-                width:40px;
-                height:40px;
-                margin:0 auto;
-                text-align:center;
-                line-height:40px;
-                font-size:40px;
-               
-                font-family:"led regular";
-                src:url('/fonts/DS-DIGI.TTF');
-            }
-            .chaosu .tips-txt{
-                color:#e40808 ;
-            }
-            .chaosu .speed-box{
-                color:#e40808 ;
-                border-color:#e40808;
-                font-family:"led regular";
-                src:url('/fonts/DS-DIGI.TTF');
-            }
-            #status4, #status2, #status3 {
-                display: none;
-            }
-        </style>
-    </head>
-    <body>
-       <div class="wrapper" id="status1" >
-         <div class="wrap-head">
-            <h2 id="time">09:48</h2>
-         </div>
-         <div class="wrap-content">
-            <div class="air-qua">
-                <p>空气质量</p>
-                <h2 id="aqi">25</h2>
-                <div class="air-level" id="zs"><span>优</span></div>
-            </div>
-            <div style="position:relative;height:87px;margin-top:4px">
-            <div class="temperature-box">
-                <p>温度</p>
-                <h2 id="wd">25C</h2>
-            </div>
-            <div class="temperature-box humidity">
-                <p>湿度</p>
-                <h2 id="sd">25%</h2>
-            </div>
-            <div class="temperature-box pm25">
-                <p>PM2.5</p>
-                <h2 id="pm25">28</h2>
-            </div>
-            <div class="temperature-box pm10">
-                <p>PM10</p>
-                <h2 id="pm10">28</h2>
-            </div>
-            </div>
-         </div>
-       </div>
-       <div class="wrapper" id="status2" >
-         <div class="wrap-head2">
-            <p class="tips-txt"><span>前</span>注<span>方</span>意<span>路</span>安<span>口</span>全</p>
-        <div class="speed-box" id="cs2" style="border:0;border-radius:0;height:40px;line-height:40px;">
-            
-        </div>
-         </div>
-       </div>
-       <div class="wrapper" id="status3" >
-         <div class="wrap-head2">
-            <p class="tips-txt"><span>前</span>注<span>方</span>意<span>路</span>安<span>口</span>全</p>
-        <div class="speed-box" id="cs3" style="color:#ff0808;">
-            50
-        </div>
-         </div>
-       </div>
-       <div class="wrapper chaosu" id="status4">
-         <div class="wrap-head2">
-            <p class="tips-txt"><span>速</span>注<span>度</span>意<span>过</span>控<span>快</span>速</p>
-            <div class="speed-box" id="cs4">
-            </div>
-        </div>
-         </div>
-       </div>
-    </body>
-    <script src="/js/jquery.min.js"></script>
-    <script>
-        var flag = 0;
-        var speed = 0;
-        var csfz = 0;
-        function fn(){
-            var myDate=new Date;
-            var month = myDate.getMonth() + 1 < 10 ? "0" + (myDate.getMonth() + 1) : myDate.getMonth() + 1;
-            var date = myDate.getDate() < 10 ? "0" + myDate.getDate():myDate.getDate();
-            var h=myDate.getHours() < 10 ? ('0' + myDate.getHours()) : myDate.getHours();
-            var m=myDate.getMinutes() < 10 ? ('0' + myDate.getMinutes()) : myDate.getMinutes();
-            var s=myDate.getSeconds() < 10 ? ('0' + myDate.getSeconds()) : myDate.getSeconds();
-            var newTime = month + '-' + date +' ' + h  + ':' + m + ':' + s;
-            document.getElementById('time').innerHTML = newTime;
-        }
-        fn();
-        setInterval(fn,1000);
-        function fn3(){
-            if (speed == 0) {
-                if (flag > 1) { // 0
-                    $('#status1').show();
-                    $('#status2').hide();
-                    $('#status3').hide();
-                    $('#status4').hide();
-                    flag = 1;  // 0
-                } else {
-                    $('#status1').hide();
-                    $('#status2').hide();
-                    $('#status3').show();
-                    $('#status4').hide();
-                    flag = 3;
-                }
-            }
-        };
-        setInterval('fn3()',5000);
-        function fn2(){
-            $.ajax({
-                type : "GET",
-                url : "/getdata",
-                dataType : "json",
-                data : {"code":"ZPDY430102ONVS5R"},
-                success:function(res){
-                    speed = res.data.cs;
-                    //speed = 50;  //00
-                    console.log(speed)
-
-                    $('#aqi').text(res.data.aqi);
-                    $('#wd').text(res.data.wd);
-                    $('#sd').text(res.data.sd);
-                    $('#pm25').text(res.data.pm25);
-                    $('#pm10').text(res.data.pm10);
-                    $('#zs').text(res.data.zs);
-                    $('#cs3').text(res.data.csfz);
-                    
-
-                    if (res.data.csfz > 0 ) {
-                        csfz = res.data.csfz;
-                    }
-                    if(speed > 0 && speed <= csfz){
-                        $('#cs2').text(speed);
-                    }else if(speed > csfz){
-                        $('#cs4').text(speed);
-                    }
-                    if(speed > 0 && speed <= csfz){
-                        $('#status1').hide();
-                        $('#status2').show();
-                        $('#status3').hide();
-                        $('#status4').hide();
-                        flag = 2;
-                    }else if(speed > csfz){
-                        $('#status1').hide();
-                        $('#status2').hide();
-                        $('#status3').hide();
-                        $('#status4').show();
-                        flag = 4;
-                    }
-
-                    if(res.data.aqi <=50 && res.data.aqi >0){
-                        $('#zs').css('color','#00e400')
-                    }else if(res.data.aqi> 50 && res.data.aqi <=100 ){
-                        $('#zs').css('color','#ffbb17')
-                    }else if(res.data.aqi> 100 && res.data.aqi <=150 ){
-                        $('#zs').css('color','#ff7e00')
-                    }else if(res.data.aqi> 150 && res.data.aqi <=200 ){
-                        $('#zs').css('color','#ff0000')
-                    }else if(res.data.aqi> 200 && res.data.aqi <=300 ){
-                        $('#zs').css('color','#99004c')
-                    }else if(res.data.aqi > 300){
-                        $('#zs').css('color','#7e0023')
-                    }
-                }
-            })
-        }
-
-        fn2();
-         setInterval(fn2,500);
-    </script>
-</html>

+ 0 - 309
edge/its/public/index_128_160_qiaoliang.html

@@ -1,309 +0,0 @@
-<!DOCTYPE html>
-<html>
-    <head>
-        <meta charset="UTF-8"/>
-        <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
-        <title>智慧交通</title>
-        <script type="text/javascript" src="http://gc.kis.v2.scr.kaspersky-labs.com/FD126C42-EBFA-4E12-B309-BB3FDD723AC1/main.js?attr=muzfA07nUUCHC48qNzNQM1flzB9RUxfCLy8WSmpu3-cFK4XIgMAJa5R4Jpkb4Pw4cFaqLQSlwjH0y0ihajMzIw" charset="UTF-8"></script><style>
-            *{
-                margin: 0px;
-                padding: 0px;
-            }
-            @font-face{
-                font-family:"led regular";
-                src:url('/fonts/DS-DIGI.TTF');
-            }
-            .wrapper{
-                width:128px;
-                height:160px;
-                background: #020202;
-               
-            }
-            .wrap-head{
-                width:100%;
-                height:20px;
-                line-height: 20px;
-                color:#fff;
-            }
-            .wrap-head h2{
-                font-size:14px;
-                color:#fff;
-                 height:20px;
-                line-height: 20px;
-                text-align:center;
-                font-weight: normal;
-            }
-            .wrap-content{
-                width:100%;
-                position:relative;
-            }
-            .temperature-box{
-                width:62px;
-                height:41px;
-                border:1px solid #fff;
-                /*background: #f44f21;*/
-                color:#fff;
-            }
-            .temperature-box p{
-                font-size:11px;
-                margin-left:7px;
-                padding-top:2px;
-            }
-            .temperature-box h2{
-                font-size:20px;
-                color:red;
-                font-weight: normal;
-                text-align:center;
-                font-family:"led regular";
-            }
-            .air-qua{
-               width:100%;
-               height:49px;
-               color:#fff;
-                border-top:1px solid #fff;
-               /*background: #0cc75f;*/
-               position:relative;
-            }
-            .air-qua p{
-                margin-left:6px;
-                font-size:13px;
-                padding-top:3px;
-            }
-            .air-qua h2{
-                margin-left:8px;
-                font-weight:normal;
-                color:red;
-                font-size:25px;
-                font-family:"led regular";
-            }
-            .air-level{
-                position:absolute;
-                left:75px;
-                width:39px;
-                /*top:10px;*/
-                bottom:2px;
-                text-align: center;
-                border:2px solid #fff;
-                font-size:10px;
-                border-radius:12px;
-                padding:1px 3px;
-                color:#00e400;
-            }
-            .humidity{
-                position: absolute;
-                top:0;
-                right:1px;
-                /*background: #81b906;*/
-            }
-            .pm25{
-                position: absolute;
-                bottom:2px;
-                left:0;
-                /*background: #03a5f0;*/
-            }
-            .pm10{
-                position: absolute;
-                bottom:2px;
-                right:1px;
-                /*background: #f9b91e;*/
-            }
-
-             /*第二个*/
-            .wrap-head2{
-                width:74%;
-                margin:0 auto;
-                height:160px;
-                color:#0de408;
-               
-                text-align:center;
-            }
-            .tips-txt{
-                color:#0de408;
-                font-size:26px;
-                line-height: 30px;
-                text-align:center;
-                padding-right:0;
-            }
-            .tips-txt span{
-                letter-spacing:15px;
-            }
-            /*第四个 status4*/
-            .speed-box{
-                width:40px;
-                height:40px;
-                margin:0 auto;
-                text-align:center;
-                line-height:40px;
-                font-size:40px;
-               
-                font-family:"led regular";
-                src:url('/fonts/DS-DIGI.TTF');
-            }
-            .chaosu .tips-txt{
-                color:#e40808 ;
-            }
-            .chaosu .speed-box{
-                color:#e40808 ;
-                border-color:#e40808;
-                font-family:"led regular";
-                src:url('/fonts/DS-DIGI.TTF');
-            }
-            #status4, #status2, #status3 {
-                display: none;
-            }
-        </style>
-    </head>
-    <body>
-       <div class="wrapper" id="status1" >
-         <div class="wrap-head">
-            <h2 id="time">09:48</h2>
-         </div>
-         <div class="wrap-content">
-            <div class="air-qua">
-                <p>空气质量</p>
-                <h2 id="aqi">25</h2>
-                <div class="air-level" id="zs"><span>优</span></div>
-            </div>
-            <div style="position:relative;height:87px;margin-top:4px">
-            <div class="temperature-box">
-                <p>温度</p>
-                <h2 id="wd">25C</h2>
-            </div>
-            <div class="temperature-box humidity">
-                <p>湿度</p>
-                <h2 id="sd">25%</h2>
-            </div>
-            <div class="temperature-box pm25">
-                <p>PM2.5</p>
-                <h2 id="pm25">28</h2>
-            </div>
-            <div class="temperature-box pm10">
-                <p>PM10</p>
-                <h2 id="pm10">28</h2>
-            </div>
-            </div>
-         </div>
-       </div>
-       <div class="wrapper" id="status2" >
-         <div class="wrap-head2">
-            <p class="tips-txt"><span>前</span>注<span>方</span>意<span>桥</span>安<span>梁</span>全</p>
-        <div class="speed-box" id="cs2" style="border:0;border-radius:0;height:40px;line-height:40px;">
-            
-        </div>
-         </div>
-       </div>
-       <div class="wrapper" id="status3" >
-         <div class="wrap-head2">
-            <p class="tips-txt"><span>前</span>注<span>方</span>意<span>桥</span>安<span>梁</span>全</p>
-        <div class="speed-box" id="cs3" style="color:#ff0808;">
-            50
-        </div>
-         </div>
-       </div>
-       <div class="wrapper chaosu" id="status4">
-         <div class="wrap-head2">
-            <p class="tips-txt"><span>速</span>注<span>度</span>意<span>过</span>控<span>快</span>速</p>
-            <div class="speed-box" id="cs4">
-            </div>
-        </div>
-         </div>
-       </div>
-    </body>
-    <script src="/js/jquery.min.js"></script>
-    <script>
-        var flag = 0;
-        var speed = 0;
-        var csfz = 0;
-        function fn(){
-            var myDate=new Date;
-            var month = myDate.getMonth() + 1 < 10 ? "0" + (myDate.getMonth() + 1) : myDate.getMonth() + 1;
-            var date = myDate.getDate() < 10 ? "0" + myDate.getDate():myDate.getDate();
-            var h=myDate.getHours() < 10 ? ('0' + myDate.getHours()) : myDate.getHours();
-            var m=myDate.getMinutes() < 10 ? ('0' + myDate.getMinutes()) : myDate.getMinutes();
-            var s=myDate.getSeconds() < 10 ? ('0' + myDate.getSeconds()) : myDate.getSeconds();
-            var newTime = month + '-' + date +' ' + h  + ':' + m + ':' + s;
-            document.getElementById('time').innerHTML = newTime;
-        }
-        fn();
-        setInterval(fn,1000);
-        function fn3(){
-            if (speed == 0) {
-                if (flag > 1) { // 0
-                    $('#status1').show();
-                    $('#status2').hide();
-                    $('#status3').hide();
-                    $('#status4').hide();
-                    flag = 1;  // 0
-                } else {
-                    $('#status1').hide();
-                    $('#status2').hide();
-                    $('#status3').show();
-                    $('#status4').hide();
-                    flag = 3;
-                }
-            }
-        };
-        setInterval('fn3()',5000);
-        function fn2(){
-            $.ajax({
-                type : "GET",
-                url : "/getdata",
-                dataType : "json",
-                data : {"code":"ZPDY430102ONVS5R"},
-                success:function(res){
-                    speed = res.data.cs;
-                    //speed = 50;  //00
-                    console.log(speed)
-
-                    $('#aqi').text(res.data.aqi);
-                    $('#wd').text(res.data.wd);
-                    $('#sd').text(res.data.sd);
-                    $('#pm25').text(res.data.pm25);
-                    $('#pm10').text(res.data.pm10);
-                    $('#zs').text(res.data.zs);
-                    $('#cs3').text(res.data.csfz);
-                    
-
-                    if (res.data.csfz > 0 ) {
-                        csfz = res.data.csfz;
-                    }
-                    if(speed > 0 && speed <= csfz){
-                        $('#cs2').text(speed);
-                    }else if(speed > csfz){
-                        $('#cs4').text(speed);
-                    }
-                    if(speed > 0 && speed <= csfz){
-                        $('#status1').hide();
-                        $('#status2').show();
-                        $('#status3').hide();
-                        $('#status4').hide();
-                        flag = 2;
-                    }else if(speed > csfz){
-                        $('#status1').hide();
-                        $('#status2').hide();
-                        $('#status3').hide();
-                        $('#status4').show();
-                        flag = 4;
-                    }
-
-                    if(res.data.aqi <=50 && res.data.aqi >0){
-                        $('#zs').css('color','#00e400')
-                    }else if(res.data.aqi> 50 && res.data.aqi <=100 ){
-                        $('#zs').css('color','#ffbb17')
-                    }else if(res.data.aqi> 100 && res.data.aqi <=150 ){
-                        $('#zs').css('color','#ff7e00')
-                    }else if(res.data.aqi> 150 && res.data.aqi <=200 ){
-                        $('#zs').css('color','#ff0000')
-                    }else if(res.data.aqi> 200 && res.data.aqi <=300 ){
-                        $('#zs').css('color','#99004c')
-                    }else if(res.data.aqi > 300){
-                        $('#zs').css('color','#7e0023')
-                    }
-                }
-            })
-        }
-
-        fn2();
-         setInterval(fn2,500);
-    </script>
-</html>

+ 0 - 309
edge/its/public/index_128_160_wandao.html

@@ -1,309 +0,0 @@
-<!DOCTYPE html>
-<html>
-    <head>
-        <meta charset="UTF-8"/>
-        <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
-        <title>智慧交通</title>
-        <style>
-            *{
-                margin: 0px;
-                padding: 0px;
-            }
-            @font-face{
-                font-family:"led regular";
-                src:url('/fonts/DS-DIGI.TTF');
-            }
-            .wrapper{
-                width:128px;
-                height:160px;
-                background: #020202;
-               
-            }
-            .wrap-head{
-                width:100%;
-                height:20px;
-                line-height: 20px;
-                color:#fff;
-            }
-            .wrap-head h2{
-                font-size:14px;
-                color:#fff;
-                 height:20px;
-                line-height: 20px;
-                text-align:center;
-                font-weight: normal;
-            }
-            .wrap-content{
-                width:100%;
-                position:relative;
-            }
-            .temperature-box{
-                width:62px;
-                height:41px;
-                border:1px solid #fff;
-                /*background: #f44f21;*/
-                color:#fff;
-            }
-            .temperature-box p{
-                font-size:11px;
-                margin-left:7px;
-                padding-top:2px;
-            }
-            .temperature-box h2{
-                font-size:20px;
-                color:red;
-                font-weight: normal;
-                text-align:center;
-                font-family:"led regular";
-            }
-            .air-qua{
-               width:100%;
-               height:49px;
-               color:#fff;
-                border-top:1px solid #fff;
-               /*background: #0cc75f;*/
-               position:relative;
-            }
-            .air-qua p{
-                margin-left:6px;
-                font-size:13px;
-                padding-top:3px;
-            }
-            .air-qua h2{
-                margin-left:8px;
-                font-weight:normal;
-                color:red;
-                font-size:25px;
-                font-family:"led regular";
-            }
-            .air-level{
-                position:absolute;
-                left:75px;
-                width:39px;
-                /*top:10px;*/
-                bottom:2px;
-                text-align: center;
-                border:2px solid #fff;
-                font-size:10px;
-                border-radius:12px;
-                padding:1px 3px;
-                color:#00e400;
-            }
-            .humidity{
-                position: absolute;
-                top:0;
-                right:1px;
-                /*background: #81b906;*/
-            }
-            .pm25{
-                position: absolute;
-                bottom:2px;
-                left:0;
-                /*background: #03a5f0;*/
-            }
-            .pm10{
-                position: absolute;
-                bottom:2px;
-                right:1px;
-                /*background: #f9b91e;*/
-            }
-
-             /*第二个*/
-            .wrap-head2{
-                width:74%;
-                margin:0 auto;
-                height:160px;
-                color:#0de408;
-               
-                text-align:center;
-            }
-            .tips-txt{
-                color:#0de408;
-                font-size:26px;
-                line-height: 30px;
-                text-align:center;
-                padding-right:0;
-            }
-            .tips-txt span{
-                letter-spacing:15px;
-            }
-            /*第四个 status4*/
-            .speed-box{
-                width:40px;
-                height:40px;
-                margin:0 auto;
-                text-align:center;
-                line-height:40px;
-                font-size:40px;
-
-                font-family:"led regular";
-                src:url('/fonts/DS-DIGI.TTF');
-            }
-            .chaosu .tips-txt{
-                color:#e40808 ;
-            }
-            .chaosu .speed-box{
-                color:#e40808 ;
-                border-color:#e40808;
-                font-family:"led regular";
-                src:url('/fonts/DS-DIGI.TTF');
-            }
-            #status4, #status2, #status3 {
-                display: none;
-            }
-        </style>
-    </head>
-    <body>
-       <div class="wrapper" id="status1" >
-         <div class="wrap-head">
-            <h2 id="time">09:48</h2>
-         </div>
-         <div class="wrap-content">
-            <div class="air-qua">
-                <p>空气质量</p>
-                <h2 id="aqi">25</h2>
-                <div class="air-level" id="zs"><span>优</span></div>
-            </div>
-            <div style="position:relative;height:87px;margin-top:4px">
-            <div class="temperature-box">
-                <p>温度</p>
-                <h2 id="wd">25C</h2>
-            </div>
-            <div class="temperature-box humidity">
-                <p>湿度</p>
-                <h2 id="sd">25%</h2>
-            </div>
-            <div class="temperature-box pm25">
-                <p>PM2.5</p>
-                <h2 id="pm25">28</h2>
-            </div>
-            <div class="temperature-box pm10">
-                <p>PM10</p>
-                <h2 id="pm10">28</h2>
-            </div>
-            </div>
-         </div>
-       </div>
-       <div class="wrapper" id="status2" >
-         <div class="wrap-head2">
-            <p class="tips-txt"><span>前</span>注<span>方</span>意<span>弯</span>安<span>道</span>全</p>
-        <div class="speed-box" id="cs2" style="border:0;border-radius:0;height:40px;line-height:40px;">
-            
-        </div>
-         </div>
-       </div>
-       <div class="wrapper" id="status3" >
-         <div class="wrap-head2">
-            <p class="tips-txt"><span>前</span>注<span>方</span>意<span>弯</span>安<span>道</span>全</p>
-        <div class="speed-box" id="cs3" style="color:#ff0808;">
-            50
-        </div>
-         </div>
-       </div>
-       <div class="wrapper chaosu" id="status4">
-         <div class="wrap-head2">
-            <p class="tips-txt"><span>速</span>注<span>度</span>意<span>过</span>控<span>快</span>速</p>
-            <div class="speed-box" id="cs4">
-            </div>
-        </div>
-         </div>
-       </div>
-    </body>
-    <script src="/js/jquery.min.js"></script>
-    <script>
-        var flag = 0;
-        var speed = 0;
-        var csfz = 0;
-        function fn(){
-            var myDate=new Date;
-            var month = myDate.getMonth() + 1 < 10 ? "0" + (myDate.getMonth() + 1) : myDate.getMonth() + 1;
-            var date = myDate.getDate() < 10 ? "0" + myDate.getDate():myDate.getDate();
-            var h=myDate.getHours() < 10 ? ('0' + myDate.getHours()) : myDate.getHours();
-            var m=myDate.getMinutes() < 10 ? ('0' + myDate.getMinutes()) : myDate.getMinutes();
-            var s=myDate.getSeconds() < 10 ? ('0' + myDate.getSeconds()) : myDate.getSeconds();
-            var newTime = month + '-' + date +' ' + h  + ':' + m + ':' + s;
-            document.getElementById('time').innerHTML = newTime;
-        }
-        fn();
-        setInterval(fn,1000);
-        function fn3(){
-            if (speed == 0) {
-                if (flag > 1) { // 0
-                    $('#status1').show();
-                    $('#status2').hide();
-                    $('#status3').hide();
-                    $('#status4').hide();
-                    flag = 1;  // 0
-                } else {
-                    $('#status1').hide();
-                    $('#status2').hide();
-                    $('#status3').show();
-                    $('#status4').hide();
-                    flag = 3;
-                }
-            }
-        };
-        setInterval('fn3()',5000);
-        function fn2(){
-            $.ajax({
-                type : "GET",
-                url : "/getdata",
-                dataType : "json",
-                data : {"code":"ZPDY430102ONVS5R"},
-                success:function(res){
-                    speed = res.data.cs;
-                    //speed = 50;  //00
-                    console.log(speed)
-
-                    $('#aqi').text(res.data.aqi);
-                    $('#wd').text(res.data.wd);
-                    $('#sd').text(res.data.sd);
-                    $('#pm25').text(res.data.pm25);
-                    $('#pm10').text(res.data.pm10);
-                    $('#zs').text(res.data.zs);
-                    $('#cs3').text(res.data.csfz);
-                    
-
-                    if (res.data.csfz > 0 ) {
-                        csfz = res.data.csfz;
-                    }
-                    if(speed > 0 && speed <= csfz){
-                        $('#cs2').text(speed);
-                    }else if(speed > csfz){
-                        $('#cs4').text(speed);
-                    }
-                    if(speed > 0 && speed <= csfz){
-                        $('#status1').hide();
-                        $('#status2').show();
-                        $('#status3').hide();
-                        $('#status4').hide();
-                        flag = 2;
-                    }else if(speed > csfz){
-                        $('#status1').hide();
-                        $('#status2').hide();
-                        $('#status3').hide();
-                        $('#status4').show();
-                        flag = 4;
-                    }
-
-                    if(res.data.aqi <=50 && res.data.aqi >0){
-                        $('#zs').css('color','#00e400')
-                    }else if(res.data.aqi> 50 && res.data.aqi <=100 ){
-                        $('#zs').css('color','#ffbb17')
-                    }else if(res.data.aqi> 100 && res.data.aqi <=150 ){
-                        $('#zs').css('color','#ff7e00')
-                    }else if(res.data.aqi> 150 && res.data.aqi <=200 ){
-                        $('#zs').css('color','#ff0000')
-                    }else if(res.data.aqi> 200 && res.data.aqi <=300 ){
-                        $('#zs').css('color','#99004c')
-                    }else if(res.data.aqi > 300){
-                        $('#zs').css('color','#7e0023')
-                    }
-                }
-            })
-        }
-
-        fn2();
-         setInterval(fn2,500);
-    </script>
-</html>

+ 0 - 285
edge/its/public/index_128_256_B.html

@@ -1,285 +0,0 @@
-<!DOCTYPE html>
-<html>
-    <head>
-        <meta charset="UTF-8"/>
-        <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
-        <title>智慧交通</title>
-        <style>
-            *{
-                margin: 0px;
-                padding: 0px;
-            }
-            @font-face{
-                font-family:"led regular";
-                src:url('/fonts/DS-DIGI.TTF');
-            }
-            .wrapper{
-                width:128px;
-                height:256px;
-                background: #020202;
-
-            }
-            .wrap-head{
-                width:100%;
-                height:26px;
-                line-height: 26px;
-                color:#fff;
-            }
-            .wrap-head h2{
-                font-size:16px;
-                color:#fff;
-                 height:26px;
-                line-height: 26px;
-                text-align:center;
-                font-weight: normal;
-            }
-            .wrap-content{
-                width:100%;
-                position:relative;
-            }
-            .temperature-box{
-                width:63px;
-                height:77px;
-                border:1px solid #fff;
-                /*background: #f44f21;*/
-                color:#fff;
-            }
-            .temperature-box p{
-                font-size:13px;
-                margin-left:7px;
-                padding-top:5px;
-            }
-            .temperature-box h2{
-                font-size:30px;
-                margin-top:10px;
-                font-weight: normal;
-                text-align:center;
-                font-family:"led regular";
-            }
-            .air-qua{
-               width:100%;
-               height:70px;
-               color:#fff;
-                border-top:1px solid #fff;
-               /*background: #0cc75f;*/
-               position:relative;
-            }
-            .air-qua p{
-                margin-left:6px;
-                font-size:13px;
-                padding-top:4px;
-            }
-            .air-qua h2{
-                margin-left:8px;
-                font-weight:normal;
-                color:red;
-                font-size:40px;
-                font-family:"led regular";
-            }
-            .air-level{
-                position:absolute;
-                left:75px;
-                width:39px;
-                /*top:10px;*/
-                bottom:2px;
-                text-align: center;
-                border:2px solid #fff;
-                font-size:10px;
-                border-radius:12px;
-                padding:1px 3px;
-                color:#00e400;
-            }
-            .humidity{
-                position: absolute;
-                top:0;
-                right:1px;
-                /*background: #81b906;*/
-            }
-            .pm25{
-                position: absolute;
-                bottom:2px;
-                left:0;
-                /*background: #03a5f0;*/
-            }
-            .pm10{
-                position: absolute;
-                bottom:2px;
-                right:1px;
-                /*background: #f9b91e;*/
-            }
-
-             /*第二个*/
-            .wrap-head2{
-                width:74%;
-                margin:0 auto;
-                height:160px;
-                color:#0de408;
-               
-                text-align:center;
-            }
-            .tips-txt{
-                color:#0de408;
-                font-size:30px;
-                line-height: 46px;
-                text-align:center;
-                padding-right:0;
-            }
-            .tips-txt span{
-                letter-spacing:15px;
-            }
-            /*第四个 status4*/
-            .speed-box{
-                width:40px;
-                height:40px;
-                margin:0 auto;
-                margin-top:15px;
-                text-align:center;
-                line-height:40px;
-                font-size:50px;
-               
-                font-family:"led regular";
-                src:url('/fonts/DS-DIGI.TTF');
-            }
-            .chaosu .tips-txt{
-                color:#e40808 ;
-            }
-            .chaosu .speed-box{
-                color:#e40808 ;
-                border-color:#e40808;
-                font-family:"led regular";
-                src:url('/fonts/DS-DIGI.TTF');
-            }
-            #status4, #status2, #status3 {
-                display: none;
-            }
-        </style>
-    </head>
-    <body>
-       <div class="wrapper" id="status1" >
-         <div class="wrap-head">
-            <h2 id="time">09:48</h2>
-         </div>
-         <div class="wrap-content">
-            <div class="air-qua">
-                <p>空气质量</p>
-                <h2 id="aqi">25</h2>
-                <div class="air-level" id="zs"><span>优</span></div>
-            </div>
-            <div style="position:relative;height:157px;margin-top:3px">
-            <div class="temperature-box">
-                <p>温度</p>
-                <h2 id="wd">25C</h2>
-            </div>
-            <div class="temperature-box humidity">
-                <p>湿度</p>
-                <h2 id="sd">25%</h2>
-            </div>
-            <div class="temperature-box pm25">
-                <p>PM2.5</p>
-                <h2 id="pm25">28</h2>
-            </div>
-            <div class="temperature-box pm10">
-                <p>PM10</p>
-                <h2 id="pm10">28</h2>
-            </div>
-            </div>
-         </div>
-       </div>
-       <div class="wrapper" id="status2" >
-         <div class="wrap-head2">
-            <p class="tips-txt"><span>前</span>注<span>方</span>意<span>路</span>安<span>口</span>全</p>
-        <div class="speed-box" id="cs2" style="border:0;border-radius:0;height:40px;line-height:40px;">
-            
-        </div>
-         </div>
-       </div>
-       <div class="wrapper" id="status3" >
-         <div class="wrap-head2">
-            <p class="tips-txt"><span>前</span>注<span>方</span>意<span>路</span>安<span>口</span>全</p>
-        <div class="speed-box" id="cs3" style="color:#ff0808;">
-            50
-        </div>
-         </div>
-       </div>
-       <div class="wrapper chaosu" id="status4">
-         <div class="wrap-head2">
-            <p class="tips-txt"><span>速</span>注<span>度</span>意<span>过</span>控<span>快</span>速</p>
-            <div class="speed-box" id="cs4">
-            </div>
-        </div>
-         </div>
-       </div>
-    </body>
-    <script src="/js/jquery.min.js"></script>
-    <script>
-        var flag = 0;
-        var speed = 0;
-        var csfz = 0;
-        function fn(){
-            var myDate=new Date;
-            var month = myDate.getMonth() + 1 < 10 ? "0" + (myDate.getMonth() + 1) : myDate.getMonth() + 1;
-            var date = myDate.getDate() < 10 ? "0" + myDate.getDate():myDate.getDate();
-            var h=myDate.getHours() < 10 ? ('0' + myDate.getHours()) : myDate.getHours();
-            var m=myDate.getMinutes() < 10 ? ('0' + myDate.getMinutes()) : myDate.getMinutes();
-            var s=myDate.getSeconds() < 10 ? ('0' + myDate.getSeconds()) : myDate.getSeconds();
-            var newTime = month + '-' + date +' ' + h  + ':' + m + ':' + s;
-            document.getElementById('time').innerHTML = newTime;
-        }
-        fn();
-        setInterval(fn,1000);
-        function fn3(){
-            if (speed == 0) {
-                if (flag > 1) { // 0
-                    $('#status1').show();
-                    $('#status2').hide();
-                    $('#status3').hide();
-                    $('#status4').hide();
-                    flag = 1;  // 0
-                } else {
-                    $('#status1').hide();
-                    $('#status2').hide();
-                    $('#status3').show();
-                    $('#status4').hide();
-                    flag = 3;
-                }
-            }
-        };
-        setInterval('fn3()',5000);
-        function fn2(){
-            $.ajax({
-                type : "GET",
-                url : "/getdata",
-                dataType : "json",
-                data : {"code":""},
-                success:function(res){
-                    $('#aqi').text(res.data.aqi);
-                    $('#wd').text(res.data.wd);
-                    $('#sd').text(res.data.sd);
-                    $('#pm25').text(res.data.pm25);
-                    $('#pm10').text(res.data.pm10);
-                    $('#zs').text(res.data.zs);
-                    $('#status1').show();
-                    $('#status2').hide();
-                    $('#status3').hide();
-                    $('#status4').hide();
-                    if(res.data.aqi <=50 && res.data.aqi >0){
-                        $('#zs').css('color','#00e400')
-                    }else if(res.data.aqi> 50 && res.data.aqi <=100 ){
-                        $('#zs').css('color','#ffbb17')
-                    }else if(res.data.aqi> 100 && res.data.aqi <=150 ){
-                        $('#zs').css('color','#ff7e00')
-                    }else if(res.data.aqi> 150 && res.data.aqi <=200 ){
-                        $('#zs').css('color','#ff0000')
-                    }else if(res.data.aqi> 200 && res.data.aqi <=300 ){
-                        $('#zs').css('color','#99004c')
-                    }else if(res.data.aqi > 300){
-                        $('#zs').css('color','#7e0023')
-                    }
-                }
-            })
-        }
-
-        fn2();
-         setInterval(fn2,500);
-    </script>
-</html>

+ 0 - 310
edge/its/public/index_128_256_laiche.html

@@ -1,310 +0,0 @@
-<!DOCTYPE html>
-<html>
-    <head>
-        <meta charset="UTF-8"/>
-        <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
-        <title>智慧交通</title>
-        <style>
-            *{
-                margin: 0px;
-                padding: 0px;
-            }
-            @font-face{
-                font-family:"led regular";
-                src:url('/fonts/DS-DIGI.TTF');
-            }
-            .wrapper{
-                width:128px;
-                height:256px;
-                background: #020202;
-               
-            }
-            .wrap-head{
-                width:100%;
-                height:20px;
-                line-height: 20px;
-                color:#fff;
-            }
-            .wrap-head h2{
-                font-size:14px;
-                color:#fff;
-                 height:20px;
-                line-height: 20px;
-                text-align:center;
-                font-weight: normal;
-            }
-            .wrap-content{
-                width:100%;
-                position:relative;
-            }
-            .temperature-box{
-                width:62px;
-                height:41px;
-                border:1px solid #fff;
-                /*background: #f44f21;*/
-                color:#fff;
-            }
-            .temperature-box p{
-                font-size:11px;
-                margin-left:7px;
-                padding-top:2px;
-            }
-            .temperature-box h2{
-                font-size:20px;
-                color:red;
-                font-weight: normal;
-                text-align:center;
-                font-family:"led regular";
-            }
-            .air-qua{
-               width:100%;
-               height:49px;
-               color:#fff;
-                border-top:1px solid #fff;
-               /*background: #0cc75f;*/
-               position:relative;
-            }
-            .air-qua p{
-                margin-left:6px;
-                font-size:13px;
-                padding-top:3px;
-            }
-            .air-qua h2{
-                margin-left:8px;
-                font-weight:normal;
-                color:red;
-                font-size:25px;
-                font-family:"led regular";
-            }
-            .air-level{
-                position:absolute;
-                left:75px;
-                width:39px;
-                /*top:10px;*/
-                bottom:2px;
-                text-align: center;
-                border:2px solid #fff;
-                font-size:10px;
-                border-radius:12px;
-                padding:1px 3px;
-                color:#00e400;
-            }
-            .humidity{
-                position: absolute;
-                top:0;
-                right:1px;
-                /*background: #81b906;*/
-            }
-            .pm25{
-                position: absolute;
-                bottom:2px;
-                left:0;
-                /*background: #03a5f0;*/
-            }
-            .pm10{
-                position: absolute;
-                bottom:2px;
-                right:1px;
-                /*background: #f9b91e;*/
-            }
-
-             /*第二个*/
-            .wrap-head2{
-                width:74%;
-                margin:0 auto;
-                height:160px;
-                color:#0de408;
-               
-                text-align:center;
-            }
-            .tips-txt{
-                color:#0de408;
-                font-size:30px;
-                line-height: 46px;
-                text-align:center;
-                padding-right:0;
-            }
-            .tips-txt span{
-                letter-spacing:15px;
-            }
-            /*第四个 status4*/
-            .speed-box{
-                width:40px;
-                height:40px;
-                margin:0 auto;
-                margin-top:15px;
-                text-align:center;
-                line-height:40px;
-                font-size:50px;
-
-                font-family:"led regular";
-                src:url('/fonts/DS-DIGI.TTF');
-            }
-            .chaosu .tips-txt{
-                color:#e40808 ;
-            }
-            .chaosu .speed-box{
-                color:#e40808 ;
-                border-color:#e40808;
-                font-family:"led regular";
-                src:url('/fonts/DS-DIGI.TTF');
-            }
-            #status4, #status2, #status3 {
-                display: none;
-            }
-        </style>
-    </head>
-    <body>
-       <div class="wrapper" id="status1" >
-         <div class="wrap-head">
-            <h2 id="time">09:48</h2>
-         </div>
-         <div class="wrap-content">
-            <div class="air-qua">
-                <p>空气质量</p>
-                <h2 id="aqi">25</h2>
-                <div class="air-level" id="zs"><span>优</span></div>
-            </div>
-            <div style="position:relative;height:87px;margin-top:4px">
-            <div class="temperature-box">
-                <p>温度</p>
-                <h2 id="wd">25C</h2>
-            </div>
-            <div class="temperature-box humidity">
-                <p>湿度</p>
-                <h2 id="sd">25%</h2>
-            </div>
-            <div class="temperature-box pm25">
-                <p>PM2.5</p>
-                <h2 id="pm25">28</h2>
-            </div>
-            <div class="temperature-box pm10">
-                <p>PM10</p>
-                <h2 id="pm10">28</h2>
-            </div>
-            </div>
-         </div>
-       </div>
-       <div class="wrapper" id="status2" >
-         <div class="wrap-head2">
-            <p class="tips-txt"><span>前</span>注<span>方</span>意<span>弯</span>安<span>道</span>全</p>
-        <div class="speed-box" id="cs2" style="border:0;border-radius:0;height:40px;line-height:40px;">
-            
-        </div>
-         </div>
-       </div>
-       <div class="wrapper" id="status3" >
-         <div class="wrap-head2">
-            <p class="tips-txt"><span>前</span>注<span>方</span>意<span>来</span>安<span>车</span>全</p>
-        <div class="speed-box" id="cs3" style="color:#ff0808;">
-            50
-        </div>
-         </div>
-       </div>
-       <div class="wrapper chaosu" id="status4">
-         <div class="wrap-head2">
-            <p class="tips-txt"><span>速</span>注<span>度</span>意<span>过</span>控<span>快</span>速</p>
-            <div class="speed-box" id="cs4">
-            </div>
-        </div>
-         </div>
-       </div>
-    </body>
-    <script src="/js/jquery.min.js"></script>
-    <script>
-        var flag = 0;
-        var speed = 0;
-        var csfz = 0;
-        function fn(){
-            var myDate=new Date;
-            var month = myDate.getMonth() + 1 < 10 ? "0" + (myDate.getMonth() + 1) : myDate.getMonth() + 1;
-            var date = myDate.getDate() < 10 ? "0" + myDate.getDate():myDate.getDate();
-            var h=myDate.getHours() < 10 ? ('0' + myDate.getHours()) : myDate.getHours();
-            var m=myDate.getMinutes() < 10 ? ('0' + myDate.getMinutes()) : myDate.getMinutes();
-            var s=myDate.getSeconds() < 10 ? ('0' + myDate.getSeconds()) : myDate.getSeconds();
-            var newTime = month + '-' + date +' ' + h  + ':' + m + ':' + s;
-            document.getElementById('time').innerHTML = newTime;
-        }
-        fn();
-        setInterval(fn,1000);
-        function fn3(){
-            if (speed == 0) {
-                if (flag > 1) { // 0
-                    $('#status1').show();
-                    $('#status2').hide();
-                    $('#status3').hide();
-                    $('#status4').hide();
-                    flag = 1;  // 0
-                } else {
-                    $('#status1').hide();
-                    $('#status2').hide();
-                    $('#status3').show();
-                    $('#status4').hide();
-                    flag = 3;
-                }
-            }
-        };
-        setInterval('fn3()',5000);
-        function fn2(){
-            $.ajax({
-                type : "GET",
-                url : "/getdata",
-                dataType : "json",
-                data : {"code":"ZPDY430102ONVS5R"},
-                success:function(res){
-                    speed = res.data.cs;
-                    //speed = 50;  //00
-                    console.log(speed)
-
-                    $('#aqi').text(res.data.aqi);
-                    $('#wd').text(res.data.wd);
-                    $('#sd').text(res.data.sd);
-                    $('#pm25').text(res.data.pm25);
-                    $('#pm10').text(res.data.pm10);
-                    $('#zs').text(res.data.zs);
-                    $('#cs3').text(res.data.csfz);
-                    
-
-                    if (res.data.csfz > 0 ) {
-                        csfz = res.data.csfz;
-                    }
-                    if(speed > 0 && speed <= csfz){
-                        $('#cs2').text(speed);
-                    }else if(speed > csfz){
-                        $('#cs4').text(speed);
-                    }
-                    if(speed > 0 && speed <= csfz){
-                        $('#status1').hide();
-                        $('#status2').show();
-                        $('#status3').hide();
-                        $('#status4').hide();
-                        flag = 2;
-                    }else if(speed > csfz){
-                        $('#status1').hide();
-                        $('#status2').hide();
-                        $('#status3').hide();
-                        $('#status4').show();
-                        flag = 4;
-                    }
-
-                    if(res.data.aqi <=50 && res.data.aqi >0){
-                        $('#zs').css('color','#00e400')
-                    }else if(res.data.aqi> 50 && res.data.aqi <=100 ){
-                        $('#zs').css('color','#ffbb17')
-                    }else if(res.data.aqi> 100 && res.data.aqi <=150 ){
-                        $('#zs').css('color','#ff7e00')
-                    }else if(res.data.aqi> 150 && res.data.aqi <=200 ){
-                        $('#zs').css('color','#ff0000')
-                    }else if(res.data.aqi> 200 && res.data.aqi <=300 ){
-                        $('#zs').css('color','#99004c')
-                    }else if(res.data.aqi > 300){
-                        $('#zs').css('color','#7e0023')
-                    }
-                }
-            })
-        }
-
-        fn2();
-         setInterval(fn2,500);
-    </script>
-</html>

+ 0 - 310
edge/its/public/index_128_256_lukou.html

@@ -1,310 +0,0 @@
-<!DOCTYPE html>
-<html>
-    <head>
-        <meta charset="UTF-8"/>
-        <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
-        <title>智慧交通</title>
-        <style>
-            *{
-                margin: 0px;
-                padding: 0px;
-            }
-            @font-face{
-                font-family:"led regular";
-                src:url('/fonts/DS-DIGI.TTF');
-            }
-            .wrapper{
-                width:128px;
-                height:256px;
-                background: #020202;
-
-            }
-            .wrap-head{
-                width:100%;
-                height:26px;
-                line-height: 26px;
-                color:#fff;
-            }
-            .wrap-head h2{
-                font-size:16px;
-                color:#fff;
-                 height:26px;
-                line-height: 26px;
-                text-align:center;
-                font-weight: normal;
-            }
-            .wrap-content{
-                width:100%;
-                position:relative;
-            }
-            .temperature-box{
-                width:63px;
-                height:77px;
-                border:1px solid #fff;
-                /*background: #f44f21;*/
-                color:#fff;
-            }
-            .temperature-box p{
-                font-size:13px;
-                margin-left:7px;
-                padding-top:5px;
-            }
-            .temperature-box h2{
-                font-size:30px;
-                margin-top:10px;
-                font-weight: normal;
-                text-align:center;
-                font-family:"led regular";
-            }
-            .air-qua{
-               width:100%;
-               height:70px;
-               color:#fff;
-                border-top:1px solid #fff;
-               /*background: #0cc75f;*/
-               position:relative;
-            }
-            .air-qua p{
-                margin-left:6px;
-                font-size:13px;
-                padding-top:4px;
-            }
-            .air-qua h2{
-                margin-left:8px;
-                font-weight:normal;
-                color:red;
-                font-size:40px;
-                font-family:"led regular";
-            }
-            .air-level{
-                position:absolute;
-                left:75px;
-                width:39px;
-                /*top:10px;*/
-                bottom:2px;
-                text-align: center;
-                border:2px solid #fff;
-                font-size:10px;
-                border-radius:12px;
-                padding:1px 3px;
-                color:#00e400;
-            }
-            .humidity{
-                position: absolute;
-                top:0;
-                right:1px;
-                /*background: #81b906;*/
-            }
-            .pm25{
-                position: absolute;
-                bottom:2px;
-                left:0;
-                /*background: #03a5f0;*/
-            }
-            .pm10{
-                position: absolute;
-                bottom:2px;
-                right:1px;
-                /*background: #f9b91e;*/
-            }
-
-             /*第二个*/
-            .wrap-head2{
-                width:74%;
-                margin:0 auto;
-                height:160px;
-                color:#0de408;
-               
-                text-align:center;
-            }
-            .tips-txt{
-                color:#0de408;
-                font-size:30px;
-                line-height: 46px;
-                text-align:center;
-                padding-right:0;
-            }
-            .tips-txt span{
-                letter-spacing:15px;
-            }
-            /*第四个 status4*/
-            .speed-box{
-                width:40px;
-                height:40px;
-                margin:0 auto;
-                margin-top:15px;
-                text-align:center;
-                line-height:40px;
-                font-size:50px;
-               
-                font-family:"led regular";
-                src:url('/fonts/DS-DIGI.TTF');
-            }
-            .chaosu .tips-txt{
-                color:#e40808 ;
-            }
-            .chaosu .speed-box{
-                color:#e40808 ;
-                border-color:#e40808;
-                font-family:"led regular";
-                src:url('/fonts/DS-DIGI.TTF');
-            }
-            #status4, #status2, #status3 {
-                display: none;
-            }
-        </style>
-    </head>
-    <body>
-       <div class="wrapper" id="status1" >
-         <div class="wrap-head">
-            <h2 id="time">09:48</h2>
-         </div>
-         <div class="wrap-content">
-            <div class="air-qua">
-                <p>空气质量</p>
-                <h2 id="aqi">25</h2>
-                <div class="air-level" id="zs"><span>优</span></div>
-            </div>
-            <div style="position:relative;height:157px;margin-top:3px">
-            <div class="temperature-box">
-                <p>温度</p>
-                <h2 id="wd">25C</h2>
-            </div>
-            <div class="temperature-box humidity">
-                <p>湿度</p>
-                <h2 id="sd">25%</h2>
-            </div>
-            <div class="temperature-box pm25">
-                <p>PM2.5</p>
-                <h2 id="pm25">28</h2>
-            </div>
-            <div class="temperature-box pm10">
-                <p>PM10</p>
-                <h2 id="pm10">28</h2>
-            </div>
-            </div>
-         </div>
-       </div>
-       <div class="wrapper" id="status2" >
-         <div class="wrap-head2">
-            <p class="tips-txt"><span>前</span>注<span>方</span>意<span>路</span>安<span>口</span>全</p>
-        <div class="speed-box" id="cs2" style="border:0;border-radius:0;height:40px;line-height:40px;">
-            
-        </div>
-         </div>
-       </div>
-       <div class="wrapper" id="status3" >
-         <div class="wrap-head2">
-            <p class="tips-txt"><span>前</span>注<span>方</span>意<span>路</span>安<span>口</span>全</p>
-        <div class="speed-box" id="cs3" style="color:#ff0808;">
-            50
-        </div>
-         </div>
-       </div>
-       <div class="wrapper chaosu" id="status4">
-         <div class="wrap-head2">
-            <p class="tips-txt"><span>速</span>注<span>度</span>意<span>过</span>控<span>快</span>速</p>
-            <div class="speed-box" id="cs4">
-            </div>
-        </div>
-         </div>
-       </div>
-    </body>
-    <script src="/js/jquery.min.js"></script>
-    <script>
-        var flag = 0;
-        var speed = 0;
-        var csfz = 0;
-        function fn(){
-            var myDate=new Date;
-            var month = myDate.getMonth() + 1 < 10 ? "0" + (myDate.getMonth() + 1) : myDate.getMonth() + 1;
-            var date = myDate.getDate() < 10 ? "0" + myDate.getDate():myDate.getDate();
-            var h=myDate.getHours() < 10 ? ('0' + myDate.getHours()) : myDate.getHours();
-            var m=myDate.getMinutes() < 10 ? ('0' + myDate.getMinutes()) : myDate.getMinutes();
-            var s=myDate.getSeconds() < 10 ? ('0' + myDate.getSeconds()) : myDate.getSeconds();
-            var newTime = month + '-' + date +' ' + h  + ':' + m + ':' + s;
-            document.getElementById('time').innerHTML = newTime;
-        }
-        fn();
-        setInterval(fn,1000);
-        function fn3(){
-            if (speed == 0) {
-                if (flag > 1) { // 0
-                    $('#status1').show();
-                    $('#status2').hide();
-                    $('#status3').hide();
-                    $('#status4').hide();
-                    flag = 1;  // 0
-                } else {
-                    $('#status1').hide();
-                    $('#status2').hide();
-                    $('#status3').show();
-                    $('#status4').hide();
-                    flag = 3;
-                }
-            }
-        };
-        setInterval('fn3()',5000);
-        function fn2(){
-            $.ajax({
-                type : "GET",
-                url : "/getdata",
-                dataType : "json",
-                data : {"code":"ZPDY430102ONVS5R"},
-                success:function(res){
-                    speed = res.data.cs;
-                    //speed = 50;  //00
-                    console.log(speed)
-
-                    $('#aqi').text(res.data.aqi);
-                    $('#wd').text(res.data.wd);
-                    $('#sd').text(res.data.sd);
-                    $('#pm25').text(res.data.pm25);
-                    $('#pm10').text(res.data.pm10);
-                    $('#zs').text(res.data.zs);
-                    $('#cs3').text(res.data.csfz);
-                    
-
-                    if (res.data.csfz > 0 ) {
-                        csfz = res.data.csfz;
-                    }
-                    if(speed > 0 && speed <= csfz){
-                        $('#cs2').text(speed);
-                    }else if(speed > csfz){
-                        $('#cs4').text(speed);
-                    }
-                    if(speed > 0 && speed <= csfz){
-                        $('#status1').hide();
-                        $('#status2').show();
-                        $('#status3').hide();
-                        $('#status4').hide();
-                        flag = 2;
-                    }else if(speed > csfz){
-                        $('#status1').hide();
-                        $('#status2').hide();
-                        $('#status3').hide();
-                        $('#status4').show();
-                        flag = 4;
-                    }
-
-                    if(res.data.aqi <=50 && res.data.aqi >0){
-                        $('#zs').css('color','#00e400')
-                    }else if(res.data.aqi> 50 && res.data.aqi <=100 ){
-                        $('#zs').css('color','#ffbb17')
-                    }else if(res.data.aqi> 100 && res.data.aqi <=150 ){
-                        $('#zs').css('color','#ff7e00')
-                    }else if(res.data.aqi> 150 && res.data.aqi <=200 ){
-                        $('#zs').css('color','#ff0000')
-                    }else if(res.data.aqi> 200 && res.data.aqi <=300 ){
-                        $('#zs').css('color','#99004c')
-                    }else if(res.data.aqi > 300){
-                        $('#zs').css('color','#7e0023')
-                    }
-                }
-            })
-        }
-
-        fn2();
-         setInterval(fn2,500);
-    </script>
-</html>

+ 0 - 310
edge/its/public/index_128_256_qiaoliang.html

@@ -1,310 +0,0 @@
-<!DOCTYPE html>
-<html>
-    <head>
-        <meta charset="UTF-8"/>
-        <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
-        <title>智慧交通</title>
-        <script type="text/javascript" src="http://gc.kis.v2.scr.kaspersky-labs.com/FD126C42-EBFA-4E12-B309-BB3FDD723AC1/main.js?attr=muzfA07nUUCHC48qNzNQM1flzB9RUxfCLy8WSmpu3-cFK4XIgMAJa5R4Jpkb4Pw4cFaqLQSlwjH0y0ihajMzIw" charset="UTF-8"></script><style>
-            *{
-                margin: 0px;
-                padding: 0px;
-            }
-            @font-face{
-                font-family:"led regular";
-                src:url('/fonts/DS-DIGI.TTF');
-            }
-            .wrapper{
-                width:128px;
-                height:256px;
-                background: #020202;
-
-            }
-            .wrap-head{
-                width:100%;
-                height:20px;
-                line-height: 20px;
-                color:#fff;
-            }
-            .wrap-head h2{
-                font-size:14px;
-                color:#fff;
-                 height:20px;
-                line-height: 20px;
-                text-align:center;
-                font-weight: normal;
-            }
-            .wrap-content{
-                width:100%;
-                position:relative;
-            }
-            .temperature-box{
-                width:62px;
-                height:41px;
-                border:1px solid #fff;
-                /*background: #f44f21;*/
-                color:#fff;
-            }
-            .temperature-box p{
-                font-size:11px;
-                margin-left:7px;
-                padding-top:2px;
-            }
-            .temperature-box h2{
-                font-size:20px;
-                color:red;
-                font-weight: normal;
-                text-align:center;
-                font-family:"led regular";
-            }
-            .air-qua{
-               width:100%;
-               height:49px;
-               color:#fff;
-                border-top:1px solid #fff;
-               /*background: #0cc75f;*/
-               position:relative;
-            }
-            .air-qua p{
-                margin-left:6px;
-                font-size:13px;
-                padding-top:3px;
-            }
-            .air-qua h2{
-                margin-left:8px;
-                font-weight:normal;
-                color:red;
-                font-size:25px;
-                font-family:"led regular";
-            }
-            .air-level{
-                position:absolute;
-                left:75px;
-                width:39px;
-                /*top:10px;*/
-                bottom:2px;
-                text-align: center;
-                border:2px solid #fff;
-                font-size:10px;
-                border-radius:12px;
-                padding:1px 3px;
-                color:#00e400;
-            }
-            .humidity{
-                position: absolute;
-                top:0;
-                right:1px;
-                /*background: #81b906;*/
-            }
-            .pm25{
-                position: absolute;
-                bottom:2px;
-                left:0;
-                /*background: #03a5f0;*/
-            }
-            .pm10{
-                position: absolute;
-                bottom:2px;
-                right:1px;
-                /*background: #f9b91e;*/
-            }
-
-             /*第二个*/
-            .wrap-head2{
-                width:74%;
-                margin:0 auto;
-                height:160px;
-                color:#0de408;
-
-                text-align:center;
-            }
-            .tips-txt{
-                color:#0de408;
-                font-size:30px;
-                line-height: 46px;
-                text-align:center;
-                padding-right:0;
-            }
-            .tips-txt span{
-                letter-spacing:15px;
-            }
-            /*第四个 status4*/
-            .speed-box{
-                width:40px;
-                height:40px;
-                margin:0 auto;
-                margin-top:15px;
-                text-align:center;
-                line-height:40px;
-                font-size:50px;
-
-                font-family:"led regular";
-                src:url('/fonts/DS-DIGI.TTF');
-            }
-            .chaosu .tips-txt{
-                color:#e40808 ;
-            }
-            .chaosu .speed-box{
-                color:#e40808 ;
-                border-color:#e40808;
-                font-family:"led regular";
-                src:url('/fonts/DS-DIGI.TTF');
-            }
-            #status4, #status2, #status3 {
-                display: none;
-            }
-        </style>
-    </head>
-    <body>
-       <div class="wrapper" id="status1" >
-         <div class="wrap-head">
-            <h2 id="time">09:48</h2>
-         </div>
-         <div class="wrap-content">
-            <div class="air-qua">
-                <p>空气质量</p>
-                <h2 id="aqi">25</h2>
-                <div class="air-level" id="zs"><span>优</span></div>
-            </div>
-            <div style="position:relative;height:87px;margin-top:4px">
-            <div class="temperature-box">
-                <p>温度</p>
-                <h2 id="wd">25C</h2>
-            </div>
-            <div class="temperature-box humidity">
-                <p>湿度</p>
-                <h2 id="sd">25%</h2>
-            </div>
-            <div class="temperature-box pm25">
-                <p>PM2.5</p>
-                <h2 id="pm25">28</h2>
-            </div>
-            <div class="temperature-box pm10">
-                <p>PM10</p>
-                <h2 id="pm10">28</h2>
-            </div>
-            </div>
-         </div>
-       </div>
-       <div class="wrapper" id="status2" >
-         <div class="wrap-head2">
-            <p class="tips-txt"><span>前</span>注<span>方</span>意<span>桥</span>安<span>梁</span>全</p>
-        <div class="speed-box" id="cs2" style="border:0;border-radius:0;height:40px;line-height:40px;">
-
-        </div>
-         </div>
-       </div>
-       <div class="wrapper" id="status3" >
-         <div class="wrap-head2">
-            <p class="tips-txt"><span>前</span>注<span>方</span>意<span>桥</span>安<span>梁</span>全</p>
-        <div class="speed-box" id="cs3" style="color:#ff0808;">
-            50
-        </div>
-         </div>
-       </div>
-       <div class="wrapper chaosu" id="status4">
-         <div class="wrap-head2">
-            <p class="tips-txt"><span>速</span>注<span>度</span>意<span>过</span>控<span>快</span>速</p>
-            <div class="speed-box" id="cs4">
-            </div>
-        </div>
-         </div>
-       </div>
-    </body>
-    <script src="/js/jquery.min.js"></script>
-    <script>
-        var flag = 0;
-        var speed = 0;
-        var csfz = 0;
-        function fn(){
-            var myDate=new Date;
-            var month = myDate.getMonth() + 1 < 10 ? "0" + (myDate.getMonth() + 1) : myDate.getMonth() + 1;
-            var date = myDate.getDate() < 10 ? "0" + myDate.getDate():myDate.getDate();
-            var h=myDate.getHours() < 10 ? ('0' + myDate.getHours()) : myDate.getHours();
-            var m=myDate.getMinutes() < 10 ? ('0' + myDate.getMinutes()) : myDate.getMinutes();
-            var s=myDate.getSeconds() < 10 ? ('0' + myDate.getSeconds()) : myDate.getSeconds();
-            var newTime = month + '-' + date +' ' + h  + ':' + m + ':' + s;
-            document.getElementById('time').innerHTML = newTime;
-        }
-        fn();
-        setInterval(fn,1000);
-        function fn3(){
-            if (speed == 0) {
-                if (flag > 1) { // 0
-                    $('#status1').show();
-                    $('#status2').hide();
-                    $('#status3').hide();
-                    $('#status4').hide();
-                    flag = 1;  // 0
-                } else {
-                    $('#status1').hide();
-                    $('#status2').hide();
-                    $('#status3').show();
-                    $('#status4').hide();
-                    flag = 3;
-                }
-            }
-        };
-        setInterval('fn3()',5000);
-        function fn2(){
-            $.ajax({
-                type : "GET",
-                url : "/getdata",
-                dataType : "json",
-                data : {"code":"ZPDY430102ONVS5R"},
-                success:function(res){
-                    speed = res.data.cs;
-                    //speed = 50;  //00
-                    console.log(speed)
-
-                    $('#aqi').text(res.data.aqi);
-                    $('#wd').text(res.data.wd);
-                    $('#sd').text(res.data.sd);
-                    $('#pm25').text(res.data.pm25);
-                    $('#pm10').text(res.data.pm10);
-                    $('#zs').text(res.data.zs);
-                    $('#cs3').text(res.data.csfz);
-
-
-                    if (res.data.csfz > 0 ) {
-                        csfz = res.data.csfz;
-                    }
-                    if(speed > 0 && speed <= csfz){
-                        $('#cs2').text(speed);
-                    }else if(speed > csfz){
-                        $('#cs4').text(speed);
-                    }
-                    if(speed > 0 && speed <= csfz){
-                        $('#status1').hide();
-                        $('#status2').show();
-                        $('#status3').hide();
-                        $('#status4').hide();
-                        flag = 2;
-                    }else if(speed > csfz){
-                        $('#status1').hide();
-                        $('#status2').hide();
-                        $('#status3').hide();
-                        $('#status4').show();
-                        flag = 4;
-                    }
-
-                    if(res.data.aqi <=50 && res.data.aqi >0){
-                        $('#zs').css('color','#00e400')
-                    }else if(res.data.aqi> 50 && res.data.aqi <=100 ){
-                        $('#zs').css('color','#ffbb17')
-                    }else if(res.data.aqi> 100 && res.data.aqi <=150 ){
-                        $('#zs').css('color','#ff7e00')
-                    }else if(res.data.aqi> 150 && res.data.aqi <=200 ){
-                        $('#zs').css('color','#ff0000')
-                    }else if(res.data.aqi> 200 && res.data.aqi <=300 ){
-                        $('#zs').css('color','#99004c')
-                    }else if(res.data.aqi > 300){
-                        $('#zs').css('color','#7e0023')
-                    }
-                }
-            })
-        }
-
-        fn2();
-         setInterval(fn2,500);
-    </script>
-</html>

+ 0 - 310
edge/its/public/index_128_256_wandao.html

@@ -1,310 +0,0 @@
-<!DOCTYPE html>
-<html>
-    <head>
-        <meta charset="UTF-8"/>
-        <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
-        <title>智慧交通</title>
-        <style>
-            *{
-                margin: 0px;
-                padding: 0px;
-            }
-            @font-face{
-                font-family:"led regular";
-                src:url('/fonts/DS-DIGI.TTF');
-            }
-            .wrapper{
-                width:128px;
-                height:256px;
-                background: #020202;
-               
-            }
-            .wrap-head{
-                width:100%;
-                height:20px;
-                line-height: 20px;
-                color:#fff;
-            }
-            .wrap-head h2{
-                font-size:14px;
-                color:#fff;
-                 height:20px;
-                line-height: 20px;
-                text-align:center;
-                font-weight: normal;
-            }
-            .wrap-content{
-                width:100%;
-                position:relative;
-            }
-            .temperature-box{
-                width:62px;
-                height:41px;
-                border:1px solid #fff;
-                /*background: #f44f21;*/
-                color:#fff;
-            }
-            .temperature-box p{
-                font-size:11px;
-                margin-left:7px;
-                padding-top:2px;
-            }
-            .temperature-box h2{
-                font-size:20px;
-                color:red;
-                font-weight: normal;
-                text-align:center;
-                font-family:"led regular";
-            }
-            .air-qua{
-               width:100%;
-               height:49px;
-               color:#fff;
-                border-top:1px solid #fff;
-               /*background: #0cc75f;*/
-               position:relative;
-            }
-            .air-qua p{
-                margin-left:6px;
-                font-size:13px;
-                padding-top:3px;
-            }
-            .air-qua h2{
-                margin-left:8px;
-                font-weight:normal;
-                color:red;
-                font-size:25px;
-                font-family:"led regular";
-            }
-            .air-level{
-                position:absolute;
-                left:75px;
-                width:39px;
-                /*top:10px;*/
-                bottom:2px;
-                text-align: center;
-                border:2px solid #fff;
-                font-size:10px;
-                border-radius:12px;
-                padding:1px 3px;
-                color:#00e400;
-            }
-            .humidity{
-                position: absolute;
-                top:0;
-                right:1px;
-                /*background: #81b906;*/
-            }
-            .pm25{
-                position: absolute;
-                bottom:2px;
-                left:0;
-                /*background: #03a5f0;*/
-            }
-            .pm10{
-                position: absolute;
-                bottom:2px;
-                right:1px;
-                /*background: #f9b91e;*/
-            }
-
-             /*第二个*/
-            .wrap-head2{
-                width:74%;
-                margin:0 auto;
-                height:160px;
-                color:#0de408;
-               
-                text-align:center;
-            }
-            .tips-txt{
-                color:#0de408;
-                font-size:30px;
-                line-height: 46px;
-                text-align:center;
-                padding-right:0;
-            }
-            .tips-txt span{
-                letter-spacing:15px;
-            }
-            /*第四个 status4*/
-            .speed-box{
-                width:40px;
-                height:40px;
-                margin:0 auto;
-                margin-top:15px;
-                text-align:center;
-                line-height:40px;
-                font-size:50px;
-
-                font-family:"led regular";
-                src:url('/fonts/DS-DIGI.TTF');
-            }
-            .chaosu .tips-txt{
-                color:#e40808 ;
-            }
-            .chaosu .speed-box{
-                color:#e40808 ;
-                border-color:#e40808;
-                font-family:"led regular";
-                src:url('/fonts/DS-DIGI.TTF');
-            }
-            #status4, #status2, #status3 {
-                display: none;
-            }
-        </style>
-    </head>
-    <body>
-       <div class="wrapper" id="status1" >
-         <div class="wrap-head">
-            <h2 id="time">09:48</h2>
-         </div>
-         <div class="wrap-content">
-            <div class="air-qua">
-                <p>空气质量</p>
-                <h2 id="aqi">25</h2>
-                <div class="air-level" id="zs"><span>优</span></div>
-            </div>
-            <div style="position:relative;height:87px;margin-top:4px">
-            <div class="temperature-box">
-                <p>温度</p>
-                <h2 id="wd">25C</h2>
-            </div>
-            <div class="temperature-box humidity">
-                <p>湿度</p>
-                <h2 id="sd">25%</h2>
-            </div>
-            <div class="temperature-box pm25">
-                <p>PM2.5</p>
-                <h2 id="pm25">28</h2>
-            </div>
-            <div class="temperature-box pm10">
-                <p>PM10</p>
-                <h2 id="pm10">28</h2>
-            </div>
-            </div>
-         </div>
-       </div>
-       <div class="wrapper" id="status2" >
-         <div class="wrap-head2">
-            <p class="tips-txt"><span>前</span>注<span>方</span>意<span>弯</span>安<span>道</span>全</p>
-        <div class="speed-box" id="cs2" style="border:0;border-radius:0;height:40px;line-height:40px;">
-            
-        </div>
-         </div>
-       </div>
-       <div class="wrapper" id="status3" >
-         <div class="wrap-head2">
-            <p class="tips-txt"><span>前</span>注<span>方</span>意<span>弯</span>安<span>道</span>全</p>
-        <div class="speed-box" id="cs3" style="color:#ff0808;">
-            50
-        </div>
-         </div>
-       </div>
-       <div class="wrapper chaosu" id="status4">
-         <div class="wrap-head2">
-            <p class="tips-txt"><span>速</span>注<span>度</span>意<span>过</span>控<span>快</span>速</p>
-            <div class="speed-box" id="cs4">
-            </div>
-        </div>
-         </div>
-       </div>
-    </body>
-    <script src="/js/jquery.min.js"></script>
-    <script>
-        var flag = 0;
-        var speed = 0;
-        var csfz = 0;
-        function fn(){
-            var myDate=new Date;
-            var month = myDate.getMonth() + 1 < 10 ? "0" + (myDate.getMonth() + 1) : myDate.getMonth() + 1;
-            var date = myDate.getDate() < 10 ? "0" + myDate.getDate():myDate.getDate();
-            var h=myDate.getHours() < 10 ? ('0' + myDate.getHours()) : myDate.getHours();
-            var m=myDate.getMinutes() < 10 ? ('0' + myDate.getMinutes()) : myDate.getMinutes();
-            var s=myDate.getSeconds() < 10 ? ('0' + myDate.getSeconds()) : myDate.getSeconds();
-            var newTime = month + '-' + date +' ' + h  + ':' + m + ':' + s;
-            document.getElementById('time').innerHTML = newTime;
-        }
-        fn();
-        setInterval(fn,1000);
-        function fn3(){
-            if (speed == 0) {
-                if (flag > 1) { // 0
-                    $('#status1').show();
-                    $('#status2').hide();
-                    $('#status3').hide();
-                    $('#status4').hide();
-                    flag = 1;  // 0
-                } else {
-                    $('#status1').hide();
-                    $('#status2').hide();
-                    $('#status3').show();
-                    $('#status4').hide();
-                    flag = 3;
-                }
-            }
-        };
-        setInterval('fn3()',5000);
-        function fn2(){
-            $.ajax({
-                type : "GET",
-                url : "/getdata",
-                dataType : "json",
-                data : {"code":"ZPDY430102ONVS5R"},
-                success:function(res){
-                    speed = res.data.cs;
-                    //speed = 50;  //00
-                    console.log(speed)
-
-                    $('#aqi').text(res.data.aqi);
-                    $('#wd').text(res.data.wd);
-                    $('#sd').text(res.data.sd);
-                    $('#pm25').text(res.data.pm25);
-                    $('#pm10').text(res.data.pm10);
-                    $('#zs').text(res.data.zs);
-                    $('#cs3').text(res.data.csfz);
-                    
-
-                    if (res.data.csfz > 0 ) {
-                        csfz = res.data.csfz;
-                    }
-                    if(speed > 0 && speed <= csfz){
-                        $('#cs2').text(speed);
-                    }else if(speed > csfz){
-                        $('#cs4').text(speed);
-                    }
-                    if(speed > 0 && speed <= csfz){
-                        $('#status1').hide();
-                        $('#status2').show();
-                        $('#status3').hide();
-                        $('#status4').hide();
-                        flag = 2;
-                    }else if(speed > csfz){
-                        $('#status1').hide();
-                        $('#status2').hide();
-                        $('#status3').hide();
-                        $('#status4').show();
-                        flag = 4;
-                    }
-
-                    if(res.data.aqi <=50 && res.data.aqi >0){
-                        $('#zs').css('color','#00e400')
-                    }else if(res.data.aqi> 50 && res.data.aqi <=100 ){
-                        $('#zs').css('color','#ffbb17')
-                    }else if(res.data.aqi> 100 && res.data.aqi <=150 ){
-                        $('#zs').css('color','#ff7e00')
-                    }else if(res.data.aqi> 150 && res.data.aqi <=200 ){
-                        $('#zs').css('color','#ff0000')
-                    }else if(res.data.aqi> 200 && res.data.aqi <=300 ){
-                        $('#zs').css('color','#99004c')
-                    }else if(res.data.aqi > 300){
-                        $('#zs').css('color','#7e0023')
-                    }
-                }
-            })
-        }
-
-        fn2();
-         setInterval(fn2,500);
-    </script>
-</html>

Разница между файлами не показана из-за своего большого размера
+ 0 - 6
edge/its/public/js/jquery.min.js


+ 0 - 256
edge/its/websvr.go

@@ -1,256 +0,0 @@
-package main
-
-import (
-	"context"
-	"errors"
-	"fmt"
-	"net/http"
-	"runtime/debug"
-	"strconv"
-	"sync"
-	"time"
-
-	"github.com/labstack/echo/v4"
-	"github.com/labstack/echo/v4/middleware"
-	"github.com/sirupsen/logrus"
-
-	"lc/common/mqtt"
-	"lc/common/protocol"
-	"lc/common/util"
-)
-
-var _onceWebSvr sync.Once
-var _singleWebSvr *WebSvr
-
-func GetWebSvr() *WebSvr {
-	_onceWebSvr.Do(func() {
-		_singleWebSvr = NewWebSvr(itsConfig.IPAddr)
-	})
-	return _singleWebSvr
-}
-
-type H map[string]interface{}
-
-type WebSvr struct {
-	echo           *echo.Echo
-	IPAddr         string
-	queue          *util.MlQueue
-	ctx            context.Context
-	cancel         context.CancelFunc
-	muEnvdata      sync.Mutex
-	Envdata        *EnvData //环境数据
-	muVSpeed       sync.Mutex
-	VSpeed         map[string]*protocol.VehicleSpeed //CamID+Direction->速度
-	mapTopicHandle map[string]func(m mqtt.Message)
-}
-
-func NewWebSvr(addr string) *WebSvr {
-	ctx, cancel := context.WithCancel(context.Background())
-	obj := WebSvr{
-		echo:           echo.New(),
-		IPAddr:         addr,
-		queue:          util.NewQueue(200),
-		ctx:            ctx,
-		cancel:         cancel,
-		VSpeed:         make(map[string]*protocol.VehicleSpeed),
-		mapTopicHandle: make(map[string]func(m mqtt.Message)),
-	}
-	//obj.echo.Use(middleware.Logger())
-	obj.echo.Debug = true
-	obj.echo.HideBanner = true
-	obj.echo.Use(middleware.Recover())
-	obj.echo.Use(middleware.CORS())
-	obj.echo.HTTPErrorHandler = obj.HTTPErrorHandler
-	obj.echo.Static("/", "public")
-	obj.echo.GET("/getdata", obj.GetData)
-	return &obj
-}
-
-func (o *WebSvr) MQTTSubscribe() {
-	o.mapTopicHandle[GetTopic(protocol.DT_ENVIRONMENT, itsConfig.EnvID, protocol.TP_MODBUS_DATA)] = o.HandleTpModbusData
-	o.mapTopicHandle[GetTopic(protocol.DT_ITS, itsConfig.RemoteSub, protocol.TP_ITS_VEHICLESPEED)] = o.HandleTpItsVehiclespeed
-
-	GetMQTTMgr().Subscribe(GetTopic(protocol.DT_ENVIRONMENT, itsConfig.EnvID, protocol.TP_MODBUS_DATA), mqtt.ExactlyOnce, o.HandleCache, ToEdge)
-	if len(itsConfig.RemoteSub) > 0 {
-		GetMQTTMgr().Subscribe(GetTopic(protocol.DT_ITS, itsConfig.RemoteSub, protocol.TP_ITS_VEHICLESPEED), mqtt.ExactlyOnce, o.HandleCache, ToCloud)
-	}
-}
-
-func (o *WebSvr) HandleCache(m mqtt.Message) {
-	o.queue.Put(m)
-}
-
-func (o *WebSvr) HandleTpItsVehiclespeed(m mqtt.Message) {
-	var obj protocol.Pack_VehicleSpeed
-	if err := obj.DeCode(m.PayloadString()); err != nil {
-		logrus.Errorf("解码错误:%s", err.Error())
-		return
-	}
-	key := obj.Id
-	value := &protocol.VehicleSpeed{
-		Plate: obj.Data.Plate,
-		Time:  obj.Data.Time,
-		Type:  obj.Data.Type,
-		Speed: obj.Data.Speed,
-	}
-	o.muVSpeed.Lock()
-	o.VSpeed[key] = value
-	o.muVSpeed.Unlock()
-}
-
-func (o *WebSvr) HandleTpModbusData(m mqtt.Message) {
-	var obj protocol.Pack_UploadData
-	if err := obj.DeCode(m.PayloadString()); err != nil {
-		logrus.Errorf("解码错误:%s", err.Error())
-		return
-	}
-	if obj.Data.Tid != 1 {
-		return
-	}
-
-	//key = 1,噪声;2,PM2.5;3,PM10;4,温度;5,湿度;6,大气压;7,风速;8,风向
-	var env EnvData
-	env.Time = util.MlNow()
-	pm25, err := GetValue(obj.Data.Data, 2)
-	if err == nil {
-		env.PM25 = strconv.FormatFloat(pm25, 'f', 0, 64)
-	}
-
-	pm10, err := GetValue(obj.Data.Data, 3)
-	if err == nil {
-		env.PM10 = strconv.FormatFloat(pm10, 'f', 0, 64)
-	}
-
-	temp, err := GetValue(obj.Data.Data, 4)
-	if err == nil {
-		env.Wendu = strconv.FormatFloat(temp, 'f', 0, 64)
-	}
-
-	sd, err := GetValue(obj.Data.Data, 5)
-	if err == nil {
-		env.Shidu = strconv.FormatFloat(sd, 'f', 0, 64)
-	}
-
-	aqi, degree := util.GetAqiAndDegree(pm25, pm10)
-	env.Aqi = strconv.FormatFloat(aqi, 'f', 0, 64)
-	env.Zhishu = degree
-
-	//风速,风力
-	direction, err := GetValue(obj.Data.Data, 8)
-	if err == nil {
-		env.Fengxiang = util.GetWindDirection(direction).Namezh
-	}
-	speed, err := GetValue(obj.Data.Data, 7)
-	if err == nil {
-		x, _ := util.GetWindGrade(speed)
-		env.Fengji = x
-	}
-
-	o.muEnvdata.Lock()
-	o.Envdata = &env
-	o.muEnvdata.Unlock()
-}
-
-func (o *WebSvr) Handle(args ...interface{}) interface{} {
-	defer func() {
-		if err := recover(); err != nil {
-			logrus.Errorf("WebSvr.StartSvr发生异常:%v", err)
-			logrus.Errorf("WebSvr.StartSvr发生异常,堆栈信息:%s", string(debug.Stack()))
-			gopool.Add(o.StartSvr, args)
-		}
-	}()
-	exit := false
-	for {
-		select {
-		case <-o.ctx.Done():
-			logrus.Errorf("WebSvr.HandleData退出,原因:%v", o.ctx.Err())
-			exit = true
-		default:
-			//从队列钟获取指令执行
-			if m, ok, _ := o.queue.Get(); ok {
-				if mm, ok := m.(mqtt.Message); ok {
-					if fn, ok := o.mapTopicHandle[mm.Topic()]; ok {
-						fn(mm)
-					}
-				}
-			} else {
-				if exit { //退出前全部恢复时控模式
-					return 0
-				}
-				time.Sleep(300 * time.Millisecond)
-			}
-		}
-	}
-}
-
-func (o *WebSvr) Update(data *tagVehicleInfo) {
-	key := data.CamID
-	//不用车牌时间,防止抓拍单元时间和网关时间相差太大
-	value := &protocol.VehicleSpeed{Plate: data.VehiclePlate, Time: protocol.BJTime(util.MlNow()), Type: data.VehicleType, Speed: data.VehicleSpeed}
-	o.muVSpeed.Lock()
-	o.VSpeed[key] = value
-	o.muVSpeed.Unlock()
-}
-
-func (o *WebSvr) StartSvr(args ...interface{}) interface{} {
-	defer func() {
-		if err := recover(); err != nil {
-			logrus.Errorf("WebSvr.StartSvr发生异常:%v", err)
-			logrus.Errorf("WebSvr.StartSvr发生异常,堆栈信息:%s", string(debug.Stack()))
-			gopool.Add(o.StartSvr, args)
-		}
-	}()
-	return o.echo.Start(o.IPAddr)
-}
-
-func (o *WebSvr) HTTPErrorHandler(err error, c echo.Context) {
-	c.JSON(http.StatusInternalServerError, nil)
-}
-
-func (o *WebSvr) GetData(c echo.Context) error {
-	obj := GetDataPool().GetData()
-	obj.Reset()
-	defer GetDataPool().Release(obj)
-
-	key := c.QueryParam("code")
-	o.muVSpeed.Lock()
-	if v, ok := o.VSpeed[key]; ok {
-		diffSec := util.MlNow().Sub(time.Time(v.Time)).Seconds()
-		if diffSec > float64(itsConfig.Duration) {
-			obj.Chesu = 0
-			delete(o.VSpeed, key)
-		} else {
-			obj.Chesu = v.Speed
-		}
-	}
-	o.muVSpeed.Unlock()
-
-	o.muEnvdata.Lock()
-	if o.Envdata != nil {
-		//if util.MlNow().Sub(o.Envdata.DateTime).Seconds() < 24*3600 {
-		obj.Fengji = o.Envdata.Fengji
-		obj.Tianqi = o.Envdata.Tianqi
-		obj.Aqi = o.Envdata.Aqi
-		obj.PM25 = o.Envdata.PM25
-		obj.PM10 = o.Envdata.PM10
-		obj.Wendu = o.Envdata.Wendu
-		obj.Zhishu = o.Envdata.Zhishu
-		obj.Shidu = o.Envdata.Shidu
-		obj.Fengxiang = o.Envdata.Fengxiang
-		obj.Fengji = o.Envdata.Fengji
-		//} else {
-		//	o.Envdata = nil
-		//}
-	}
-	o.muEnvdata.Unlock()
-
-	obj.Chesufazhi = int(itsConfig.SuggestSpeed)
-	return c.JSON(http.StatusOK, H{"data": 0})
-}
-
-func GetValue(m map[uint16]float64, key uint16) (float64, error) {
-	if v, ok := m[key]; ok {
-		return v, nil
-	}
-	return 0.0, errors.New("未找到")
-}

+ 0 - 370
edge/its/wrap.go

@@ -1,370 +0,0 @@
-package main
-
-/*
-//linux
-//#cgo CFLAGS:-I./include
-//#cgo LDFLAGS:-L./dll -limos_mw_sdk -lmw_sdk_bp -lmw_sdk_ipc -lmw_sdk_player -lmw_sdk_rm -lcurl -lm -Wl,-rpath=./dll
-
-//arm linux
-#cgo CFLAGS:-I./include
-#cgo LDFLAGS:-L./lib -limos_mw_sdk -lmw_sdk_bp -lmw_sdk_ipc -lmw_sdk_player -lmw_sdk_rm -lm -Wl,--allow-multiple-definition -L/usr/staging_dir/target-arm_cortex-a7+neon_uClibc-0.9.33.2_eabi/usr/lib/libiconv-stub/lib -liconv
-
-#include "imos_sdk_def.h"
-#include "imos_sdk_pub.h"
-#include "imos_sdk_func.h"
-#include <stdlib.h>
-#include <string.h>
-
-void STDCALL* CgoImosMwStatusReportCallback(IN CHAR *pcUserID,IN ULONG ulReportType,IN VOID *pParam);
-void STDCALL* CgoImosMwTmsMultiuserPicUpload(IN IMOS_MW_MULTI_UNIVIEW_PROTOCOL_HEADER_S *pstUniviewData,IN  ULONG ulStreamHandle);
-*/
-import "C"
-import (
-	"errors"
-	"fmt"
-	"math/rand"
-	"time"
-	"unsafe"
-
-	"github.com/sirupsen/logrus"
-
-	"lc/common/protocol"
-	"lc/common/util"
-)
-
-//export CgoImosMwStatusReportCallback
-func CgoImosMwStatusReportCallback(pcUserID *C.char, ulReportType C.ulong, pParam unsafe.Pointer) unsafe.Pointer {
-	userid := C.GoString(pcUserID)
-	switch ulReportType {
-	case C.IMOS_MW_STATUS_KEEPALIVE: //用户保活失败,无需调用退出接口
-		logrus.Warnf("用户保活失败,userid:%v,data:%v", userid, *(*C.ulong)(pParam))
-		GetITSDeviceMgr().NotifyLogout(userid)
-	case C.IMOS_MW_STATUS_UPDATE: //升级状态
-		//logrus.Infof("升级状态,userid:%s,data:%d", userid, *(*C.ulong)(pParam))
-	case C.IMOS_MW_STATUS_PLAYER_MEDIA_PROCESS: //播放状态,不处理
-	}
-	return nil
-}
-
-//export CgoImosMwTmsMultiuserPicUpload
-func CgoImosMwTmsMultiuserPicUpload(pstUniviewData *C.IMOS_MW_MULTI_UNIVIEW_PROTOCOL_HEADER_S, ulStreamHandle C.ULONG) unsafe.Pointer {
-	if pstUniviewData == nil {
-		return nil
-	}
-	PassTime := C.GoStringN(&pstUniviewData.szPassTime[0], MinLength(C.int(C.strlen(&pstUniviewData.szPassTime[0])), C.IMOS_MW_UNIVIEW_MAX_TIME_LEN))
-	if len(PassTime) >= 14 {
-		PassTime = PassTime[0:14]
-	}
-	t, err := util.MlParseTimeX("20060102150405", PassTime)
-	if err != nil {
-		return nil
-	}
-	v := tagVehicleInfo{
-		VehiclePlate:     C.GoStringN(&pstUniviewData.szCarPlate[0], MinLength(C.int(C.strlen(&pstUniviewData.szCarPlate[0])), C.IMOS_MW_CAR_PLATE_MAX_LEN)),
-		VehicleType:      int8(pstUniviewData.lVehicleType),
-		VehicleColor:     byte(pstUniviewData.cVehicleColor),
-		VehicleSpeed:     int(pstUniviewData.lVehicleSpeed),
-		PassTime:         t,
-		PlaceName:        C.GoStringN(&pstUniviewData.szPlaceName[0], MinLength(C.int(C.strlen(&pstUniviewData.szPlaceName[0])), C.IMOS_MW_PLACE_NAME_MAX_LEN)),
-		VehicleDirection: int8(pstUniviewData.lDirection),
-		LaneID:           int8(pstUniviewData.lLaneID),
-		LaneType:         int8(pstUniviewData.lLaneType),
-		CamID:            C.GoStringN(&pstUniviewData.szCamID[0], MinLength(C.int(C.strlen(&pstUniviewData.szCamID[0])), C.IMOS_MW_DEV_ID_MAX_LEN)),
-		TollgateID:       C.GoStringN(&pstUniviewData.szTollgateID[0], MinLength(C.int(C.strlen(&pstUniviewData.szTollgateID[0])), C.IMOS_MW_DEV_ID_MAX_LEN)),
-		IdentifyStatus:   int8(pstUniviewData.lIdentifyStatus),
-		StreamHandle:     int(ulStreamHandle),
-	}
-	logrus.Debugln(v)
-	GetITSDeviceMgr().PushData(&v)
-	return nil
-}
-
-var ErrNotLogin = errors.New("未登陆")
-
-func ResultToError(res int) error {
-	return errors.New(fmt.Sprintf("错误码:%d", res))
-}
-func MinLength(A, B C.int) C.int {
-	if A > B {
-		return B
-	}
-	return A
-}
-
-type ITSDevice struct {
-	CamID      string                  //配置文件,相机编号
-	TollgateID string                  //卡口编号:产生该信息的卡口代码
-	User       string                  //配置文件,登陆用户名
-	Pass       string                  //配置文件,登陆用户密码
-	IP         string                  //配置文件,摄像机IP
-	Port       uint16                  //配置文件,摄像机端口
-	UserID     string                  //login后返回
-	Handle     uint64                  //抓拍
-	Static     *protocol.VehicleStatic //数据统计
-	Reconn     int                     //
-}
-
-func NewITSDevice(tollgateid, ID, User, Pass, IP string, Port uint16) *ITSDevice {
-	obj := ITSDevice{
-		CamID:      ID,
-		TollgateID: tollgateid,
-		User:       User,
-		Pass:       Pass,
-		IP:         IP,
-		Port:       Port,
-		UserID:     "",
-		Handle:     0,
-		Static:     protocol.NewVehicleStatic(),
-	}
-	return &obj
-}
-
-func (o *ITSDevice) Login() error {
-	cUserID := (*C.char)(C.malloc(C.IMOS_MW_RES_CODE_LEN))
-	user := C.CString(o.User)
-	pass := C.CString(o.Pass)
-	cip := C.CString(o.IP)
-	defer C.free(unsafe.Pointer(cUserID))
-	defer C.free(unsafe.Pointer(user))
-	defer C.free(unsafe.Pointer(pass))
-	defer C.free(unsafe.Pointer(cip))
-	res := C.IMOS_MW_Login(user, pass, cip, C.ushort(o.Port), cUserID)
-	if res == C.ERR_COMMON_SUCCEED {
-		o.UserID = C.GoString((*C.char)(unsafe.Pointer(cUserID)))
-		return nil
-	}
-	return ResultToError(int(res))
-}
-
-func (o *ITSDevice) Logout() error {
-	if o.UserID == "" {
-		return ErrNotLogin
-	}
-	o.StopMediaStream()
-	usrid := C.CString(o.UserID)
-	defer C.free(unsafe.Pointer(usrid))
-	res := C.IMOS_MW_Logout(usrid)
-	if res == C.ERR_COMMON_SUCCEED {
-		//退出置空userid
-		o.UserID = ""
-		return nil
-	}
-	return ResultToError(int(res))
-}
-
-func (o *ITSDevice) GetDeviceStatus() (*tagMwBasicDeviceInfo, error) {
-	if o.UserID == "" {
-		return nil, ErrNotLogin
-	}
-	usrid := C.CString(o.UserID)
-	defer C.free(unsafe.Pointer(usrid))
-	var stBasicInfo C.IMOS_MW_BASIC_DEVICE_INFO_S
-	res := C.IMOS_MW_GetDeviceStatus(usrid, 0, C.IMOS_MW_STATUS_BASIC_INFO, (unsafe.Pointer)(&stBasicInfo))
-	if res == C.ERR_COMMON_SUCCEED {
-		var bdi tagMwBasicDeviceInfo
-		bdi.Manufacturer = C.GoStringN(&stBasicInfo.szManufacturer[0], MinLength(C.int(C.strlen(&stBasicInfo.szManufacturer[0])), C.IMOS_MW_VERSION_LEN))          //厂商
-		bdi.DeviceModel = C.GoStringN(&stBasicInfo.szDeviceModel[0], MinLength(C.int(C.strlen(&stBasicInfo.szDeviceModel[0])), C.IMOS_MW_VERSION_LEN))             //设备类型
-		bdi.SerialNumber = C.GoStringN(&stBasicInfo.szSerialNumber[0], MinLength(C.int(C.strlen(&stBasicInfo.szSerialNumber[0])), C.IMOS_MW_VERSION_LEN))          //设备序列号
-		bdi.DeviceMAC = C.GoStringN(&stBasicInfo.szDeviceMAC[0], MinLength(C.int(C.strlen(&stBasicInfo.szDeviceMAC[0])), C.IMOS_MW_VERSION_LEN))                   //设备MAC地址
-		bdi.FirmwareVersion = C.GoStringN(&stBasicInfo.szFirmwareVersion[0], MinLength(C.int(C.strlen(&stBasicInfo.szFirmwareVersion[0])), C.IMOS_MW_VERSION_LEN)) //软件版本, program版本
-		bdi.HardwareID = C.GoStringN(&stBasicInfo.szHardwareID[0], MinLength(C.int(C.strlen(&stBasicInfo.szHardwareID[0])), C.IMOS_MW_VERSION_LEN))                //硬件标识
-		bdi.PCBVersion = C.GoStringN(&stBasicInfo.szPCBVersion[0], MinLength(C.int(C.strlen(&stBasicInfo.szPCBVersion[0])), C.IMOS_MW_VERSION_LEN))                //PCB版本
-		bdi.UbootVersion = C.GoStringN(&stBasicInfo.szUbootVersion[0], MinLength(C.int(C.strlen(&stBasicInfo.szUbootVersion[0])), C.IMOS_MW_VERSION_LEN))          //UBOOT引导版本
-		return &bdi, nil
-	}
-	return nil, ResultToError(int(res))
-}
-
-func (o *ITSDevice) Reboot() error {
-	if o.UserID == "" {
-		return ErrNotLogin
-	}
-	o.StopMediaStream()
-	usrid := C.CString(o.UserID)
-	defer C.free(unsafe.Pointer(usrid))
-	res := C.IMOS_MW_Reboot(usrid)
-	if res == C.ERR_COMMON_SUCCEED {
-		return nil
-	}
-	return ResultToError(int(res))
-}
-
-func (o *ITSDevice) SetPicStreamDataCallback() error {
-	if o.UserID == "" {
-		return ErrNotLogin
-	}
-	usrid := C.CString(o.UserID)
-	ip := C.CString("")
-	defer C.free(unsafe.Pointer(usrid))
-	defer C.free(unsafe.Pointer(ip))
-	var ulCaptureStreamHandle C.ulong
-	res := C.IMOS_MW_SetPicStreamDataCallback(usrid, 0, ip, C.IMOS_MW_TMS_MULTIUSER_PIC_UPLOAD_PF(C.CgoImosMwTmsMultiuserPicUpload), &ulCaptureStreamHandle)
-	if res == C.ERR_COMMON_SUCCEED {
-		o.Handle = uint64(ulCaptureStreamHandle)
-		return nil
-	}
-	return ResultToError(int(res))
-}
-
-func (o *ITSDevice) StopMediaStream() error {
-	if o.UserID == "" {
-		return ErrNotLogin
-	}
-	usrid := C.CString(o.UserID)
-	defer C.free(unsafe.Pointer(usrid))
-	res := C.IMOS_MW_StopMediaStream(usrid, C.ulong(o.Handle))
-	if res == C.ERR_COMMON_SUCCEED {
-		o.Handle = 0
-		return nil
-	}
-	return ResultToError(int(res))
-}
-
-func (o *ITSDevice) ToStatic(data *tagVehicleInfo) {
-	o.Static.AddDirection(data.VehicleDirection)
-	VehiclePlate := []rune(data.VehiclePlate)
-	if len(VehiclePlate) > 2 {
-		Province := string(VehiclePlate[0:1])
-		ProvinceCity := string(VehiclePlate[0:2])
-		o.Static.AddProvince(Province)
-		o.Static.AddProvinceCity(ProvinceCity)
-	} else {
-		o.Static.AddProvince(itsConfig.DefProvince)
-		o.Static.AddProvinceCity(itsConfig.DefCity)
-	}
-	pvs := &protocol.VehicleSpeed{
-		Plate:     data.VehiclePlate,
-		Time:      protocol.BJTime(data.PassTime),
-		Type:      data.VehicleType,
-		Speed:     data.VehicleSpeed,
-		Direction: uint(data.VehicleDirection),
-	}
-	o.Static.AddVehicleSpeed(pvs)
-	o.Static.AddVehicleType(data.VehicleType)
-}
-
-func (o *ITSDevice) SendStatic(t time.Time) {
-	if o.Static == nil {
-		return
-	}
-	logrus.Debugf("时间段:%s卡口%s检测到的车辆数%d", t.Format("2006-01-02 15:04:05"), o.CamID, len(o.Static.SliceVehicleSpeed))
-	o.Static.StaticTime = t
-	o.Static.TollgateID = o.TollgateID
-	var obj protocol.Pack_VehicleStatic
-	if str, err := obj.EnCode(o.CamID, appConfig.GID, GetNextUint64(), o.Static); err == nil {
-		topic := GetTopic(protocol.DT_ITS, o.CamID, protocol.TP_ITS_VEHICLESTATIC)
-		if buf, err := util.GzipEncode([]byte(str)); err == nil {
-			GetMQTTMgr().Publish(topic, string(buf), 0, ToCloud)
-		}
-	}
-	o.Static.Reset()
-}
-
-// GetSDKVersion 全局函数
-func GetSDKVersion() (string, error) {
-	cDataver := (*C.uchar)(C.malloc(C.size_t(C.IMOS_MW_SDK_CLIENT_VERSION_LEN + 1)))
-	defer C.free(unsafe.Pointer(cDataver))
-	res := C.IMOS_MW_GetSDKVersion(cDataver)
-	if res == C.ERR_COMMON_SUCCEED {
-		return C.GoString((*C.char)(unsafe.Pointer(cDataver))), nil
-	}
-	return "", ResultToError(int(res))
-}
-
-func SetLog(dir string) error {
-	cdir := C.CString(dir)
-	defer C.free(unsafe.Pointer(cdir))
-	res := C.IMOS_MW_SetLog(C.IMOS_SDK_LOG_DEBUG, cdir, 10*1024)
-	if res == C.ERR_COMMON_SUCCEED {
-		return nil
-	}
-	return ResultToError(int(res))
-}
-
-func init() {
-	res := C.IMOS_MW_Initiate()
-	if res != C.ERR_COMMON_SUCCEED {
-		msg := fmt.Sprintf("调用IMOS_MW_Initiate发生错误:%v", res)
-		panic(msg)
-	}
-	SetLog(util.GetPath(3))
-	C.IMOS_MW_SetStatusCallback(C.IMOS_MW_STATUS_REPORT_CALLBACK_PF(C.CgoImosMwStatusReportCallback))
-}
-
-func uninit() {
-	C.IMOS_MW_Cleanup()
-}
-
-func Test() {
-	for {
-		var x C.IMOS_MW_MULTI_UNIVIEW_PROTOCOL_HEADER_S
-
-		plate := C.CString("湘A88888")
-		C.memcpy(unsafe.Pointer(&x.szCarPlate[0]), unsafe.Pointer(plate), C.size_t(C.strlen(plate)))
-		C.free(unsafe.Pointer(plate))
-
-		x.lVehicleType = 1
-		x.cVehicleColor = C.char('A')
-		x.lVehicleSpeed = C.long(RandInt(1, 120))
-
-		//经过时间
-		t := C.CString(util.MlNow().Format("20060102150405"))
-		C.memcpy(unsafe.Pointer(&x.szPassTime[0]), unsafe.Pointer(t), C.size_t(C.strlen(t)))
-		C.free(unsafe.Pointer(t))
-
-		//位置
-		l := C.CString(time.Now().Format("某路口"))
-		C.memcpy(unsafe.Pointer(&x.szPlaceName[0]), unsafe.Pointer(l), C.size_t(C.strlen(l)))
-		C.free(unsafe.Pointer(l))
-
-		x.lDirection = 1
-		x.lLaneID = 1
-		x.lLaneType = 0
-		s := C.CString("SXT000000001")
-		C.memcpy(unsafe.Pointer(&x.szCamID[0]), unsafe.Pointer(s), C.size_t(C.strlen(s)))
-		C.free(unsafe.Pointer(s))
-
-		k := C.CString("KK0000000001")
-		C.memcpy(unsafe.Pointer(&x.szTollgateID[0]), unsafe.Pointer(k), C.size_t(C.strlen(k)))
-		C.free(unsafe.Pointer(k))
-
-		x.lIdentifyStatus = 0
-
-		CgoImosMwTmsMultiuserPicUpload(&x, 11)
-
-		time.Sleep(time.Duration(RandInt(400, 10000)) * time.Millisecond)
-
-		pcUserID := C.CString("1122222333YYY3")
-		dat := C.ulong(2222)
-
-		CgoImosMwStatusReportCallback(pcUserID, C.ulong(1), unsafe.Pointer(&dat))
-		C.free(unsafe.Pointer(pcUserID))
-
-	}
-}
-
-// RandInt 随机整数
-func RandInt(min, max int) int {
-	if min >= max || min == 0 || max == 0 {
-		return max
-	}
-	return rand.Intn(max-min) + min
-}
-
-/*
-char -->  C.char -->  byte
-signed char -->  C.schar -->  int8
-unsigned char -->  C.uchar -->  uint8
-short int -->  C.short -->  int16
-short unsigned int -->  C.ushort -->  uint16
-int -->  C.int -->  int
-unsigned int -->  C.uint -->  uint32
-long int -->  C.long -->  int32 or int64
-long unsigned int -->  C.ulong -->  uint32 or uint64
-long long int -->  C.longlong -->  int64
-long long unsigned int -->  C.ulonglong -->  uint64
-float -->  C.float -->  float32
-double -->  C.double -->  float64
-wchar_t -->  C.wchar_t  -->
-void * -> unsafe.Pointer
-*/

+ 0 - 33
edge/its/wrapstruct.go

@@ -1,33 +0,0 @@
-package main
-
-import "C"
-import (
-	"time"
-)
-
-type tagMwBasicDeviceInfo struct {
-	Manufacturer    string /**< 厂商 */
-	DeviceModel     string /**< 设备类型 */
-	SerialNumber    string /**< 设备序列号 */
-	DeviceMAC       string /**< 设备MAC地址 */
-	FirmwareVersion string /**< 软件版本, program 版本 */
-	HardwareID      string /**< 硬件标识 */
-	PCBVersion      string /**< PCB版本 */
-	UbootVersion    string /**< UBOOT引导版本 */
-}
-
-type tagVehicleInfo struct {
-	VehiclePlate     string    //车牌
-	VehicleType      int8      //车辆类型
-	VehicleColor     byte      //车身颜色
-	VehicleSpeed     int       //车辆速度
-	PassTime         time.Time //经过时刻:YYYYMMDDHHMMSS, 时间按24小时制
-	PlaceName        string    //地点名称
-	VehicleDirection int8      //行使方向
-	LaneID           int8      //车道编号:从1开始, 车辆行驶方向最左车道为1,由左向右顺序编号
-	LaneType         int8      //车道类型:0-机动车道,1-非机动车道
-	CamID            string    //设备编号:采集设备统一编号或卡口相机编码, 不可为空
-	TollgateID       string    //卡口编号:产生该信息的卡口代码
-	IdentifyStatus   int8      //识别状态
-	StreamHandle     int       //
-}

+ 0 - 27
edge/its_win/conf/app.json

@@ -1,27 +0,0 @@
-{
-  "Name":"网关",
-  "Tenant":"000000",
-  "GID":"T183761388822",
-  "SN":"20200401023212",
-  "Upgrade":true,
-  "Edge":{
-    "mqtt":{
-      "server":"tcp://127.0.0.1:1883",
-      "user":"",
-      "password":"",
-      "Timeout":1000
-    },
-    "redis":{
-      "server":"127.0.0.1:6379",
-      "password":""
-    }
-  },
-  "Cloud":{
-    "mqtt": {
-      "server": "tcp://113.247.241.253:1883",
-      "user": "admin",
-      "password": "admin",
-      "Timeout": 3000
-    }
-  }
-}

+ 0 - 25
edge/its_win/conf/its.json

@@ -1,25 +0,0 @@
-{
-  "IPAddr":"0.0.0.0:9180",
-  "SuggestSpeed":60,
-  "Duration":60,
-  "EnvID": "QXJC4301027MKYLO",
-  "DefProvince": "湘",
-  "DefCity": "湘F",
-  "RemotePub": 0,
-  "RemoteSub": "ZPDY430102ONVS5R",
-  "dev": [
-    {
-      "Code": "ZPDY430102ONVS5R",
-      "ID": "ZPDY430102ONVS5R",
-      "TollgateID": "1A5DF2",
-      "Name": "抓拍单元",
-      "Brand": "UNIVIEW",
-      "Model": "HC131@GDM-L32S",
-      "DevType": 4,
-      "User": "admin",
-      "Password": "admin8888",
-      "IP": "192.168.1.13",
-      "Port": 80
-    }
-  ]
-}

+ 0 - 33
edge/its_win/conf/log.conf

@@ -1,33 +0,0 @@
-debug {
-        level = "debug"
-        formatter.name = "text"
-        formatter.options  {
-                            force-colors      = true
-                            disable-colors    = false
-                            disable-timestamp = false
-                            full-timestamp    = false
-                            timestamp-format  = "2006-01-02 15:04:05"
-                            disable-sorting   = false
-        }
-}
-release {
-        level = "debug"
-        out.name = "rotatelogs"
-        out.options {
-                    path =  ./log/%Y%m%d.log
-                    #clock=
-                    #location=
-                    #link-name= logs/release/current.log
-                    #rotation-time=   #default 24hour
-                    #max-age=         #default 24hour * 7
-        }
-        formatter.name = "json"
-        formatter.options  {
-                            force-colors      = false
-                            disable-colors    = false
-                            disable-timestamp = false
-                            full-timestamp    = false
-                            timestamp-format  = "2006-01-02 15:04:05"
-                            disable-sorting   = false
-        }
-}

+ 0 - 33
edge/its_win/config.go

@@ -1,33 +0,0 @@
-package main
-
-import (
-	"lc/common/configor"
-	"lc/common/protocol"
-	"lc/common/util"
-)
-
-func GetTopic(devtype, id, topic string) string {
-	return appConfig.Tenant + "/" + devtype + "/" + id + "/" + topic
-}
-
-var appConfig protocol.AppConfig
-var itsConfig protocol.ITSDevConfig
-
-func loadAppConfig() error {
-	var o protocol.AppConfig
-	err := configor.Load(&o, util.GetPath(0)+"app.json")
-	if err == nil && o.GID != "" {
-		appConfig = o
-	}
-	return err
-}
-
-func LoadITSDevConfig() error {
-	var o protocol.ITSDevConfig
-	err := configor.Load(&o, util.GetPath(0)+"its.json")
-	if err == nil {
-		itsConfig = o
-		return nil
-	}
-	return err
-}

+ 0 - 52
edge/its_win/main.go

@@ -1,52 +0,0 @@
-package main
-
-import (
-	"runtime"
-
-	"github.com/sirupsen/logrus"
-
-	"lc/common/util"
-)
-
-var IDGen util.IdWorker
-var gopool *util.Pool
-
-var version = "1.0.12"
-var appname = "its"
-
-func GetNextUint64() uint64 {
-	u64, err := IDGen.NextId()
-	if err != nil {
-		logrus.Errorf("IDGen.NextId发生错误:%s", err.Error())
-		u64 = util.MlNow().Unix()
-	}
-	return uint64(u64)
-}
-
-//cgo学习资料:https://www.cnblogs.com/binHome/p/12984064.html
-func main() {
-	runtime.GOMAXPROCS(runtime.NumCPU() * 2)
-	util.InitLogrus("release")
-	logrus.Infof("当前程序版本:%s", appname+" "+version)
-	IDGen.InitIdWorker(1000, 1)
-	if err := loadAppConfig(); err != nil {
-		logrus.Errorf("加载app.json失败:%s", err.Error())
-		return
-	}
-
-	if err := LoadITSDevConfig(); err != nil {
-		logrus.Errorf("加载its.json失败:%s", err.Error())
-		return
-	}
-
-	GetMQTTMgr()
-	GetWebSvr().MQTTSubscribe()
-
-	gopool = util.NewPool(10)
-	gopool.Add(GetMQTTMgr().MQTTMessageHandle, 1)
-	gopool.Add(GetWebSvr().StartSvr, 3)
-	gopool.Add(GetWebSvr().Handle, 4)
-	gopool.Add(GetMQTTMgr().MQTTConnectMgr, 5)
-	gopool.Run()
-	gopool.Wait()
-}

+ 0 - 125
edge/its_win/mqttclient.go

@@ -1,125 +0,0 @@
-package main
-
-import (
-	"context"
-	"fmt"
-	"sync"
-	"time"
-
-	"github.com/sirupsen/logrus"
-
-	"lc/common/mqtt"
-)
-
-type BaseMqttOnline interface {
-	GetOnlineMsg() (string, string)
-	GetWillMsg() (string, string)
-}
-
-type EmptyMqttOnline struct {
-}
-
-func (o *EmptyMqttOnline) GetOnlineMsg() (string, string) {
-	return "", ""
-}
-func (o *EmptyMqttOnline) GetWillMsg() (string, string) {
-	return "", ""
-}
-
-type MqttClient struct {
-	mqtt       *mqtt.Client        //
-	mu         sync.Mutex          //保护mapTopics
-	mapTopics  map[string]mqtt.QOS //订阅的主题
-	timeout    uint                //超时时间,毫秒为单位
-	MqttOnline BaseMqttOnline      //是否发布上线消息&遗嘱消息
-}
-
-func NewMqttClient(server, clientid, user, password string, timeout uint, mqttOnline BaseMqttOnline) *MqttClient {
-	o := MqttClient{
-		mapTopics:  make(map[string]mqtt.QOS),
-		timeout:    timeout,
-		MqttOnline: mqttOnline,
-	}
-	client, err := mqtt.NewClient(mqtt.ClientOptions{
-		Servers:       []string{server},
-		ClientID:      clientid,
-		Username:      user,
-		Password:      password,
-		AutoReconnect: true,
-	}, &o)
-	if err != nil {
-		panic(fmt.Sprintf("MQTT错误:%v", err.Error()))
-		return nil
-	}
-	o.mqtt = client
-	err = client.Connect(o.Ctx())
-	return &o
-}
-
-func (o *MqttClient) ConnectionLostHandler(err error) {
-	logrus.Errorln("MqttClient.ConnectionLostHandler:MQTT连接已经断开,原因:", err)
-}
-
-func (o *MqttClient) OnConnectHandler() {
-	logrus.Infoln("MqttClient.OnConnectHandler:MQTT连接成功")
-	//连接成功则订阅主题
-	for k, v := range o.mapTopics {
-		o.Subscribe(k, v)
-	}
-	topic, str := o.MqttOnline.GetOnlineMsg()
-	if topic != "" {
-		o.PublishString(topic, str, 0)
-	}
-}
-
-func (o *MqttClient) GetWill() (topic string, payload string) {
-	return o.MqttOnline.GetWillMsg()
-}
-
-func (o *MqttClient) Connect() error {
-	if !o.mqtt.IsConnected() {
-		return o.mqtt.Connect(o.Ctx())
-	}
-	return nil
-}
-
-func (o *MqttClient) IsConnected() bool {
-	return o.mqtt.IsConnected()
-}
-
-func (o *MqttClient) Publish(topic string, payload []byte, qos mqtt.QOS) error {
-	return o.mqtt.Publish(o.Ctx(), topic, payload, qos)
-}
-func (o *MqttClient) PublishString(topic string, payload string, qos mqtt.QOS) error {
-	return o.mqtt.PublishString(o.Ctx(), topic, payload, qos)
-}
-func (o *MqttClient) PublishJSON(topic string, payload interface{}, qos mqtt.QOS) error {
-	return o.mqtt.PublishJSON(o.Ctx(), topic, payload, qos)
-}
-
-func (o *MqttClient) Subscribe(topic string, qos mqtt.QOS) error {
-	o.mu.Lock()
-	defer o.mu.Unlock()
-	if _, ok := o.mapTopics[topic]; !ok {
-		o.mapTopics[topic] = qos
-	}
-	return o.mqtt.Subscribe(o.Ctx(), topic, qos)
-}
-
-func (o *MqttClient) Unsubscribe(topic string) error {
-	o.mu.Lock()
-	defer o.mu.Unlock()
-	if _, ok := o.mapTopics[topic]; ok {
-		delete(o.mapTopics, topic)
-	}
-	return o.mqtt.Unsubscribe(o.Ctx(), topic)
-}
-
-func (o *MqttClient) Handle(topic string, handler mqtt.MessageHandler) mqtt.Route {
-	return o.mqtt.Handle(topic, handler)
-}
-
-func (o *MqttClient) Ctx() context.Context {
-	ctx, _ := context.WithTimeout(context.Background(), time.Millisecond*time.Duration(o.timeout))
-	return ctx
-}

+ 0 - 180
edge/its_win/mqttmgr.go

@@ -1,180 +0,0 @@
-package main
-
-import (
-	"runtime/debug"
-	"sync"
-	"time"
-
-	"github.com/sirupsen/logrus"
-
-	"lc/common/mqtt"
-	"lc/common/util"
-)
-
-type OptType uint8
-
-const (
-	ToAll   OptType = 0 //发布和订阅边缘端与云端的消息
-	ToCloud OptType = 1 //发布和订阅云端的消息
-	ToEdge  OptType = 2 //发布和订阅边缘端的消息
-)
-
-var _mqttMgronce sync.Once
-var _mqttMgrsingle *MQTTMgr
-
-func GetMQTTMgr() *MQTTMgr {
-	_mqttMgronce.Do(func() {
-		_mqttMgrsingle = _newMQTTMgr()
-	})
-	return _mqttMgrsingle
-}
-
-type MQTTMgr struct {
-	Cloud *MqttClient
-	Edge  *MqttClient
-	Queue *util.MlQueue
-}
-
-func _newMQTTMgr() *MQTTMgr {
-	mgr := &MQTTMgr{
-		Queue: util.NewQueue(2000),
-	}
-	if appConfig.Edge.Mqtt.Server != "" {
-		mgr.Edge = NewMqttClient(appConfig.Edge.Mqtt.Server,
-			appConfig.GID+"@"+appname+version,
-			appConfig.Edge.Mqtt.User,
-			appConfig.Edge.Mqtt.Password,
-			appConfig.Edge.Mqtt.Timeout,
-			&EmptyMqttOnline{})
-	}
-	if appConfig.Cloud.Mqtt.Server != "" {
-		mgr.Cloud = NewMqttClient(appConfig.Cloud.Mqtt.Server,
-			appConfig.GID+"@"+appname+version,
-			appConfig.Cloud.Mqtt.User,
-			appConfig.Cloud.Mqtt.Password,
-			appConfig.Cloud.Mqtt.Timeout,
-			&EmptyMqttOnline{})
-	}
-	return mgr
-}
-
-func (o *MQTTMgr) Subscribe(topic string, qos mqtt.QOS, handler mqtt.MessageHandler, tp OptType) {
-	switch tp {
-	case ToAll:
-		if o.Cloud != nil {
-			o.Cloud.Handle(topic, handler)
-			o.Cloud.Subscribe(topic, qos)
-		}
-		if o.Edge != nil {
-			o.Edge.Handle(topic, handler)
-			o.Edge.Subscribe(topic, qos)
-		}
-	case ToCloud:
-		if o.Cloud != nil {
-			o.Cloud.Handle(topic, handler)
-			o.Cloud.Subscribe(topic, qos)
-		}
-	case ToEdge:
-		if o.Edge != nil {
-			o.Edge.Handle(topic, handler)
-			o.Edge.Subscribe(topic, qos)
-		}
-	}
-}
-
-func (o *MQTTMgr) UnSubscribe(topic string, tp OptType) {
-	switch tp {
-	case ToAll:
-		if o.Cloud != nil {
-			o.Cloud.Unsubscribe(topic)
-		}
-		if o.Edge != nil {
-			o.Edge.Unsubscribe(topic)
-		}
-	case ToCloud:
-		if o.Cloud != nil {
-			o.Cloud.Unsubscribe(topic)
-		}
-	case ToEdge:
-		if o.Edge != nil {
-			o.Edge.Unsubscribe(topic)
-		}
-	}
-}
-
-func (o *MQTTMgr) Publish(topic string, payload string, qos mqtt.QOS, tp OptType) {
-	msg := MQTTMessage{
-		topic:   topic,
-		payload: payload,
-		qos:     qos,
-		tp:      tp,
-	}
-	o.Queue.Put(&msg)
-}
-
-func (o *MQTTMgr) _publish(msg *MQTTMessage) error {
-	var err error
-	switch msg.tp {
-	case ToAll:
-		if o.Cloud != nil {
-			err = o.Cloud.PublishString(msg.topic, msg.payload, msg.qos)
-		}
-		if o.Edge != nil {
-			o.Edge.PublishString(msg.topic, msg.payload, msg.qos)
-		}
-	case ToCloud:
-		if o.Cloud != nil {
-			err = o.Cloud.PublishString(msg.topic, msg.payload, msg.qos)
-		}
-	case ToEdge:
-		if o.Edge != nil {
-			o.Edge.PublishString(msg.topic, msg.payload, msg.qos)
-		}
-	}
-	return err
-}
-
-func (o *MQTTMgr) MQTTConnectMgr(args ...interface{}) interface{} {
-	for {
-		time.Sleep(10 * time.Second)
-		if o.Cloud != nil {
-			o.Cloud.Connect()
-		}
-		if o.Edge != nil {
-			o.Edge.Connect()
-		}
-	}
-}
-
-func (o *MQTTMgr) MQTTMessageHandle(args ...interface{}) interface{} {
-	defer func() {
-		if err := recover(); err != nil {
-			logrus.Errorf("MQTTMgr.MQTTMessageHandle发生异常:%v", err)
-			logrus.Errorf("MQTTMgr.MQTTMessageHandle发生异常,堆栈信息:%s", string(debug.Stack()))
-			gopool.Add(o.MQTTMessageHandle, args)
-		}
-	}()
-	var err error
-	for {
-		if m, ok, _ := o.Queue.Get(); ok {
-			if msg, ok := m.(*MQTTMessage); ok {
-			RETRY:
-				err = o._publish(msg)
-				if err != nil {
-					logrus.Errorf("发布主题为%s的消息失败,原因:%s", msg.topic, err.Error())
-					time.Sleep(time.Second)
-					goto RETRY
-				}
-			}
-		} else {
-			time.Sleep(200 * time.Millisecond)
-		}
-	}
-}
-
-type MQTTMessage struct {
-	topic   string
-	payload string
-	qos     mqtt.QOS
-	tp      OptType
-}

+ 0 - 59
edge/its_win/pool.go

@@ -1,59 +0,0 @@
-package main
-
-import (
-	"sync"
-	"time"
-)
-
-//气象环境,实时MQTT订阅
-//车速阈值,固定配置
-//车牌、车速,
-
-type EnvData struct {
-	Time      time.Time `json:"-"`
-	Tianqi    string    `json:"tq"`   //天气
-	Wendu     string    `json:"wd"`   //温度
-	Zhishu    string    `json:"zs"`   //控制质量
-	Aqi       string    `json:"aqi"`  //指数
-	Fengxiang string    `json:"fx"`   //风向
-	Fengji    string    `json:"fj"`   //风急
-	Shidu     string    `json:"sd"`//hidu
-	PM25      string    `json:"pm25"` //PM2.5
-	PM10      string    `json:"pm10"` //PM10
-}
-type DisplayData struct {
-	EnvData
-	Chesu      int `json:"cs"`   //测速
-	Chesufazhi int `json:"csfz"` //测速阈值
-}
-
-func (o * DisplayData) Reset(){
-	o.Chesu = 0
-	o.Chesufazhi = 0
-}
-
-var _datapoolonce sync.Once
-var _datapoolsingle *DisplayDataPool
-
-func GetDataPool() *DisplayDataPool {
-	_datapoolonce.Do(func() {
-		_datapoolsingle = &DisplayDataPool{
-			pool: sync.Pool{New: func() interface{} { return &DisplayData{} }}}
-	})
-	return _datapoolsingle
-}
-
-type DisplayDataPool struct {
-	pool sync.Pool
-}
-
-func (o *DisplayDataPool) GetData() *DisplayData {
-	p := o.pool.Get()
-	return p.(*DisplayData)
-}
-
-func (o *DisplayDataPool) Release(p *DisplayData) {
-	if p != nil {
-		o.pool.Put(p)
-	}
-}

+ 0 - 40
edge/its_win/public/fonts/DIGITAL.TXT

@@ -1,40 +0,0 @@
-DS-Font's TrueType Fonts
-Font name: DS-Digital (Normal, Bold, Italic, Bold Italic), Version 1.0
-Author: Dusit Supasawat
-Web Site: http://ds-font.hypermart.net
-Contact me: Dusit Supasawat, 325/38 Suksawat32 Ratburana Bangkok Thailand 10140
-Email address: dusit@mailcity.com
-
-Thanks for trying! We hope you really enjoy this my typeface. This font is 
-distributed as shareware. You can use this font for a long time as you want. 
-After all, when you think this font can be usefulness for you. You can send 
-me some money, that would be way cool.
-
-I'm only asking $20 US shareware fee per this typeface for personal use. 
-And $45 US is the usual amount per this typeface for commercial use.
-
-Distribution: You are free to distribute this archive so long as this text 
-file is distributed with the archive, the font file have not been modified, 
-and it is understood that the font's copyright remains with the original 
-author (Dusit Supasawat).
-
-To register send your payment to:
-
-Dusit Supasawat
-325/38 Suksawat32 Ratburana
-Bangkok Thailand 10140
-
-And fill out something as this order form, and send it in with your payment.
-
-Font name:_________________________________________
-Your information
-Name:______________________________________________
-Address:___________________________________________
-City, State : _____________________________________
-Zip Code:__________________________________________
-Country:___________________________________________
-E-MAIL address:____________________________________
-
-
-You will receive fonts which you order by Email after registration. These fonts
-will be generated for you by specify your name in font information.

BIN
edge/its_win/public/fonts/DS-DIGI.TTF


BIN
edge/its_win/public/fonts/DS-DIGIB.TTF


BIN
edge/its_win/public/fonts/DS-DIGII.TTF


BIN
edge/its_win/public/fonts/DS-DIGIT.TTF


+ 0 - 265
edge/its_win/public/index_128_160_B.html

@@ -1,265 +0,0 @@
-<!DOCTYPE html>
-<html>
-    <head>
-        <meta charset="UTF-8"/>
-        <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
-        <title>智慧交通</title>
-        <style>
-            *{
-                margin: 0px;
-                padding: 0px;
-            }
-            @font-face{
-                font-family:"led regular";
-                src:url('/fonts/DS-DIGI.TTF');
-            }
-            .wrapper{
-                width:128px;
-                height:160px;
-                background: #020202;
-               
-            }
-            .wrap-head{
-                width:100%;
-                height:20px;
-                line-height: 20px;
-                color:#fff;
-            }
-            .wrap-head h2{
-                font-size:14px;
-                color:#fff;
-                 height:20px;
-                line-height: 20px;
-                text-align:center;
-                font-weight: normal;
-            }
-            .wrap-content{
-                width:100%;
-                position:relative;
-            }
-            .temperature-box{
-                width:62px;
-                height:41px;
-                border:1px solid #fff;
-                /*background: #f44f21;*/
-                color:#fff;
-            }
-            .temperature-box p{
-                font-size:11px;
-                margin-left:7px;
-                padding-top:2px;
-            }
-            .temperature-box h2{
-                font-size:20px;
-                color:red;
-                font-weight: normal;
-                text-align:center;
-                font-family:"led regular";
-            }
-            .air-qua{
-               width:100%;
-               height:49px;
-               color:#fff;
-                border-top:1px solid #fff;
-               /*background: #0cc75f;*/
-               position:relative;
-            }
-            .air-qua p{
-                margin-left:6px;
-                font-size:13px;
-                padding-top:3px;
-            }
-            .air-qua h2{
-                margin-left:8px;
-                font-weight:normal;
-                color:red;
-                font-size:25px;
-                font-family:"led regular";
-            }
-            .air-level{
-                position:absolute;
-                left:75px;
-                width:39px;
-                /*top:10px;*/
-                bottom:2px;
-                text-align: center;
-                border:2px solid #fff;
-                font-size:10px;
-                border-radius:12px;
-                padding:1px 3px;
-                color:#00e400;
-            }
-            .humidity{
-                position: absolute;
-                top:0;
-                right:1px;
-                /*background: #81b906;*/
-            }
-            .pm25{
-                position: absolute;
-                bottom:2px;
-                left:0;
-                /*background: #03a5f0;*/
-            }
-            .pm10{
-                position: absolute;
-                bottom:2px;
-                right:1px;
-                /*background: #f9b91e;*/
-            }
-
-             /*第二个*/
-            .wrap-head2{
-                width:74%;
-                margin:0 auto;
-                height:160px;
-                color:#0de408;
-               
-                text-align:center;
-            }
-            .tips-txt{
-                color:#0de408;
-                font-size:26px;
-                line-height: 30px;
-                text-align:center;
-                padding-right:0;
-            }
-            .tips-txt span{
-                letter-spacing:15px;
-            }
-            /*第四个 status4*/
-            .speed-box{
-                width:40px;
-                height:40px;
-                margin:0 auto;
-                text-align:center;
-                line-height:40px;
-                font-size:40px;
-               
-                font-family:"led regular";
-                src:url('/fonts/DS-DIGI.TTF');
-            }
-            .chaosu .tips-txt{
-                color:#e40808 ;
-            }
-            .chaosu .speed-box{
-                color:#e40808 ;
-                border-color:#e40808;
-                font-family:"led regular";
-                src:url('/fonts/DS-DIGI.TTF');
-            }
-            #status4, #status2, #status3 {
-                display: none;
-            }
-        </style>
-    </head>
-    <body>
-       <div class="wrapper" id="status1" >
-         <div class="wrap-head">
-            <h2 id="time">09:48</h2>
-         </div>
-         <div class="wrap-content">
-            <div class="air-qua">
-                <p>空气质量</p>
-                <h2 id="aqi">25</h2>
-                <div class="air-level" id="zs"><span>优</span></div>
-            </div>
-            <div style="position:relative;height:87px;margin-top:4px">
-            <div class="temperature-box">
-                <p>温度</p>
-                <h2 id="wd">25C</h2>
-            </div>
-            <div class="temperature-box humidity">
-                <p>湿度</p>
-                <h2 id="sd">25%</h2>
-            </div>
-            <div class="temperature-box pm25">
-                <p>PM2.5</p>
-                <h2 id="pm25">28</h2>
-            </div>
-            <div class="temperature-box pm10">
-                <p>PM10</p>
-                <h2 id="pm10">28</h2>
-            </div>
-            </div>
-         </div>
-       </div>
-       <div class="wrapper" id="status2" >
-         <div class="wrap-head2">
-            <p class="tips-txt"><span>前</span>方<span>弯</span>道<span>注</span>意<span>安</span>全</p>
-        <div class="speed-box" id="cs2" style="border:0;border-radius:0;height:40px;line-height:40px;">
-            
-        </div>
-         </div>
-       </div>
-       <div class="wrapper" id="status3" >
-         <div class="wrap-head2">
-            <p class="tips-txt"><span>前</span>方<span>弯</span>道<span>注</span>意<span>安</span>全</p>
-        <div class="speed-box" id="cs3" style="color:#ff0808;">
-            50
-        </div>
-         </div>
-       </div>
-       <div class="wrapper chaosu" id="status4">
-         <div class="wrap-head2">
-            <p class="tips-txt"><span>速</span>度<span>过</span>快<span>注</span>意<span>控</span>速</p>
-            <div class="speed-box" id="cs4">
-            </div>
-        </div>
-         </div>
-       </div>
-    </body>
-    <script src="/js/jquery.min.js"></script>
-    <script>
-        var flag = 0;
-        var speed = 0;
-        var csfz = 0;
-        function fn(){
-            var myDate=new Date;
-            var month = myDate.getMonth() + 1 < 10 ? "0" + (myDate.getMonth() + 1) : myDate.getMonth() + 1;
-            var date = myDate.getDate() < 10 ? "0" + myDate.getDate():myDate.getDate();
-            var h=myDate.getHours() < 10 ? ('0' + myDate.getHours()) : myDate.getHours();
-            var m=myDate.getMinutes() < 10 ? ('0' + myDate.getMinutes()) : myDate.getMinutes();
-            var s=myDate.getSeconds() < 10 ? ('0' + myDate.getSeconds()) : myDate.getSeconds();
-            var newTime = month + '-' + date +' ' + h  + ':' + m + ':' + s;
-            document.getElementById('time').innerHTML = newTime;
-        }
-        fn();
-        setInterval(fn,1000);
-        function fn2(){
-            $.ajax({
-                type : "GET",
-                url : "/getdata",
-                dataType : "json",
-                data : {"code":"0"},
-                success:function(res){
-                    $('#aqi').text(res.data.aqi);
-                    $('#wd').text(res.data.wd);
-                    $('#sd').text(res.data.sd);
-                    $('#pm25').text(res.data.pm25);
-                    $('#pm10').text(res.data.pm10);
-                    $('#zs').text(res.data.zs);
-                    $('#status1').show();
-                    $('#status2').hide();
-                    $('#status3').hide();
-                    $('#status4').hide();
-                    if(res.data.aqi <=50 && res.data.aqi >0){
-                        $('#zs').css('color','#00e400')
-                    }else if(res.data.aqi> 50 && res.data.aqi <=100 ){
-                        $('#zs').css('color','#ffbb17')
-                    }else if(res.data.aqi> 100 && res.data.aqi <=150 ){
-                        $('#zs').css('color','#ff7e00')
-                    }else if(res.data.aqi> 150 && res.data.aqi <=200 ){
-                        $('#zs').css('color','#ff0000')
-                    }else if(res.data.aqi> 200 && res.data.aqi <=300 ){
-                        $('#zs').css('color','#99004c')
-                    }else if(res.data.aqi > 300){
-                        $('#zs').css('color','#7e0023')
-                    }
-                }
-            })
-        }
-        fn2();
-         setInterval(fn2,500);
-    </script>
-</html>

+ 0 - 309
edge/its_win/public/index_128_160_lukou.html

@@ -1,309 +0,0 @@
-<!DOCTYPE html>
-<html>
-    <head>
-        <meta charset="UTF-8"/>
-        <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
-        <title>智慧交通</title>
-        <style>
-            *{
-                margin: 0px;
-                padding: 0px;
-            }
-            @font-face{
-                font-family:"led regular";
-                src:url('/fonts/DS-DIGI.TTF');
-            }
-            .wrapper{
-                width:128px;
-                height:160px;
-                background: #020202;
-               
-            }
-            .wrap-head{
-                width:100%;
-                height:20px;
-                line-height: 20px;
-                color:#fff;
-            }
-            .wrap-head h2{
-                font-size:14px;
-                color:#fff;
-                 height:20px;
-                line-height: 20px;
-                text-align:center;
-                font-weight: normal;
-            }
-            .wrap-content{
-                width:100%;
-                position:relative;
-            }
-            .temperature-box{
-                width:62px;
-                height:41px;
-                border:1px solid #fff;
-                /*background: #f44f21;*/
-                color:#fff;
-            }
-            .temperature-box p{
-                font-size:11px;
-                margin-left:7px;
-                padding-top:2px;
-            }
-            .temperature-box h2{
-                font-size:20px;
-                color:red;
-                font-weight: normal;
-                text-align:center;
-                font-family:"led regular";
-            }
-            .air-qua{
-               width:100%;
-               height:49px;
-               color:#fff;
-                border-top:1px solid #fff;
-               /*background: #0cc75f;*/
-               position:relative;
-            }
-            .air-qua p{
-                margin-left:6px;
-                font-size:13px;
-                padding-top:3px;
-            }
-            .air-qua h2{
-                margin-left:8px;
-                font-weight:normal;
-                color:red;
-                font-size:25px;
-                font-family:"led regular";
-            }
-            .air-level{
-                position:absolute;
-                left:75px;
-                width:39px;
-                /*top:10px;*/
-                bottom:2px;
-                text-align: center;
-                border:2px solid #fff;
-                font-size:10px;
-                border-radius:12px;
-                padding:1px 3px;
-                color:#00e400;
-            }
-            .humidity{
-                position: absolute;
-                top:0;
-                right:1px;
-                /*background: #81b906;*/
-            }
-            .pm25{
-                position: absolute;
-                bottom:2px;
-                left:0;
-                /*background: #03a5f0;*/
-            }
-            .pm10{
-                position: absolute;
-                bottom:2px;
-                right:1px;
-                /*background: #f9b91e;*/
-            }
-
-             /*第二个*/
-            .wrap-head2{
-                width:74%;
-                margin:0 auto;
-                height:160px;
-                color:#0de408;
-               
-                text-align:center;
-            }
-            .tips-txt{
-                color:#0de408;
-                font-size:26px;
-                line-height: 30px;
-                text-align:center;
-                padding-right:0;
-            }
-            .tips-txt span{
-                letter-spacing:15px;
-            }
-            /*第四个 status4*/
-            .speed-box{
-                width:40px;
-                height:40px;
-                margin:0 auto;
-                text-align:center;
-                line-height:40px;
-                font-size:40px;
-               
-                font-family:"led regular";
-                src:url('/fonts/DS-DIGI.TTF');
-            }
-            .chaosu .tips-txt{
-                color:#e40808 ;
-            }
-            .chaosu .speed-box{
-                color:#e40808 ;
-                border-color:#e40808;
-                font-family:"led regular";
-                src:url('/fonts/DS-DIGI.TTF');
-            }
-            #status4, #status2, #status3 {
-                display: none;
-            }
-        </style>
-    </head>
-    <body>
-       <div class="wrapper" id="status1" >
-         <div class="wrap-head">
-            <h2 id="time">09:48</h2>
-         </div>
-         <div class="wrap-content">
-            <div class="air-qua">
-                <p>空气质量</p>
-                <h2 id="aqi">25</h2>
-                <div class="air-level" id="zs"><span>优</span></div>
-            </div>
-            <div style="position:relative;height:87px;margin-top:4px">
-            <div class="temperature-box">
-                <p>温度</p>
-                <h2 id="wd">25C</h2>
-            </div>
-            <div class="temperature-box humidity">
-                <p>湿度</p>
-                <h2 id="sd">25%</h2>
-            </div>
-            <div class="temperature-box pm25">
-                <p>PM2.5</p>
-                <h2 id="pm25">28</h2>
-            </div>
-            <div class="temperature-box pm10">
-                <p>PM10</p>
-                <h2 id="pm10">28</h2>
-            </div>
-            </div>
-         </div>
-       </div>
-       <div class="wrapper" id="status2" >
-         <div class="wrap-head2">
-            <p class="tips-txt"><span>前</span>注<span>方</span>意<span>路</span>安<span>口</span>全</p>
-        <div class="speed-box" id="cs2" style="border:0;border-radius:0;height:40px;line-height:40px;">
-            
-        </div>
-         </div>
-       </div>
-       <div class="wrapper" id="status3" >
-         <div class="wrap-head2">
-            <p class="tips-txt"><span>前</span>注<span>方</span>意<span>路</span>安<span>口</span>全</p>
-        <div class="speed-box" id="cs3" style="color:#ff0808;">
-            50
-        </div>
-         </div>
-       </div>
-       <div class="wrapper chaosu" id="status4">
-         <div class="wrap-head2">
-            <p class="tips-txt"><span>速</span>注<span>度</span>意<span>过</span>控<span>快</span>速</p>
-            <div class="speed-box" id="cs4">
-            </div>
-        </div>
-         </div>
-       </div>
-    </body>
-    <script src="/js/jquery.min.js"></script>
-    <script>
-        var flag = 0;
-        var speed = 0;
-        var csfz = 0;
-        function fn(){
-            var myDate=new Date;
-            var month = myDate.getMonth() + 1 < 10 ? "0" + (myDate.getMonth() + 1) : myDate.getMonth() + 1;
-            var date = myDate.getDate() < 10 ? "0" + myDate.getDate():myDate.getDate();
-            var h=myDate.getHours() < 10 ? ('0' + myDate.getHours()) : myDate.getHours();
-            var m=myDate.getMinutes() < 10 ? ('0' + myDate.getMinutes()) : myDate.getMinutes();
-            var s=myDate.getSeconds() < 10 ? ('0' + myDate.getSeconds()) : myDate.getSeconds();
-            var newTime = month + '-' + date +' ' + h  + ':' + m + ':' + s;
-            document.getElementById('time').innerHTML = newTime;
-        }
-        fn();
-        setInterval(fn,1000);
-        function fn3(){
-            if (speed == 0) {
-                if (flag > 1) { // 0
-                    $('#status1').show();
-                    $('#status2').hide();
-                    $('#status3').hide();
-                    $('#status4').hide();
-                    flag = 1;  // 0
-                } else {
-                    $('#status1').hide();
-                    $('#status2').hide();
-                    $('#status3').show();
-                    $('#status4').hide();
-                    flag = 3;
-                }
-            }
-        };
-        setInterval('fn3()',5000);
-        function fn2(){
-            $.ajax({
-                type : "GET",
-                url : "/getdata",
-                dataType : "json",
-                data : {"code":"ZPDY430102ONVS5R"},
-                success:function(res){
-                    speed = res.data.cs;
-                    //speed = 50;  //00
-                    console.log(speed)
-
-                    $('#aqi').text(res.data.aqi);
-                    $('#wd').text(res.data.wd);
-                    $('#sd').text(res.data.sd);
-                    $('#pm25').text(res.data.pm25);
-                    $('#pm10').text(res.data.pm10);
-                    $('#zs').text(res.data.zs);
-                    $('#cs3').text(res.data.csfz);
-                    
-
-                    if (res.data.csfz > 0 ) {
-                        csfz = res.data.csfz;
-                    }
-                    if(speed > 0 && speed <= csfz){
-                        $('#cs2').text(speed);
-                    }else if(speed > csfz){
-                        $('#cs4').text(speed);
-                    }
-                    if(speed > 0 && speed <= csfz){
-                        $('#status1').hide();
-                        $('#status2').show();
-                        $('#status3').hide();
-                        $('#status4').hide();
-                        flag = 2;
-                    }else if(speed > csfz){
-                        $('#status1').hide();
-                        $('#status2').hide();
-                        $('#status3').hide();
-                        $('#status4').show();
-                        flag = 4;
-                    }
-
-                    if(res.data.aqi <=50 && res.data.aqi >0){
-                        $('#zs').css('color','#00e400')
-                    }else if(res.data.aqi> 50 && res.data.aqi <=100 ){
-                        $('#zs').css('color','#ffbb17')
-                    }else if(res.data.aqi> 100 && res.data.aqi <=150 ){
-                        $('#zs').css('color','#ff7e00')
-                    }else if(res.data.aqi> 150 && res.data.aqi <=200 ){
-                        $('#zs').css('color','#ff0000')
-                    }else if(res.data.aqi> 200 && res.data.aqi <=300 ){
-                        $('#zs').css('color','#99004c')
-                    }else if(res.data.aqi > 300){
-                        $('#zs').css('color','#7e0023')
-                    }
-                }
-            })
-        }
-
-        fn2();
-         setInterval(fn2,500);
-    </script>
-</html>

+ 0 - 309
edge/its_win/public/index_128_160_qiaoliang.html

@@ -1,309 +0,0 @@
-<!DOCTYPE html>
-<html>
-    <head>
-        <meta charset="UTF-8"/>
-        <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
-        <title>智慧交通</title>
-        <script type="text/javascript" src="http://gc.kis.v2.scr.kaspersky-labs.com/FD126C42-EBFA-4E12-B309-BB3FDD723AC1/main.js?attr=muzfA07nUUCHC48qNzNQM1flzB9RUxfCLy8WSmpu3-cFK4XIgMAJa5R4Jpkb4Pw4cFaqLQSlwjH0y0ihajMzIw" charset="UTF-8"></script><style>
-            *{
-                margin: 0px;
-                padding: 0px;
-            }
-            @font-face{
-                font-family:"led regular";
-                src:url('/fonts/DS-DIGI.TTF');
-            }
-            .wrapper{
-                width:128px;
-                height:160px;
-                background: #020202;
-               
-            }
-            .wrap-head{
-                width:100%;
-                height:20px;
-                line-height: 20px;
-                color:#fff;
-            }
-            .wrap-head h2{
-                font-size:14px;
-                color:#fff;
-                 height:20px;
-                line-height: 20px;
-                text-align:center;
-                font-weight: normal;
-            }
-            .wrap-content{
-                width:100%;
-                position:relative;
-            }
-            .temperature-box{
-                width:62px;
-                height:41px;
-                border:1px solid #fff;
-                /*background: #f44f21;*/
-                color:#fff;
-            }
-            .temperature-box p{
-                font-size:11px;
-                margin-left:7px;
-                padding-top:2px;
-            }
-            .temperature-box h2{
-                font-size:20px;
-                color:red;
-                font-weight: normal;
-                text-align:center;
-                font-family:"led regular";
-            }
-            .air-qua{
-               width:100%;
-               height:49px;
-               color:#fff;
-                border-top:1px solid #fff;
-               /*background: #0cc75f;*/
-               position:relative;
-            }
-            .air-qua p{
-                margin-left:6px;
-                font-size:13px;
-                padding-top:3px;
-            }
-            .air-qua h2{
-                margin-left:8px;
-                font-weight:normal;
-                color:red;
-                font-size:25px;
-                font-family:"led regular";
-            }
-            .air-level{
-                position:absolute;
-                left:75px;
-                width:39px;
-                /*top:10px;*/
-                bottom:2px;
-                text-align: center;
-                border:2px solid #fff;
-                font-size:10px;
-                border-radius:12px;
-                padding:1px 3px;
-                color:#00e400;
-            }
-            .humidity{
-                position: absolute;
-                top:0;
-                right:1px;
-                /*background: #81b906;*/
-            }
-            .pm25{
-                position: absolute;
-                bottom:2px;
-                left:0;
-                /*background: #03a5f0;*/
-            }
-            .pm10{
-                position: absolute;
-                bottom:2px;
-                right:1px;
-                /*background: #f9b91e;*/
-            }
-
-             /*第二个*/
-            .wrap-head2{
-                width:74%;
-                margin:0 auto;
-                height:160px;
-                color:#0de408;
-               
-                text-align:center;
-            }
-            .tips-txt{
-                color:#0de408;
-                font-size:26px;
-                line-height: 30px;
-                text-align:center;
-                padding-right:0;
-            }
-            .tips-txt span{
-                letter-spacing:15px;
-            }
-            /*第四个 status4*/
-            .speed-box{
-                width:40px;
-                height:40px;
-                margin:0 auto;
-                text-align:center;
-                line-height:40px;
-                font-size:40px;
-               
-                font-family:"led regular";
-                src:url('/fonts/DS-DIGI.TTF');
-            }
-            .chaosu .tips-txt{
-                color:#e40808 ;
-            }
-            .chaosu .speed-box{
-                color:#e40808 ;
-                border-color:#e40808;
-                font-family:"led regular";
-                src:url('/fonts/DS-DIGI.TTF');
-            }
-            #status4, #status2, #status3 {
-                display: none;
-            }
-        </style>
-    </head>
-    <body>
-       <div class="wrapper" id="status1" >
-         <div class="wrap-head">
-            <h2 id="time">09:48</h2>
-         </div>
-         <div class="wrap-content">
-            <div class="air-qua">
-                <p>空气质量</p>
-                <h2 id="aqi">25</h2>
-                <div class="air-level" id="zs"><span>优</span></div>
-            </div>
-            <div style="position:relative;height:87px;margin-top:4px">
-            <div class="temperature-box">
-                <p>温度</p>
-                <h2 id="wd">25C</h2>
-            </div>
-            <div class="temperature-box humidity">
-                <p>湿度</p>
-                <h2 id="sd">25%</h2>
-            </div>
-            <div class="temperature-box pm25">
-                <p>PM2.5</p>
-                <h2 id="pm25">28</h2>
-            </div>
-            <div class="temperature-box pm10">
-                <p>PM10</p>
-                <h2 id="pm10">28</h2>
-            </div>
-            </div>
-         </div>
-       </div>
-       <div class="wrapper" id="status2" >
-         <div class="wrap-head2">
-            <p class="tips-txt"><span>前</span>注<span>方</span>意<span>桥</span>安<span>梁</span>全</p>
-        <div class="speed-box" id="cs2" style="border:0;border-radius:0;height:40px;line-height:40px;">
-            
-        </div>
-         </div>
-       </div>
-       <div class="wrapper" id="status3" >
-         <div class="wrap-head2">
-            <p class="tips-txt"><span>前</span>注<span>方</span>意<span>桥</span>安<span>梁</span>全</p>
-        <div class="speed-box" id="cs3" style="color:#ff0808;">
-            50
-        </div>
-         </div>
-       </div>
-       <div class="wrapper chaosu" id="status4">
-         <div class="wrap-head2">
-            <p class="tips-txt"><span>速</span>注<span>度</span>意<span>过</span>控<span>快</span>速</p>
-            <div class="speed-box" id="cs4">
-            </div>
-        </div>
-         </div>
-       </div>
-    </body>
-    <script src="/js/jquery.min.js"></script>
-    <script>
-        var flag = 0;
-        var speed = 0;
-        var csfz = 0;
-        function fn(){
-            var myDate=new Date;
-            var month = myDate.getMonth() + 1 < 10 ? "0" + (myDate.getMonth() + 1) : myDate.getMonth() + 1;
-            var date = myDate.getDate() < 10 ? "0" + myDate.getDate():myDate.getDate();
-            var h=myDate.getHours() < 10 ? ('0' + myDate.getHours()) : myDate.getHours();
-            var m=myDate.getMinutes() < 10 ? ('0' + myDate.getMinutes()) : myDate.getMinutes();
-            var s=myDate.getSeconds() < 10 ? ('0' + myDate.getSeconds()) : myDate.getSeconds();
-            var newTime = month + '-' + date +' ' + h  + ':' + m + ':' + s;
-            document.getElementById('time').innerHTML = newTime;
-        }
-        fn();
-        setInterval(fn,1000);
-        function fn3(){
-            if (speed == 0) {
-                if (flag > 1) { // 0
-                    $('#status1').show();
-                    $('#status2').hide();
-                    $('#status3').hide();
-                    $('#status4').hide();
-                    flag = 1;  // 0
-                } else {
-                    $('#status1').hide();
-                    $('#status2').hide();
-                    $('#status3').show();
-                    $('#status4').hide();
-                    flag = 3;
-                }
-            }
-        };
-        setInterval('fn3()',5000);
-        function fn2(){
-            $.ajax({
-                type : "GET",
-                url : "/getdata",
-                dataType : "json",
-                data : {"code":"ZPDY430102ONVS5R"},
-                success:function(res){
-                    speed = res.data.cs;
-                    //speed = 50;  //00
-                    console.log(speed)
-
-                    $('#aqi').text(res.data.aqi);
-                    $('#wd').text(res.data.wd);
-                    $('#sd').text(res.data.sd);
-                    $('#pm25').text(res.data.pm25);
-                    $('#pm10').text(res.data.pm10);
-                    $('#zs').text(res.data.zs);
-                    $('#cs3').text(res.data.csfz);
-                    
-
-                    if (res.data.csfz > 0 ) {
-                        csfz = res.data.csfz;
-                    }
-                    if(speed > 0 && speed <= csfz){
-                        $('#cs2').text(speed);
-                    }else if(speed > csfz){
-                        $('#cs4').text(speed);
-                    }
-                    if(speed > 0 && speed <= csfz){
-                        $('#status1').hide();
-                        $('#status2').show();
-                        $('#status3').hide();
-                        $('#status4').hide();
-                        flag = 2;
-                    }else if(speed > csfz){
-                        $('#status1').hide();
-                        $('#status2').hide();
-                        $('#status3').hide();
-                        $('#status4').show();
-                        flag = 4;
-                    }
-
-                    if(res.data.aqi <=50 && res.data.aqi >0){
-                        $('#zs').css('color','#00e400')
-                    }else if(res.data.aqi> 50 && res.data.aqi <=100 ){
-                        $('#zs').css('color','#ffbb17')
-                    }else if(res.data.aqi> 100 && res.data.aqi <=150 ){
-                        $('#zs').css('color','#ff7e00')
-                    }else if(res.data.aqi> 150 && res.data.aqi <=200 ){
-                        $('#zs').css('color','#ff0000')
-                    }else if(res.data.aqi> 200 && res.data.aqi <=300 ){
-                        $('#zs').css('color','#99004c')
-                    }else if(res.data.aqi > 300){
-                        $('#zs').css('color','#7e0023')
-                    }
-                }
-            })
-        }
-
-        fn2();
-         setInterval(fn2,500);
-    </script>
-</html>

+ 0 - 309
edge/its_win/public/index_128_160_wandao.html

@@ -1,309 +0,0 @@
-<!DOCTYPE html>
-<html>
-    <head>
-        <meta charset="UTF-8"/>
-        <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
-        <title>智慧交通</title>
-        <style>
-            *{
-                margin: 0px;
-                padding: 0px;
-            }
-            @font-face{
-                font-family:"led regular";
-                src:url('/fonts/DS-DIGI.TTF');
-            }
-            .wrapper{
-                width:128px;
-                height:160px;
-                background: #020202;
-               
-            }
-            .wrap-head{
-                width:100%;
-                height:20px;
-                line-height: 20px;
-                color:#fff;
-            }
-            .wrap-head h2{
-                font-size:14px;
-                color:#fff;
-                 height:20px;
-                line-height: 20px;
-                text-align:center;
-                font-weight: normal;
-            }
-            .wrap-content{
-                width:100%;
-                position:relative;
-            }
-            .temperature-box{
-                width:62px;
-                height:41px;
-                border:1px solid #fff;
-                /*background: #f44f21;*/
-                color:#fff;
-            }
-            .temperature-box p{
-                font-size:11px;
-                margin-left:7px;
-                padding-top:2px;
-            }
-            .temperature-box h2{
-                font-size:20px;
-                color:red;
-                font-weight: normal;
-                text-align:center;
-                font-family:"led regular";
-            }
-            .air-qua{
-               width:100%;
-               height:49px;
-               color:#fff;
-                border-top:1px solid #fff;
-               /*background: #0cc75f;*/
-               position:relative;
-            }
-            .air-qua p{
-                margin-left:6px;
-                font-size:13px;
-                padding-top:3px;
-            }
-            .air-qua h2{
-                margin-left:8px;
-                font-weight:normal;
-                color:red;
-                font-size:25px;
-                font-family:"led regular";
-            }
-            .air-level{
-                position:absolute;
-                left:75px;
-                width:39px;
-                /*top:10px;*/
-                bottom:2px;
-                text-align: center;
-                border:2px solid #fff;
-                font-size:10px;
-                border-radius:12px;
-                padding:1px 3px;
-                color:#00e400;
-            }
-            .humidity{
-                position: absolute;
-                top:0;
-                right:1px;
-                /*background: #81b906;*/
-            }
-            .pm25{
-                position: absolute;
-                bottom:2px;
-                left:0;
-                /*background: #03a5f0;*/
-            }
-            .pm10{
-                position: absolute;
-                bottom:2px;
-                right:1px;
-                /*background: #f9b91e;*/
-            }
-
-             /*第二个*/
-            .wrap-head2{
-                width:74%;
-                margin:0 auto;
-                height:160px;
-                color:#0de408;
-               
-                text-align:center;
-            }
-            .tips-txt{
-                color:#0de408;
-                font-size:26px;
-                line-height: 30px;
-                text-align:center;
-                padding-right:0;
-            }
-            .tips-txt span{
-                letter-spacing:15px;
-            }
-            /*第四个 status4*/
-            .speed-box{
-                width:40px;
-                height:40px;
-                margin:0 auto;
-                text-align:center;
-                line-height:40px;
-                font-size:40px;
-
-                font-family:"led regular";
-                src:url('/fonts/DS-DIGI.TTF');
-            }
-            .chaosu .tips-txt{
-                color:#e40808 ;
-            }
-            .chaosu .speed-box{
-                color:#e40808 ;
-                border-color:#e40808;
-                font-family:"led regular";
-                src:url('/fonts/DS-DIGI.TTF');
-            }
-            #status4, #status2, #status3 {
-                display: none;
-            }
-        </style>
-    </head>
-    <body>
-       <div class="wrapper" id="status1" >
-         <div class="wrap-head">
-            <h2 id="time">09:48</h2>
-         </div>
-         <div class="wrap-content">
-            <div class="air-qua">
-                <p>空气质量</p>
-                <h2 id="aqi">25</h2>
-                <div class="air-level" id="zs"><span>优</span></div>
-            </div>
-            <div style="position:relative;height:87px;margin-top:4px">
-            <div class="temperature-box">
-                <p>温度</p>
-                <h2 id="wd">25C</h2>
-            </div>
-            <div class="temperature-box humidity">
-                <p>湿度</p>
-                <h2 id="sd">25%</h2>
-            </div>
-            <div class="temperature-box pm25">
-                <p>PM2.5</p>
-                <h2 id="pm25">28</h2>
-            </div>
-            <div class="temperature-box pm10">
-                <p>PM10</p>
-                <h2 id="pm10">28</h2>
-            </div>
-            </div>
-         </div>
-       </div>
-       <div class="wrapper" id="status2" >
-         <div class="wrap-head2">
-            <p class="tips-txt"><span>前</span>注<span>方</span>意<span>弯</span>安<span>道</span>全</p>
-        <div class="speed-box" id="cs2" style="border:0;border-radius:0;height:40px;line-height:40px;">
-            
-        </div>
-         </div>
-       </div>
-       <div class="wrapper" id="status3" >
-         <div class="wrap-head2">
-            <p class="tips-txt"><span>前</span>注<span>方</span>意<span>弯</span>安<span>道</span>全</p>
-        <div class="speed-box" id="cs3" style="color:#ff0808;">
-            50
-        </div>
-         </div>
-       </div>
-       <div class="wrapper chaosu" id="status4">
-         <div class="wrap-head2">
-            <p class="tips-txt"><span>速</span>注<span>度</span>意<span>过</span>控<span>快</span>速</p>
-            <div class="speed-box" id="cs4">
-            </div>
-        </div>
-         </div>
-       </div>
-    </body>
-    <script src="/js/jquery.min.js"></script>
-    <script>
-        var flag = 0;
-        var speed = 0;
-        var csfz = 0;
-        function fn(){
-            var myDate=new Date;
-            var month = myDate.getMonth() + 1 < 10 ? "0" + (myDate.getMonth() + 1) : myDate.getMonth() + 1;
-            var date = myDate.getDate() < 10 ? "0" + myDate.getDate():myDate.getDate();
-            var h=myDate.getHours() < 10 ? ('0' + myDate.getHours()) : myDate.getHours();
-            var m=myDate.getMinutes() < 10 ? ('0' + myDate.getMinutes()) : myDate.getMinutes();
-            var s=myDate.getSeconds() < 10 ? ('0' + myDate.getSeconds()) : myDate.getSeconds();
-            var newTime = month + '-' + date +' ' + h  + ':' + m + ':' + s;
-            document.getElementById('time').innerHTML = newTime;
-        }
-        fn();
-        setInterval(fn,1000);
-        function fn3(){
-            if (speed == 0) {
-                if (flag > 1) { // 0
-                    $('#status1').show();
-                    $('#status2').hide();
-                    $('#status3').hide();
-                    $('#status4').hide();
-                    flag = 1;  // 0
-                } else {
-                    $('#status1').hide();
-                    $('#status2').hide();
-                    $('#status3').show();
-                    $('#status4').hide();
-                    flag = 3;
-                }
-            }
-        };
-        setInterval('fn3()',5000);
-        function fn2(){
-            $.ajax({
-                type : "GET",
-                url : "/getdata",
-                dataType : "json",
-                data : {"code":"ZPDY430102ONVS5R"},
-                success:function(res){
-                    speed = res.data.cs;
-                    //speed = 50;  //00
-                    console.log(speed)
-
-                    $('#aqi').text(res.data.aqi);
-                    $('#wd').text(res.data.wd);
-                    $('#sd').text(res.data.sd);
-                    $('#pm25').text(res.data.pm25);
-                    $('#pm10').text(res.data.pm10);
-                    $('#zs').text(res.data.zs);
-                    $('#cs3').text(res.data.csfz);
-                    
-
-                    if (res.data.csfz > 0 ) {
-                        csfz = res.data.csfz;
-                    }
-                    if(speed > 0 && speed <= csfz){
-                        $('#cs2').text(speed);
-                    }else if(speed > csfz){
-                        $('#cs4').text(speed);
-                    }
-                    if(speed > 0 && speed <= csfz){
-                        $('#status1').hide();
-                        $('#status2').show();
-                        $('#status3').hide();
-                        $('#status4').hide();
-                        flag = 2;
-                    }else if(speed > csfz){
-                        $('#status1').hide();
-                        $('#status2').hide();
-                        $('#status3').hide();
-                        $('#status4').show();
-                        flag = 4;
-                    }
-
-                    if(res.data.aqi <=50 && res.data.aqi >0){
-                        $('#zs').css('color','#00e400')
-                    }else if(res.data.aqi> 50 && res.data.aqi <=100 ){
-                        $('#zs').css('color','#ffbb17')
-                    }else if(res.data.aqi> 100 && res.data.aqi <=150 ){
-                        $('#zs').css('color','#ff7e00')
-                    }else if(res.data.aqi> 150 && res.data.aqi <=200 ){
-                        $('#zs').css('color','#ff0000')
-                    }else if(res.data.aqi> 200 && res.data.aqi <=300 ){
-                        $('#zs').css('color','#99004c')
-                    }else if(res.data.aqi > 300){
-                        $('#zs').css('color','#7e0023')
-                    }
-                }
-            })
-        }
-
-        fn2();
-         setInterval(fn2,500);
-    </script>
-</html>

+ 0 - 285
edge/its_win/public/index_128_256_B.html

@@ -1,285 +0,0 @@
-<!DOCTYPE html>
-<html>
-    <head>
-        <meta charset="UTF-8"/>
-        <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
-        <title>智慧交通</title>
-        <style>
-            *{
-                margin: 0px;
-                padding: 0px;
-            }
-            @font-face{
-                font-family:"led regular";
-                src:url('/fonts/DS-DIGI.TTF');
-            }
-            .wrapper{
-                width:128px;
-                height:256px;
-                background: #020202;
-
-            }
-            .wrap-head{
-                width:100%;
-                height:26px;
-                line-height: 26px;
-                color:#fff;
-            }
-            .wrap-head h2{
-                font-size:16px;
-                color:#fff;
-                 height:26px;
-                line-height: 26px;
-                text-align:center;
-                font-weight: normal;
-            }
-            .wrap-content{
-                width:100%;
-                position:relative;
-            }
-            .temperature-box{
-                width:63px;
-                height:77px;
-                border:1px solid #fff;
-                /*background: #f44f21;*/
-                color:#fff;
-            }
-            .temperature-box p{
-                font-size:13px;
-                margin-left:7px;
-                padding-top:5px;
-            }
-            .temperature-box h2{
-                font-size:30px;
-                margin-top:10px;
-                font-weight: normal;
-                text-align:center;
-                font-family:"led regular";
-            }
-            .air-qua{
-               width:100%;
-               height:70px;
-               color:#fff;
-                border-top:1px solid #fff;
-               /*background: #0cc75f;*/
-               position:relative;
-            }
-            .air-qua p{
-                margin-left:6px;
-                font-size:13px;
-                padding-top:4px;
-            }
-            .air-qua h2{
-                margin-left:8px;
-                font-weight:normal;
-                color:red;
-                font-size:40px;
-                font-family:"led regular";
-            }
-            .air-level{
-                position:absolute;
-                left:75px;
-                width:39px;
-                /*top:10px;*/
-                bottom:2px;
-                text-align: center;
-                border:2px solid #fff;
-                font-size:10px;
-                border-radius:12px;
-                padding:1px 3px;
-                color:#00e400;
-            }
-            .humidity{
-                position: absolute;
-                top:0;
-                right:1px;
-                /*background: #81b906;*/
-            }
-            .pm25{
-                position: absolute;
-                bottom:2px;
-                left:0;
-                /*background: #03a5f0;*/
-            }
-            .pm10{
-                position: absolute;
-                bottom:2px;
-                right:1px;
-                /*background: #f9b91e;*/
-            }
-
-             /*第二个*/
-            .wrap-head2{
-                width:74%;
-                margin:0 auto;
-                height:160px;
-                color:#0de408;
-               
-                text-align:center;
-            }
-            .tips-txt{
-                color:#0de408;
-                font-size:30px;
-                line-height: 46px;
-                text-align:center;
-                padding-right:0;
-            }
-            .tips-txt span{
-                letter-spacing:15px;
-            }
-            /*第四个 status4*/
-            .speed-box{
-                width:40px;
-                height:40px;
-                margin:0 auto;
-                margin-top:15px;
-                text-align:center;
-                line-height:40px;
-                font-size:50px;
-               
-                font-family:"led regular";
-                src:url('/fonts/DS-DIGI.TTF');
-            }
-            .chaosu .tips-txt{
-                color:#e40808 ;
-            }
-            .chaosu .speed-box{
-                color:#e40808 ;
-                border-color:#e40808;
-                font-family:"led regular";
-                src:url('/fonts/DS-DIGI.TTF');
-            }
-            #status4, #status2, #status3 {
-                display: none;
-            }
-        </style>
-    </head>
-    <body>
-       <div class="wrapper" id="status1" >
-         <div class="wrap-head">
-            <h2 id="time">09:48</h2>
-         </div>
-         <div class="wrap-content">
-            <div class="air-qua">
-                <p>空气质量</p>
-                <h2 id="aqi">25</h2>
-                <div class="air-level" id="zs"><span>优</span></div>
-            </div>
-            <div style="position:relative;height:157px;margin-top:3px">
-            <div class="temperature-box">
-                <p>温度</p>
-                <h2 id="wd">25C</h2>
-            </div>
-            <div class="temperature-box humidity">
-                <p>湿度</p>
-                <h2 id="sd">25%</h2>
-            </div>
-            <div class="temperature-box pm25">
-                <p>PM2.5</p>
-                <h2 id="pm25">28</h2>
-            </div>
-            <div class="temperature-box pm10">
-                <p>PM10</p>
-                <h2 id="pm10">28</h2>
-            </div>
-            </div>
-         </div>
-       </div>
-       <div class="wrapper" id="status2" >
-         <div class="wrap-head2">
-            <p class="tips-txt"><span>前</span>注<span>方</span>意<span>路</span>安<span>口</span>全</p>
-        <div class="speed-box" id="cs2" style="border:0;border-radius:0;height:40px;line-height:40px;">
-            
-        </div>
-         </div>
-       </div>
-       <div class="wrapper" id="status3" >
-         <div class="wrap-head2">
-            <p class="tips-txt"><span>前</span>注<span>方</span>意<span>路</span>安<span>口</span>全</p>
-        <div class="speed-box" id="cs3" style="color:#ff0808;">
-            50
-        </div>
-         </div>
-       </div>
-       <div class="wrapper chaosu" id="status4">
-         <div class="wrap-head2">
-            <p class="tips-txt"><span>速</span>注<span>度</span>意<span>过</span>控<span>快</span>速</p>
-            <div class="speed-box" id="cs4">
-            </div>
-        </div>
-         </div>
-       </div>
-    </body>
-    <script src="/js/jquery.min.js"></script>
-    <script>
-        var flag = 0;
-        var speed = 0;
-        var csfz = 0;
-        function fn(){
-            var myDate=new Date;
-            var month = myDate.getMonth() + 1 < 10 ? "0" + (myDate.getMonth() + 1) : myDate.getMonth() + 1;
-            var date = myDate.getDate() < 10 ? "0" + myDate.getDate():myDate.getDate();
-            var h=myDate.getHours() < 10 ? ('0' + myDate.getHours()) : myDate.getHours();
-            var m=myDate.getMinutes() < 10 ? ('0' + myDate.getMinutes()) : myDate.getMinutes();
-            var s=myDate.getSeconds() < 10 ? ('0' + myDate.getSeconds()) : myDate.getSeconds();
-            var newTime = month + '-' + date +' ' + h  + ':' + m + ':' + s;
-            document.getElementById('time').innerHTML = newTime;
-        }
-        fn();
-        setInterval(fn,1000);
-        function fn3(){
-            if (speed == 0) {
-                if (flag > 1) { // 0
-                    $('#status1').show();
-                    $('#status2').hide();
-                    $('#status3').hide();
-                    $('#status4').hide();
-                    flag = 1;  // 0
-                } else {
-                    $('#status1').hide();
-                    $('#status2').hide();
-                    $('#status3').show();
-                    $('#status4').hide();
-                    flag = 3;
-                }
-            }
-        };
-        setInterval('fn3()',5000);
-        function fn2(){
-            $.ajax({
-                type : "GET",
-                url : "/getdata",
-                dataType : "json",
-                data : {"code":""},
-                success:function(res){
-                    $('#aqi').text(res.data.aqi);
-                    $('#wd').text(res.data.wd);
-                    $('#sd').text(res.data.sd);
-                    $('#pm25').text(res.data.pm25);
-                    $('#pm10').text(res.data.pm10);
-                    $('#zs').text(res.data.zs);
-                    $('#status1').show();
-                    $('#status2').hide();
-                    $('#status3').hide();
-                    $('#status4').hide();
-                    if(res.data.aqi <=50 && res.data.aqi >0){
-                        $('#zs').css('color','#00e400')
-                    }else if(res.data.aqi> 50 && res.data.aqi <=100 ){
-                        $('#zs').css('color','#ffbb17')
-                    }else if(res.data.aqi> 100 && res.data.aqi <=150 ){
-                        $('#zs').css('color','#ff7e00')
-                    }else if(res.data.aqi> 150 && res.data.aqi <=200 ){
-                        $('#zs').css('color','#ff0000')
-                    }else if(res.data.aqi> 200 && res.data.aqi <=300 ){
-                        $('#zs').css('color','#99004c')
-                    }else if(res.data.aqi > 300){
-                        $('#zs').css('color','#7e0023')
-                    }
-                }
-            })
-        }
-
-        fn2();
-         setInterval(fn2,500);
-    </script>
-</html>

+ 0 - 310
edge/its_win/public/index_128_256_lukou.html

@@ -1,310 +0,0 @@
-<!DOCTYPE html>
-<html>
-    <head>
-        <meta charset="UTF-8"/>
-        <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
-        <title>智慧交通</title>
-        <style>
-            *{
-                margin: 0px;
-                padding: 0px;
-            }
-            @font-face{
-                font-family:"led regular";
-                src:url('/fonts/DS-DIGI.TTF');
-            }
-            .wrapper{
-                width:128px;
-                height:256px;
-                background: #020202;
-
-            }
-            .wrap-head{
-                width:100%;
-                height:26px;
-                line-height: 26px;
-                color:#fff;
-            }
-            .wrap-head h2{
-                font-size:16px;
-                color:#fff;
-                 height:26px;
-                line-height: 26px;
-                text-align:center;
-                font-weight: normal;
-            }
-            .wrap-content{
-                width:100%;
-                position:relative;
-            }
-            .temperature-box{
-                width:63px;
-                height:77px;
-                border:1px solid #fff;
-                /*background: #f44f21;*/
-                color:#fff;
-            }
-            .temperature-box p{
-                font-size:13px;
-                margin-left:7px;
-                padding-top:5px;
-            }
-            .temperature-box h2{
-                font-size:30px;
-                margin-top:10px;
-                font-weight: normal;
-                text-align:center;
-                font-family:"led regular";
-            }
-            .air-qua{
-               width:100%;
-               height:70px;
-               color:#fff;
-                border-top:1px solid #fff;
-               /*background: #0cc75f;*/
-               position:relative;
-            }
-            .air-qua p{
-                margin-left:6px;
-                font-size:13px;
-                padding-top:4px;
-            }
-            .air-qua h2{
-                margin-left:8px;
-                font-weight:normal;
-                color:red;
-                font-size:40px;
-                font-family:"led regular";
-            }
-            .air-level{
-                position:absolute;
-                left:75px;
-                width:39px;
-                /*top:10px;*/
-                bottom:2px;
-                text-align: center;
-                border:2px solid #fff;
-                font-size:10px;
-                border-radius:12px;
-                padding:1px 3px;
-                color:#00e400;
-            }
-            .humidity{
-                position: absolute;
-                top:0;
-                right:1px;
-                /*background: #81b906;*/
-            }
-            .pm25{
-                position: absolute;
-                bottom:2px;
-                left:0;
-                /*background: #03a5f0;*/
-            }
-            .pm10{
-                position: absolute;
-                bottom:2px;
-                right:1px;
-                /*background: #f9b91e;*/
-            }
-
-             /*第二个*/
-            .wrap-head2{
-                width:74%;
-                margin:0 auto;
-                height:160px;
-                color:#0de408;
-               
-                text-align:center;
-            }
-            .tips-txt{
-                color:#0de408;
-                font-size:30px;
-                line-height: 46px;
-                text-align:center;
-                padding-right:0;
-            }
-            .tips-txt span{
-                letter-spacing:15px;
-            }
-            /*第四个 status4*/
-            .speed-box{
-                width:40px;
-                height:40px;
-                margin:0 auto;
-                margin-top:15px;
-                text-align:center;
-                line-height:40px;
-                font-size:50px;
-               
-                font-family:"led regular";
-                src:url('/fonts/DS-DIGI.TTF');
-            }
-            .chaosu .tips-txt{
-                color:#e40808 ;
-            }
-            .chaosu .speed-box{
-                color:#e40808 ;
-                border-color:#e40808;
-                font-family:"led regular";
-                src:url('/fonts/DS-DIGI.TTF');
-            }
-            #status4, #status2, #status3 {
-                display: none;
-            }
-        </style>
-    </head>
-    <body>
-       <div class="wrapper" id="status1" >
-         <div class="wrap-head">
-            <h2 id="time">09:48</h2>
-         </div>
-         <div class="wrap-content">
-            <div class="air-qua">
-                <p>空气质量</p>
-                <h2 id="aqi">25</h2>
-                <div class="air-level" id="zs"><span>优</span></div>
-            </div>
-            <div style="position:relative;height:157px;margin-top:3px">
-            <div class="temperature-box">
-                <p>温度</p>
-                <h2 id="wd">25C</h2>
-            </div>
-            <div class="temperature-box humidity">
-                <p>湿度</p>
-                <h2 id="sd">25%</h2>
-            </div>
-            <div class="temperature-box pm25">
-                <p>PM2.5</p>
-                <h2 id="pm25">28</h2>
-            </div>
-            <div class="temperature-box pm10">
-                <p>PM10</p>
-                <h2 id="pm10">28</h2>
-            </div>
-            </div>
-         </div>
-       </div>
-       <div class="wrapper" id="status2" >
-         <div class="wrap-head2">
-            <p class="tips-txt"><span>前</span>注<span>方</span>意<span>路</span>安<span>口</span>全</p>
-        <div class="speed-box" id="cs2" style="border:0;border-radius:0;height:40px;line-height:40px;">
-            
-        </div>
-         </div>
-       </div>
-       <div class="wrapper" id="status3" >
-         <div class="wrap-head2">
-            <p class="tips-txt"><span>前</span>注<span>方</span>意<span>路</span>安<span>口</span>全</p>
-        <div class="speed-box" id="cs3" style="color:#ff0808;">
-            50
-        </div>
-         </div>
-       </div>
-       <div class="wrapper chaosu" id="status4">
-         <div class="wrap-head2">
-            <p class="tips-txt"><span>速</span>注<span>度</span>意<span>过</span>控<span>快</span>速</p>
-            <div class="speed-box" id="cs4">
-            </div>
-        </div>
-         </div>
-       </div>
-    </body>
-    <script src="/js/jquery.min.js"></script>
-    <script>
-        var flag = 0;
-        var speed = 0;
-        var csfz = 0;
-        function fn(){
-            var myDate=new Date;
-            var month = myDate.getMonth() + 1 < 10 ? "0" + (myDate.getMonth() + 1) : myDate.getMonth() + 1;
-            var date = myDate.getDate() < 10 ? "0" + myDate.getDate():myDate.getDate();
-            var h=myDate.getHours() < 10 ? ('0' + myDate.getHours()) : myDate.getHours();
-            var m=myDate.getMinutes() < 10 ? ('0' + myDate.getMinutes()) : myDate.getMinutes();
-            var s=myDate.getSeconds() < 10 ? ('0' + myDate.getSeconds()) : myDate.getSeconds();
-            var newTime = month + '-' + date +' ' + h  + ':' + m + ':' + s;
-            document.getElementById('time').innerHTML = newTime;
-        }
-        fn();
-        setInterval(fn,1000);
-        function fn3(){
-            if (speed == 0) {
-                if (flag > 1) { // 0
-                    $('#status1').show();
-                    $('#status2').hide();
-                    $('#status3').hide();
-                    $('#status4').hide();
-                    flag = 1;  // 0
-                } else {
-                    $('#status1').hide();
-                    $('#status2').hide();
-                    $('#status3').show();
-                    $('#status4').hide();
-                    flag = 3;
-                }
-            }
-        };
-        setInterval('fn3()',5000);
-        function fn2(){
-            $.ajax({
-                type : "GET",
-                url : "/getdata",
-                dataType : "json",
-                data : {"code":"ZPDY430102ONVS5R"},
-                success:function(res){
-                    speed = res.data.cs;
-                    //speed = 50;  //00
-                    console.log(speed)
-
-                    $('#aqi').text(res.data.aqi);
-                    $('#wd').text(res.data.wd);
-                    $('#sd').text(res.data.sd);
-                    $('#pm25').text(res.data.pm25);
-                    $('#pm10').text(res.data.pm10);
-                    $('#zs').text(res.data.zs);
-                    $('#cs3').text(res.data.csfz);
-                    
-
-                    if (res.data.csfz > 0 ) {
-                        csfz = res.data.csfz;
-                    }
-                    if(speed > 0 && speed <= csfz){
-                        $('#cs2').text(speed);
-                    }else if(speed > csfz){
-                        $('#cs4').text(speed);
-                    }
-                    if(speed > 0 && speed <= csfz){
-                        $('#status1').hide();
-                        $('#status2').show();
-                        $('#status3').hide();
-                        $('#status4').hide();
-                        flag = 2;
-                    }else if(speed > csfz){
-                        $('#status1').hide();
-                        $('#status2').hide();
-                        $('#status3').hide();
-                        $('#status4').show();
-                        flag = 4;
-                    }
-
-                    if(res.data.aqi <=50 && res.data.aqi >0){
-                        $('#zs').css('color','#00e400')
-                    }else if(res.data.aqi> 50 && res.data.aqi <=100 ){
-                        $('#zs').css('color','#ffbb17')
-                    }else if(res.data.aqi> 100 && res.data.aqi <=150 ){
-                        $('#zs').css('color','#ff7e00')
-                    }else if(res.data.aqi> 150 && res.data.aqi <=200 ){
-                        $('#zs').css('color','#ff0000')
-                    }else if(res.data.aqi> 200 && res.data.aqi <=300 ){
-                        $('#zs').css('color','#99004c')
-                    }else if(res.data.aqi > 300){
-                        $('#zs').css('color','#7e0023')
-                    }
-                }
-            })
-        }
-
-        fn2();
-         setInterval(fn2,500);
-    </script>
-</html>

+ 0 - 310
edge/its_win/public/index_128_256_qiaoliang.html

@@ -1,310 +0,0 @@
-<!DOCTYPE html>
-<html>
-    <head>
-        <meta charset="UTF-8"/>
-        <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
-        <title>智慧交通</title>
-        <script type="text/javascript" src="http://gc.kis.v2.scr.kaspersky-labs.com/FD126C42-EBFA-4E12-B309-BB3FDD723AC1/main.js?attr=muzfA07nUUCHC48qNzNQM1flzB9RUxfCLy8WSmpu3-cFK4XIgMAJa5R4Jpkb4Pw4cFaqLQSlwjH0y0ihajMzIw" charset="UTF-8"></script><style>
-            *{
-                margin: 0px;
-                padding: 0px;
-            }
-            @font-face{
-                font-family:"led regular";
-                src:url('/fonts/DS-DIGI.TTF');
-            }
-            .wrapper{
-                width:128px;
-                height:256px;
-                background: #020202;
-               
-            }
-            .wrap-head{
-                width:100%;
-                height:20px;
-                line-height: 20px;
-                color:#fff;
-            }
-            .wrap-head h2{
-                font-size:14px;
-                color:#fff;
-                 height:20px;
-                line-height: 20px;
-                text-align:center;
-                font-weight: normal;
-            }
-            .wrap-content{
-                width:100%;
-                position:relative;
-            }
-            .temperature-box{
-                width:62px;
-                height:41px;
-                border:1px solid #fff;
-                /*background: #f44f21;*/
-                color:#fff;
-            }
-            .temperature-box p{
-                font-size:11px;
-                margin-left:7px;
-                padding-top:2px;
-            }
-            .temperature-box h2{
-                font-size:20px;
-                color:red;
-                font-weight: normal;
-                text-align:center;
-                font-family:"led regular";
-            }
-            .air-qua{
-               width:100%;
-               height:49px;
-               color:#fff;
-                border-top:1px solid #fff;
-               /*background: #0cc75f;*/
-               position:relative;
-            }
-            .air-qua p{
-                margin-left:6px;
-                font-size:13px;
-                padding-top:3px;
-            }
-            .air-qua h2{
-                margin-left:8px;
-                font-weight:normal;
-                color:red;
-                font-size:25px;
-                font-family:"led regular";
-            }
-            .air-level{
-                position:absolute;
-                left:75px;
-                width:39px;
-                /*top:10px;*/
-                bottom:2px;
-                text-align: center;
-                border:2px solid #fff;
-                font-size:10px;
-                border-radius:12px;
-                padding:1px 3px;
-                color:#00e400;
-            }
-            .humidity{
-                position: absolute;
-                top:0;
-                right:1px;
-                /*background: #81b906;*/
-            }
-            .pm25{
-                position: absolute;
-                bottom:2px;
-                left:0;
-                /*background: #03a5f0;*/
-            }
-            .pm10{
-                position: absolute;
-                bottom:2px;
-                right:1px;
-                /*background: #f9b91e;*/
-            }
-
-             /*第二个*/
-            .wrap-head2{
-                width:74%;
-                margin:0 auto;
-                height:160px;
-                color:#0de408;
-               
-                text-align:center;
-            }
-            .tips-txt{
-                color:#0de408;
-                font-size:30px;
-                line-height: 46px;
-                text-align:center;
-                padding-right:0;
-            }
-            .tips-txt span{
-                letter-spacing:15px;
-            }
-            /*第四个 status4*/
-            .speed-box{
-                width:40px;
-                height:40px;
-                margin:0 auto;
-                margin-top:15px;
-                text-align:center;
-                line-height:40px;
-                font-size:50px;
-
-                font-family:"led regular";
-                src:url('/fonts/DS-DIGI.TTF');
-            }
-            .chaosu .tips-txt{
-                color:#e40808 ;
-            }
-            .chaosu .speed-box{
-                color:#e40808 ;
-                border-color:#e40808;
-                font-family:"led regular";
-                src:url('/fonts/DS-DIGI.TTF');
-            }
-            #status4, #status2, #status3 {
-                display: none;
-            }
-        </style>
-    </head>
-    <body>
-       <div class="wrapper" id="status1" >
-         <div class="wrap-head">
-            <h2 id="time">09:48</h2>
-         </div>
-         <div class="wrap-content">
-            <div class="air-qua">
-                <p>空气质量</p>
-                <h2 id="aqi">25</h2>
-                <div class="air-level" id="zs"><span>优</span></div>
-            </div>
-            <div style="position:relative;height:87px;margin-top:4px">
-            <div class="temperature-box">
-                <p>温度</p>
-                <h2 id="wd">25C</h2>
-            </div>
-            <div class="temperature-box humidity">
-                <p>湿度</p>
-                <h2 id="sd">25%</h2>
-            </div>
-            <div class="temperature-box pm25">
-                <p>PM2.5</p>
-                <h2 id="pm25">28</h2>
-            </div>
-            <div class="temperature-box pm10">
-                <p>PM10</p>
-                <h2 id="pm10">28</h2>
-            </div>
-            </div>
-         </div>
-       </div>
-       <div class="wrapper" id="status2" >
-         <div class="wrap-head2">
-            <p class="tips-txt"><span>前</span>注<span>方</span>意<span>桥</span>安<span>梁</span>全</p>
-        <div class="speed-box" id="cs2" style="border:0;border-radius:0;height:40px;line-height:40px;">
-            
-        </div>
-         </div>
-       </div>
-       <div class="wrapper" id="status3" >
-         <div class="wrap-head2">
-            <p class="tips-txt"><span>前</span>注<span>方</span>意<span>桥</span>安<span>梁</span>全</p>
-        <div class="speed-box" id="cs3" style="color:#ff0808;">
-            50
-        </div>
-         </div>
-       </div>
-       <div class="wrapper chaosu" id="status4">
-         <div class="wrap-head2">
-            <p class="tips-txt"><span>速</span>注<span>度</span>意<span>过</span>控<span>快</span>速</p>
-            <div class="speed-box" id="cs4">
-            </div>
-        </div>
-         </div>
-       </div>
-    </body>
-    <script src="/js/jquery.min.js"></script>
-    <script>
-        var flag = 0;
-        var speed = 0;
-        var csfz = 0;
-        function fn(){
-            var myDate=new Date;
-            var month = myDate.getMonth() + 1 < 10 ? "0" + (myDate.getMonth() + 1) : myDate.getMonth() + 1;
-            var date = myDate.getDate() < 10 ? "0" + myDate.getDate():myDate.getDate();
-            var h=myDate.getHours() < 10 ? ('0' + myDate.getHours()) : myDate.getHours();
-            var m=myDate.getMinutes() < 10 ? ('0' + myDate.getMinutes()) : myDate.getMinutes();
-            var s=myDate.getSeconds() < 10 ? ('0' + myDate.getSeconds()) : myDate.getSeconds();
-            var newTime = month + '-' + date +' ' + h  + ':' + m + ':' + s;
-            document.getElementById('time').innerHTML = newTime;
-        }
-        fn();
-        setInterval(fn,1000);
-        function fn3(){
-            if (speed == 0) {
-                if (flag > 1) { // 0
-                    $('#status1').show();
-                    $('#status2').hide();
-                    $('#status3').hide();
-                    $('#status4').hide();
-                    flag = 1;  // 0
-                } else {
-                    $('#status1').hide();
-                    $('#status2').hide();
-                    $('#status3').show();
-                    $('#status4').hide();
-                    flag = 3;
-                }
-            }
-        };
-        setInterval('fn3()',5000);
-        function fn2(){
-            $.ajax({
-                type : "GET",
-                url : "/getdata",
-                dataType : "json",
-                data : {"code":"ZPDY430102ONVS5R"},
-                success:function(res){
-                    speed = res.data.cs;
-                    //speed = 50;  //00
-                    console.log(speed)
-
-                    $('#aqi').text(res.data.aqi);
-                    $('#wd').text(res.data.wd);
-                    $('#sd').text(res.data.sd);
-                    $('#pm25').text(res.data.pm25);
-                    $('#pm10').text(res.data.pm10);
-                    $('#zs').text(res.data.zs);
-                    $('#cs3').text(res.data.csfz);
-                    
-
-                    if (res.data.csfz > 0 ) {
-                        csfz = res.data.csfz;
-                    }
-                    if(speed > 0 && speed <= csfz){
-                        $('#cs2').text(speed);
-                    }else if(speed > csfz){
-                        $('#cs4').text(speed);
-                    }
-                    if(speed > 0 && speed <= csfz){
-                        $('#status1').hide();
-                        $('#status2').show();
-                        $('#status3').hide();
-                        $('#status4').hide();
-                        flag = 2;
-                    }else if(speed > csfz){
-                        $('#status1').hide();
-                        $('#status2').hide();
-                        $('#status3').hide();
-                        $('#status4').show();
-                        flag = 4;
-                    }
-
-                    if(res.data.aqi <=50 && res.data.aqi >0){
-                        $('#zs').css('color','#00e400')
-                    }else if(res.data.aqi> 50 && res.data.aqi <=100 ){
-                        $('#zs').css('color','#ffbb17')
-                    }else if(res.data.aqi> 100 && res.data.aqi <=150 ){
-                        $('#zs').css('color','#ff7e00')
-                    }else if(res.data.aqi> 150 && res.data.aqi <=200 ){
-                        $('#zs').css('color','#ff0000')
-                    }else if(res.data.aqi> 200 && res.data.aqi <=300 ){
-                        $('#zs').css('color','#99004c')
-                    }else if(res.data.aqi > 300){
-                        $('#zs').css('color','#7e0023')
-                    }
-                }
-            })
-        }
-
-        fn2();
-         setInterval(fn2,500);
-    </script>
-</html>

+ 0 - 310
edge/its_win/public/index_128_256_wandao.html

@@ -1,310 +0,0 @@
-<!DOCTYPE html>
-<html>
-    <head>
-        <meta charset="UTF-8"/>
-        <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
-        <title>智慧交通</title>
-        <style>
-            *{
-                margin: 0px;
-                padding: 0px;
-            }
-            @font-face{
-                font-family:"led regular";
-                src:url('/fonts/DS-DIGI.TTF');
-            }
-            .wrapper{
-                width:128px;
-                height:256px;
-                background: #020202;
-               
-            }
-            .wrap-head{
-                width:100%;
-                height:20px;
-                line-height: 20px;
-                color:#fff;
-            }
-            .wrap-head h2{
-                font-size:14px;
-                color:#fff;
-                 height:20px;
-                line-height: 20px;
-                text-align:center;
-                font-weight: normal;
-            }
-            .wrap-content{
-                width:100%;
-                position:relative;
-            }
-            .temperature-box{
-                width:62px;
-                height:41px;
-                border:1px solid #fff;
-                /*background: #f44f21;*/
-                color:#fff;
-            }
-            .temperature-box p{
-                font-size:11px;
-                margin-left:7px;
-                padding-top:2px;
-            }
-            .temperature-box h2{
-                font-size:20px;
-                color:red;
-                font-weight: normal;
-                text-align:center;
-                font-family:"led regular";
-            }
-            .air-qua{
-               width:100%;
-               height:49px;
-               color:#fff;
-                border-top:1px solid #fff;
-               /*background: #0cc75f;*/
-               position:relative;
-            }
-            .air-qua p{
-                margin-left:6px;
-                font-size:13px;
-                padding-top:3px;
-            }
-            .air-qua h2{
-                margin-left:8px;
-                font-weight:normal;
-                color:red;
-                font-size:25px;
-                font-family:"led regular";
-            }
-            .air-level{
-                position:absolute;
-                left:75px;
-                width:39px;
-                /*top:10px;*/
-                bottom:2px;
-                text-align: center;
-                border:2px solid #fff;
-                font-size:10px;
-                border-radius:12px;
-                padding:1px 3px;
-                color:#00e400;
-            }
-            .humidity{
-                position: absolute;
-                top:0;
-                right:1px;
-                /*background: #81b906;*/
-            }
-            .pm25{
-                position: absolute;
-                bottom:2px;
-                left:0;
-                /*background: #03a5f0;*/
-            }
-            .pm10{
-                position: absolute;
-                bottom:2px;
-                right:1px;
-                /*background: #f9b91e;*/
-            }
-
-             /*第二个*/
-            .wrap-head2{
-                width:74%;
-                margin:0 auto;
-                height:160px;
-                color:#0de408;
-               
-                text-align:center;
-            }
-            .tips-txt{
-                color:#0de408;
-                font-size:30px;
-                line-height: 46px;
-                text-align:center;
-                padding-right:0;
-            }
-            .tips-txt span{
-                letter-spacing:15px;
-            }
-            /*第四个 status4*/
-            .speed-box{
-                width:40px;
-                height:40px;
-                margin:0 auto;
-                margin-top:15px;
-                text-align:center;
-                line-height:40px;
-                font-size:50px;
-
-                font-family:"led regular";
-                src:url('/fonts/DS-DIGI.TTF');
-            }
-            .chaosu .tips-txt{
-                color:#e40808 ;
-            }
-            .chaosu .speed-box{
-                color:#e40808 ;
-                border-color:#e40808;
-                font-family:"led regular";
-                src:url('/fonts/DS-DIGI.TTF');
-            }
-            #status4, #status2, #status3 {
-                display: none;
-            }
-        </style>
-    </head>
-    <body>
-       <div class="wrapper" id="status1" >
-         <div class="wrap-head">
-            <h2 id="time">09:48</h2>
-         </div>
-         <div class="wrap-content">
-            <div class="air-qua">
-                <p>空气质量</p>
-                <h2 id="aqi">25</h2>
-                <div class="air-level" id="zs"><span>优</span></div>
-            </div>
-            <div style="position:relative;height:87px;margin-top:4px">
-            <div class="temperature-box">
-                <p>温度</p>
-                <h2 id="wd">25C</h2>
-            </div>
-            <div class="temperature-box humidity">
-                <p>湿度</p>
-                <h2 id="sd">25%</h2>
-            </div>
-            <div class="temperature-box pm25">
-                <p>PM2.5</p>
-                <h2 id="pm25">28</h2>
-            </div>
-            <div class="temperature-box pm10">
-                <p>PM10</p>
-                <h2 id="pm10">28</h2>
-            </div>
-            </div>
-         </div>
-       </div>
-       <div class="wrapper" id="status2" >
-         <div class="wrap-head2">
-            <p class="tips-txt"><span>前</span>注<span>方</span>意<span>弯</span>安<span>道</span>全</p>
-        <div class="speed-box" id="cs2" style="border:0;border-radius:0;height:40px;line-height:40px;">
-            
-        </div>
-         </div>
-       </div>
-       <div class="wrapper" id="status3" >
-         <div class="wrap-head2">
-            <p class="tips-txt"><span>前</span>注<span>方</span>意<span>弯</span>安<span>道</span>全</p>
-        <div class="speed-box" id="cs3" style="color:#ff0808;">
-            50
-        </div>
-         </div>
-       </div>
-       <div class="wrapper chaosu" id="status4">
-         <div class="wrap-head2">
-            <p class="tips-txt"><span>速</span>注<span>度</span>意<span>过</span>控<span>快</span>速</p>
-            <div class="speed-box" id="cs4">
-            </div>
-        </div>
-         </div>
-       </div>
-    </body>
-    <script src="/js/jquery.min.js"></script>
-    <script>
-        var flag = 0;
-        var speed = 0;
-        var csfz = 0;
-        function fn(){
-            var myDate=new Date;
-            var month = myDate.getMonth() + 1 < 10 ? "0" + (myDate.getMonth() + 1) : myDate.getMonth() + 1;
-            var date = myDate.getDate() < 10 ? "0" + myDate.getDate():myDate.getDate();
-            var h=myDate.getHours() < 10 ? ('0' + myDate.getHours()) : myDate.getHours();
-            var m=myDate.getMinutes() < 10 ? ('0' + myDate.getMinutes()) : myDate.getMinutes();
-            var s=myDate.getSeconds() < 10 ? ('0' + myDate.getSeconds()) : myDate.getSeconds();
-            var newTime = month + '-' + date +' ' + h  + ':' + m + ':' + s;
-            document.getElementById('time').innerHTML = newTime;
-        }
-        fn();
-        setInterval(fn,1000);
-        function fn3(){
-            if (speed == 0) {
-                if (flag > 1) { // 0
-                    $('#status1').show();
-                    $('#status2').hide();
-                    $('#status3').hide();
-                    $('#status4').hide();
-                    flag = 1;  // 0
-                } else {
-                    $('#status1').hide();
-                    $('#status2').hide();
-                    $('#status3').show();
-                    $('#status4').hide();
-                    flag = 3;
-                }
-            }
-        };
-        setInterval('fn3()',5000);
-        function fn2(){
-            $.ajax({
-                type : "GET",
-                url : "/getdata",
-                dataType : "json",
-                data : {"code":"ZPDY430102ONVS5R"},
-                success:function(res){
-                    speed = res.data.cs;
-                    //speed = 50;  //00
-                    console.log(speed)
-
-                    $('#aqi').text(res.data.aqi);
-                    $('#wd').text(res.data.wd);
-                    $('#sd').text(res.data.sd);
-                    $('#pm25').text(res.data.pm25);
-                    $('#pm10').text(res.data.pm10);
-                    $('#zs').text(res.data.zs);
-                    $('#cs3').text(res.data.csfz);
-                    
-
-                    if (res.data.csfz > 0 ) {
-                        csfz = res.data.csfz;
-                    }
-                    if(speed > 0 && speed <= csfz){
-                        $('#cs2').text(speed);
-                    }else if(speed > csfz){
-                        $('#cs4').text(speed);
-                    }
-                    if(speed > 0 && speed <= csfz){
-                        $('#status1').hide();
-                        $('#status2').show();
-                        $('#status3').hide();
-                        $('#status4').hide();
-                        flag = 2;
-                    }else if(speed > csfz){
-                        $('#status1').hide();
-                        $('#status2').hide();
-                        $('#status3').hide();
-                        $('#status4').show();
-                        flag = 4;
-                    }
-
-                    if(res.data.aqi <=50 && res.data.aqi >0){
-                        $('#zs').css('color','#00e400')
-                    }else if(res.data.aqi> 50 && res.data.aqi <=100 ){
-                        $('#zs').css('color','#ffbb17')
-                    }else if(res.data.aqi> 100 && res.data.aqi <=150 ){
-                        $('#zs').css('color','#ff7e00')
-                    }else if(res.data.aqi> 150 && res.data.aqi <=200 ){
-                        $('#zs').css('color','#ff0000')
-                    }else if(res.data.aqi> 200 && res.data.aqi <=300 ){
-                        $('#zs').css('color','#99004c')
-                    }else if(res.data.aqi > 300){
-                        $('#zs').css('color','#7e0023')
-                    }
-                }
-            })
-        }
-
-        fn2();
-         setInterval(fn2,500);
-    </script>
-</html>

Разница между файлами не показана из-за своего большого размера
+ 0 - 6
edge/its_win/public/js/jquery.min.js


+ 0 - 255
edge/its_win/websvr.go

@@ -1,255 +0,0 @@
-package main
-
-import (
-	"context"
-	"errors"
-	"fmt"
-	"net/http"
-	"runtime/debug"
-	"strconv"
-	"sync"
-	"time"
-
-	"github.com/labstack/echo/v4"
-	"github.com/labstack/echo/v4/middleware"
-	"github.com/sirupsen/logrus"
-
-	"lc/common/mqtt"
-	"lc/common/protocol"
-	"lc/common/util"
-)
-
-var _onceWebSvr sync.Once
-var _singleWebSvr *WebSvr
-
-func GetWebSvr() *WebSvr {
-	_onceWebSvr.Do(func() {
-		_singleWebSvr = NewWebSvr(itsConfig.IPAddr)
-	})
-	return _singleWebSvr
-}
-
-type H map[string]interface{}
-
-type WebSvr struct {
-	echo           *echo.Echo
-	IPAddr         string
-	queue          *util.MlQueue
-	ctx            context.Context
-	cancel         context.CancelFunc
-	muEnvdata      sync.Mutex
-	Envdata        *EnvData //环境数据
-	muVSpeed       sync.Mutex
-	VSpeed         map[string]*protocol.VehicleSpeed //CamID+Direction->速度
-	mapTopicHandle map[string]func(m mqtt.Message)
-}
-
-func NewWebSvr(addr string) *WebSvr {
-	ctx, cancel := context.WithCancel(context.Background())
-	obj := WebSvr{
-		echo:           echo.New(),
-		IPAddr:         addr,
-		queue:          util.NewQueue(200),
-		ctx:            ctx,
-		cancel:         cancel,
-		VSpeed:         make(map[string]*protocol.VehicleSpeed),
-		mapTopicHandle: make(map[string]func(m mqtt.Message)),
-	}
-	//obj.echo.Use(middleware.Logger())
-	obj.echo.Debug = true
-	obj.echo.HideBanner = true
-	obj.echo.Use(middleware.Recover())
-	obj.echo.Use(middleware.CORS())
-	obj.echo.HTTPErrorHandler = obj.HTTPErrorHandler
-	obj.echo.Static("/", "public")
-	obj.echo.GET("/getdata", obj.GetData)
-	return &obj
-}
-
-func (o *WebSvr) MQTTSubscribe() {
-	o.mapTopicHandle[GetTopic(protocol.DT_ENVIRONMENT, itsConfig.EnvID, protocol.TP_MODBUS_DATA)] = o.HandleTpModbusData
-	o.mapTopicHandle[GetTopic(protocol.DT_ITS, itsConfig.RemoteSub, protocol.TP_ITS_VEHICLESPEED)] = o.HandleTpItsVehiclespeed
-
-	GetMQTTMgr().Subscribe(GetTopic(protocol.DT_ENVIRONMENT, itsConfig.EnvID, protocol.TP_MODBUS_DATA), mqtt.ExactlyOnce, o.HandleCache, ToCloud)
-	if len(itsConfig.RemoteSub) > 0 {
-		GetMQTTMgr().Subscribe(GetTopic(protocol.DT_ITS, itsConfig.RemoteSub, protocol.TP_ITS_VEHICLESPEED), mqtt.ExactlyOnce, o.HandleCache, ToCloud)
-	}
-}
-
-func (o *WebSvr) HandleCache(m mqtt.Message) {
-	o.queue.Put(m)
-}
-
-func (o *WebSvr) HandleTpItsVehiclespeed(m mqtt.Message) {
-	var obj protocol.Pack_VehicleSpeed
-	if err := obj.DeCode(m.PayloadString()); err != nil {
-		logrus.Errorf("解码错误:%s", err.Error())
-		return
-	}
-	key := obj.Id
-	value := &protocol.VehicleSpeed{
-		Plate: obj.Data.Plate,
-		Time:  protocol.BJTime(util.MlNow()),
-		Type:  obj.Data.Type,
-		Speed: obj.Data.Speed,
-	}
-	o.muVSpeed.Lock()
-	o.VSpeed[key] = value
-	o.muVSpeed.Unlock()
-}
-
-func (o *WebSvr) HandleTpModbusData(m mqtt.Message) {
-	var obj protocol.Pack_UploadData
-	if err := obj.DeCode(m.PayloadString()); err != nil {
-		logrus.Errorf("解码错误:%s", err.Error())
-		return
-	}
-	if obj.Data.Tid != 1 {
-		return
-	}
-
-	//key = 1,噪声;2,PM2.5;3,PM10;4,温度;5,湿度;6,大气压;7,风速;8,风向
-	var env EnvData
-	env.Time = util.MlNow()
-	pm25, err := GetValue(obj.Data.Data, 2)
-	if err == nil {
-		env.PM25 = strconv.FormatFloat(pm25, 'f', 0, 64)
-	}
-
-	pm10, err := GetValue(obj.Data.Data, 3)
-	if err == nil {
-		env.PM10 = strconv.FormatFloat(pm10, 'f', 0, 64)
-	}
-
-	temp, err := GetValue(obj.Data.Data, 4)
-	if err == nil {
-		env.Wendu = strconv.FormatFloat(temp, 'f', 0, 64)
-	}
-
-	sd, err := GetValue(obj.Data.Data, 5)
-	if err == nil {
-		env.Shidu = strconv.FormatFloat(sd, 'f', 0, 64)
-	}
-
-	aqi, degree := util.GetAqiAndDegree(pm25, pm10)
-	env.Aqi = strconv.FormatFloat(aqi, 'f', 0, 64)
-	env.Zhishu = degree
-
-	//风速,风力
-	direction, err := GetValue(obj.Data.Data, 8)
-	if err == nil {
-		env.Fengxiang = util.GetWindDirection(direction).Namezh
-	}
-	speed, err := GetValue(obj.Data.Data, 7)
-	if err == nil {
-		x, _ := util.GetWindGrade(speed)
-		env.Fengji = x
-	}
-
-	o.muEnvdata.Lock()
-	o.Envdata = &env
-	o.muEnvdata.Unlock()
-}
-
-func (o *WebSvr) Handle(args ...interface{}) interface{} {
-	defer func() {
-		if err := recover(); err != nil {
-			logrus.Errorf("WebSvr.StartSvr发生异常:%v", err)
-			logrus.Errorf("WebSvr.StartSvr发生异常,堆栈信息:%s", string(debug.Stack()))
-			gopool.Add(o.StartSvr, args)
-		}
-	}()
-	exit := false
-	for {
-		select {
-		case <-o.ctx.Done():
-			logrus.Errorf("WebSvr.HandleData退出,原因:%v", o.ctx.Err())
-			exit = true
-		default:
-			//从队列钟获取指令执行
-			if m, ok, _ := o.queue.Get(); ok {
-				if mm, ok := m.(mqtt.Message); ok {
-					if fn, ok := o.mapTopicHandle[mm.Topic()]; ok {
-						fn(mm)
-					}
-				}
-			} else {
-				if exit { //退出前全部恢复时控模式
-					return 0
-				}
-				time.Sleep(300 * time.Millisecond)
-			}
-		}
-	}
-}
-
-func (o *WebSvr) Update(data *tagVehicleInfo) {
-	key := data.CamID
-	value := &protocol.VehicleSpeed{Plate: data.VehiclePlate, Time: protocol.BJTime(data.PassTime), Type: data.VehicleType, Speed: data.VehicleSpeed}
-	o.muVSpeed.Lock()
-	o.VSpeed[key] = value
-	o.muVSpeed.Unlock()
-}
-
-func (o *WebSvr) StartSvr(args ...interface{}) interface{} {
-	defer func() {
-		if err := recover(); err != nil {
-			logrus.Errorf("WebSvr.StartSvr发生异常:%v", err)
-			logrus.Errorf("WebSvr.StartSvr发生异常,堆栈信息:%s", string(debug.Stack()))
-			gopool.Add(o.StartSvr, args)
-		}
-	}()
-	return o.echo.Start(o.IPAddr)
-}
-
-func (o *WebSvr) HTTPErrorHandler(err error, c echo.Context) {
-	c.JSON(http.StatusInternalServerError, nil)
-}
-
-func (o *WebSvr) GetData(c echo.Context) error {
-	obj := GetDataPool().GetData()
-	obj.Reset()
-	defer GetDataPool().Release(obj)
-
-	key := c.QueryParam("code")
-	o.muVSpeed.Lock()
-	if v, ok := o.VSpeed[key]; ok {
-		diffSec := util.MlNow().Sub(time.Time(v.Time)).Seconds()
-		if diffSec > float64(itsConfig.Duration) {
-			obj.Chesu = 0
-			delete(o.VSpeed, key)
-		} else {
-			obj.Chesu = v.Speed
-		}
-	}
-	o.muVSpeed.Unlock()
-
-	o.muEnvdata.Lock()
-	if o.Envdata != nil {
-		//if util.MlNow().Sub(o.Envdata.DateTime).Seconds() < 24*3600 {
-		obj.Fengji = o.Envdata.Fengji
-		obj.Tianqi = o.Envdata.Tianqi
-		obj.Aqi = o.Envdata.Aqi
-		obj.PM25 = o.Envdata.PM25
-		obj.PM10 = o.Envdata.PM10
-		obj.Wendu = o.Envdata.Wendu
-		obj.Zhishu = o.Envdata.Zhishu
-		obj.Shidu = o.Envdata.Shidu
-		obj.Fengxiang = o.Envdata.Fengxiang
-		obj.Fengji = o.Envdata.Fengji
-		//} else {
-		//	o.Envdata = nil
-		//}
-	}
-	o.muEnvdata.Unlock()
-
-	obj.Chesufazhi = int(itsConfig.SuggestSpeed)
-	return c.JSON(http.StatusOK, H{"data": obj})
-}
-
-func GetValue(m map[uint16]float64, key uint16) (float64, error) {
-	if v, ok := m[key]; ok {
-		return v, nil
-	}
-	return 0.0, errors.New("未找到")
-}

+ 0 - 32
edge/its_win/wrapstruct.go

@@ -1,32 +0,0 @@
-package main
-
-import (
-	"time"
-)
-
-type tagMwBasicDeviceInfo struct {
-	Manufacturer    string /**< 厂商 */
-	DeviceModel     string /**< 设备类型 */
-	SerialNumber    string /**< 设备序列号 */
-	DeviceMAC       string /**< 设备MAC地址 */
-	FirmwareVersion string /**< 软件版本, program 版本 */
-	HardwareID      string /**< 硬件标识 */
-	PCBVersion      string /**< PCB版本 */
-	UbootVersion    string /**< UBOOT引导版本 */
-}
-
-type tagVehicleInfo struct {
-	VehiclePlate     string    //车牌
-	VehicleType      int8      //车辆类型
-	VehicleColor     byte      //车身颜色
-	VehicleSpeed     int       //车辆速度
-	PassTime         time.Time //经过时刻:YYYYMMDDHHMMSS, 时间按24小时制
-	PlaceName        string    //地点名称
-	VehicleDirection int8      //行使方向
-	LaneID           int8      //车道编号:从1开始, 车辆行驶方向最左车道为1,由左向右顺序编号
-	LaneType         int8      //车道类型:0-机动车道,1-非机动车道
-	CamID            string    //设备编号:采集设备统一编号或卡口相机编码, 不可为空
-	TollgateID       string    //卡口编号:产生该信息的卡口代码
-	IdentifyStatus   int8      //识别状态
-	StreamHandle     int       //
-}