| | |
| | | |
| | | // 梯控设备 |
| | | type nvcs struct { |
| | | Model string `mapstructure:"model"` // 型号 |
| | | Port string `mapstructure:"port"` // 端口 |
| | | OSD string `mapstructure:"osd"` |
| | | RunState bool `mapstructure:"run-state"` |
| | | Model string `mapstructure:"model"` // 型号 |
| | | Port string `mapstructure:"port"` // 端口 |
| | | OSD string `mapstructure:"osd"` |
| | | RunState bool `mapstructure:"run-state"` |
| | | WaitRunTime int `mapstructure:"wait-run-time"` |
| | | } |
| | | |
| | | type rateLimitConfig struct { |
| | |
| | | ImageConf.Enlarge = 100 |
| | | } |
| | | |
| | | if NVCSConf.WaitRunTime == 0 { |
| | | NVCSConf.WaitRunTime = 60 |
| | | } |
| | | |
| | | logger.SetLogLevel(LogConf.Level) |
| | | } |
| | |
| | | floor = devPos.Pos |
| | | stopFloorId := devPos.Id |
| | | |
| | | for i := 0; i < 30; i++ { |
| | | for i := 0; i < config.NVCSConf.WaitRunTime; i++ { |
| | | if err := devPos.FindMovePosition(stopFloorId, floor); err == nil { |
| | | switch devPos.RunDir { |
| | | case service.RunUp: |
| | |
| | | continue |
| | | } |
| | | |
| | | // 记录电梯运行状态, 只记录上行和下行 |
| | | // 记录电梯运行状态 |
| | | iRunSate = data.Elevator[0].Status.RunDir |
| | | if config.NVCSConf.RunState { |
| | | if data.Elevator[0].Status.RunDir == RunUp { |
| | |
| | | |
| | | logger.Debug("Received A2 report data %+v", req) |
| | | |
| | | // 记录电梯运行状态, 只记录上行和下行 |
| | | // 记录电梯运行状态 |
| | | if strings.Contains(req.State.Status, "上") { |
| | | runState = "上" |
| | | iRunState = RunUp |
| | |
| | | // iRunState = RunDown |
| | | //} |
| | | |
| | | if !config.NVCSConf.RunState { |
| | | runState = "" |
| | | } |
| | | |
| | | if config.NVCSConf.OSD != "" { |
| | | floorText := fmt.Sprintf("%s%s %s", req.State.Floor, runState, config.NVCSConf.OSD) |
| | | |