Exemple #1
0
        private void InitializeMonitoringParameters()
        {
            Id2 currentId = null;

            try
            {
                currentId = channel.GetId(this.Id);
            }
            catch (Exception ex)
            {
                logger.LogException(LogLevel.Info, string.Format("MonitoringAIOServer.InitializeMonitoringParameters.{0}", this.Id), ex);
                return;
            }

            if (currentId == null)
            {
                return;
            }

#if DEBUG
            if (currentId.IP == "192.168.17.18")
            {
                this.IPAddress = "localhost/monitoring/17.18";
            }
            else if (currentId.IP == "192.168.17.19")
            {
                this.IPAddress = "localhost/monitoring/17.19";
            }
#endif

#if RELEASE
            this.IPAddress = currentId.IP;
#endif

            this.ILModuleNumber = currentId.ModuleNumber;
            this.PDInWord       = currentId.PDIN;
        }