Example #1
0
        //**** 环境检查工作者 *****

        // 系统环境检测者
        public static bool Check(EnvConfigInfo configInfo, out string errMsg)
        {
            errMsg = "";

            if (!configInfo.EnvIsOkay)
            {
                errMsg = configInfo.ErrMsg;
                return(false);
            }
            if (!configInfo.confDataBaseInfo.CheckDBConnect(out errMsg))
            {
                return(false);
            }
            return(true);
        }
Example #2
0
        public ServiceManager(EnvConfigInfo envConfigInfo)
        {
            this.envConfigInfo      = envConfigInfo;
            this.serverName         = this.envConfigInfo.confProjectInfo.ServerName;
            this.dispatchServerName = this.envConfigInfo.confProjectInfo.DispatchServerName;

            this.serverDescribe         = this.envConfigInfo.confProjectInfo.ServerDescribe;
            this.dispatchServerDescribe = this.envConfigInfo.confProjectInfo.DispatchServerDescribe;

            this.iotServerPath         = this.envConfigInfo.confFileInfo.IotServerPath;
            this.dispatchIotServerPath = this.envConfigInfo.confFileInfo.DispatchIotServerPath;

            if (this.envConfigInfo.EnvIsOkay &&
                ((this.envConfigInfo.confSonOPCPumpDataService.EnvIsOkay && this.envConfigInfo.confSonOPCPumpDataService.IsNeedRun) ||
                 (this.envConfigInfo.confSonOPCScadaDataService.EnvIsOkay && this.envConfigInfo.confSonOPCScadaDataService.IsNeedRun)))
            {
                this.IsNeedOPCServer = true;
            }
        }
Example #3
0
        private static IotCommandParam LoadConfigPath()
        {
            EnvConfigInfo envConfigInfo = EnvConfigInfo.SingleInstanceForIIS;

            if (envConfigInfo.EnvIsOkay)
            {
                return new IotCommandParam()
                       {
                           errMsg = envConfigInfo.ErrMsg
                       }
            }
            ;

            return(new IotCommandParam()
            {
                commandIP = envConfigInfo.confCommandServiceInfo.IP,
                port = envConfigInfo.confCommandServiceInfo.Port,
                timeoutSeconds = envConfigInfo.confCommandServiceInfo.timeoutSeconds
            });
        }