Пример #1
0
        private void FillData()
        {
            lock (lockObj)
            {
                generators.Clear();
                energyConsumers.Clear();

                foreach (ResourceDescription rd in internalGenerators)
                {
                    Generator g = ResourcesDescriptionConverter.ConvertTo <Generator>(rd);
                    generators.Add(g.GlobalId, g);
                }

                foreach (ResourceDescription rd in internalEnergyConsumers)
                {
                    EnergyConsumer ec = ResourcesDescriptionConverter.ConvertTo <EnergyConsumer>(rd);
                    energyConsumers.Add(ec.GlobalId, ec);
                }
            }
        }
Пример #2
0
        public UpdateResult Prepare(ref Delta delta)
        {
            try
            {
                transactionCallback = OperationContext.Current.GetCallbackChannel <ITransactionCallback>();
                updateResult        = new UpdateResult();

                generatorAnalogsCopy.Clear();
                energyConsumerAnalogsCopy.Clear();
                generatorDscretesCopy.Clear();
                energyConsumerDiscretesCopy.Clear();

                // napravi kopiju od originala
                foreach (AnalogLocation alocation in generatorAnalogs)
                {
                    generatorAnalogsCopy.Add(alocation.Clone() as AnalogLocation);
                }

                foreach (AnalogLocation alocation in energyConsumerAnalogs)
                {
                    energyConsumerAnalogsCopy.Add(alocation.Clone() as AnalogLocation);
                }
                foreach (DiscreteLocation dlocation in generatorDscretes)
                {
                    generatorDscretesCopy.Add(dlocation.Clone() as DiscreteLocation);
                }

                foreach (DiscreteLocation dlocation in energyConsumerDiscretes)
                {
                    energyConsumerDiscretesCopy.Add(dlocation.Clone() as DiscreteLocation);
                }

                Analog   analog   = null;
                Discrete discrete = null;
                foreach (ResourceDescription rd in delta.InsertOperations)
                {
                    if ((DMSType)ModelCodeHelper.ExtractTypeFromGlobalId(rd.Id) == (DMSType.ANALOG))
                    {
                        foreach (Property prop in rd.Properties)
                        {
                            analog = ResourcesDescriptionConverter.ConvertTo <Analog>(rd);

                            if ((DMSType)ModelCodeHelper.ExtractTypeFromGlobalId(analog.PowerSystemResource) == DMSType.ENERGY_CONSUMER)
                            {
                                energyConsumerAnalogsCopy.Add(new AnalogLocation()
                                {
                                    Analog        = analog,
                                    StartAddress  = Int32.Parse(analog.ScadaAddress.Split('_')[1]),
                                    Length        = 2,
                                    LengthInBytes = 4
                                });
                            }
                            else
                            {
                                generatorAnalogsCopy.Add(new AnalogLocation()
                                {
                                    Analog        = analog,
                                    StartAddress  = Int32.Parse(analog.ScadaAddress.Split('_')[1]), // float value 4 bytes
                                    Length        = 2,
                                    LengthInBytes = 4
                                });
                            }
                            break;
                        }
                    }
                    else if ((DMSType)ModelCodeHelper.ExtractTypeFromGlobalId(rd.Id) == (DMSType.DISCRETE))
                    {
                        foreach (Property prop in rd.Properties)
                        {
                            discrete = ResourcesDescriptionConverter.ConvertTo <Discrete>(rd);

                            if ((DMSType)ModelCodeHelper.ExtractTypeFromGlobalId(discrete.PowerSystemResource) == DMSType.ENERGY_CONSUMER)
                            {
                                energyConsumerDiscretesCopy.Add(new DiscreteLocation()
                                {
                                    Discrete      = discrete,
                                    StartAddress  = Int32.Parse(discrete.ScadaAddress.Split('_')[1]),
                                    Length        = 1,
                                    LengthInBytes = 2
                                });
                            }
                            else
                            {
                                generatorDscretesCopy.Add(new DiscreteLocation()
                                {
                                    Discrete      = discrete,
                                    StartAddress  = Int32.Parse(discrete.ScadaAddress.Split('_')[1]), // float value 4 bytes
                                    Length        = 1,
                                    LengthInBytes = 2
                                });
                            }
                            break;
                        }
                    }
                }

                foreach (ResourceDescription rd in delta.UpdateOperations)
                {
                    if ((DMSType)ModelCodeHelper.ExtractTypeFromGlobalId(rd.Id) == (DMSType.ANALOG))
                    {
                        foreach (Property prop in rd.Properties)
                        {
                            analog = ResourcesDescriptionConverter.ConvertTo <Analog>(rd);
                            if ((DMSType)ModelCodeHelper.ExtractTypeFromGlobalId(analog.PowerSystemResource) == DMSType.ENERGY_CONSUMER)
                            {
                                if (ContainsMrid(analog, energyConsumerAnalogsCopy))
                                {
                                    foreach (AnalogLocation al in energyConsumerAnalogsCopy)
                                    {
                                        if (al.Analog.Mrid.Equals(analog.Mrid))
                                        {
                                            if (analog.MaxValue != al.Analog.MaxValue && analog.MaxValue != 0)
                                            {
                                                al.Analog.MaxValue = analog.MaxValue;
                                            }
                                            else if (analog.MeasurmentType != al.Analog.MeasurmentType && analog.MeasurmentType.ToString() != "")
                                            {
                                                al.Analog.MeasurmentType = analog.MeasurmentType;
                                            }
                                            else if (analog.MinValue != al.Analog.MinValue && analog.MinValue != 0)
                                            {
                                                al.Analog.MinValue = analog.MinValue;
                                            }
                                            else if (analog.Name != al.Analog.Name && analog.Name.ToString() != "")
                                            {
                                                al.Analog.Name = analog.Name;
                                            }
                                            else if (analog.AliasName != al.Analog.AliasName && analog.AliasName.ToString() != "")
                                            {
                                                al.Analog.AliasName = analog.AliasName;
                                            }
                                            else if (analog.NormalValue != al.Analog.NormalValue && analog.NormalValue != 0)
                                            {
                                                al.Analog.NormalValue = analog.NormalValue;
                                            }
                                            else if (analog.PowerSystemResource != al.Analog.PowerSystemResource && analog.PowerSystemResource.ToString() != "")
                                            {
                                                al.Analog.PowerSystemResource = analog.PowerSystemResource;
                                            }
                                            else if (analog.Direction != al.Analog.Direction && analog.Direction.ToString() != "")
                                            {
                                                al.Analog.Direction = analog.Direction;
                                            }
                                            else if (analog.ScadaAddress != al.Analog.ScadaAddress && analog.ScadaAddress.ToString() != "")
                                            {
                                                al.Analog.ScadaAddress = analog.ScadaAddress;
                                            }
                                        }
                                    }
                                }
                            }
                            else if ((DMSType)ModelCodeHelper.ExtractTypeFromGlobalId(analog.PowerSystemResource) == DMSType.GENERATOR)
                            {
                                if (ContainsMrid(analog, generatorAnalogsCopy))
                                {
                                    foreach (AnalogLocation al in generatorAnalogsCopy)
                                    {
                                        if (al.Analog.Mrid.Equals(analog.Mrid))
                                        {
                                            if (analog.MaxValue != al.Analog.MaxValue && analog.MaxValue != 0)
                                            {
                                                al.Analog.MaxValue = analog.MaxValue;
                                            }
                                            else if (analog.MeasurmentType != al.Analog.MeasurmentType && analog.MeasurmentType.ToString() != "")
                                            {
                                                al.Analog.MeasurmentType = analog.MeasurmentType;
                                            }
                                            else if (analog.MinValue != al.Analog.MinValue && analog.MinValue != 0)
                                            {
                                                al.Analog.MinValue = analog.MinValue;
                                            }
                                            else if (analog.Name != al.Analog.Name && analog.Name.ToString() != "")
                                            {
                                                al.Analog.Name = analog.Name;
                                            }
                                            else if (analog.AliasName != al.Analog.AliasName && analog.AliasName.ToString() != "")
                                            {
                                                al.Analog.AliasName = analog.AliasName;
                                            }
                                            else if (analog.NormalValue != al.Analog.NormalValue && analog.NormalValue != 0)
                                            {
                                                al.Analog.NormalValue = analog.NormalValue;
                                            }
                                            else if (analog.PowerSystemResource != al.Analog.PowerSystemResource && analog.PowerSystemResource.ToString() != "")
                                            {
                                                al.Analog.PowerSystemResource = analog.PowerSystemResource;
                                            }
                                            else if (analog.Direction != al.Analog.Direction && analog.Direction.ToString() != "")
                                            {
                                                al.Analog.Direction = analog.Direction;
                                            }
                                            else if (analog.ScadaAddress != al.Analog.ScadaAddress && analog.ScadaAddress.ToString() != "")
                                            {
                                                al.Analog.ScadaAddress = analog.ScadaAddress;
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                    else if ((DMSType)ModelCodeHelper.ExtractTypeFromGlobalId(rd.Id) == (DMSType.DISCRETE))
                    {
                        foreach (Property prop in rd.Properties)
                        {
                            discrete = ResourcesDescriptionConverter.ConvertTo <Discrete>(rd);
                            if ((DMSType)ModelCodeHelper.ExtractTypeFromGlobalId(discrete.PowerSystemResource) == DMSType.ENERGY_CONSUMER)
                            {
                                if (ContainsMridDiscrete(discrete, energyConsumerDiscretesCopy))
                                {
                                    foreach (DiscreteLocation al in energyConsumerDiscretesCopy)
                                    {
                                        if (al.Discrete.Mrid.Equals(discrete.Mrid))
                                        {
                                            if (discrete.MaxValue != al.Discrete.MaxValue && discrete.MaxValue != 0)
                                            {
                                                al.Discrete.MaxValue = discrete.MaxValue;
                                            }
                                            else if (discrete.MeasurmentType != al.Discrete.MeasurmentType && discrete.MeasurmentType.ToString() != "")
                                            {
                                                al.Discrete.MeasurmentType = discrete.MeasurmentType;
                                            }
                                            else if (discrete.MinValue != al.Discrete.MinValue && discrete.MinValue != 0)
                                            {
                                                al.Discrete.MinValue = discrete.MinValue;
                                            }
                                            else if (discrete.Name != al.Discrete.Name && discrete.Name.ToString() != "")
                                            {
                                                al.Discrete.Name = discrete.Name;
                                            }
                                            else if (discrete.AliasName != al.Discrete.AliasName && discrete.AliasName.ToString() != "")
                                            {
                                                al.Discrete.AliasName = discrete.AliasName;
                                            }
                                            else if (discrete.NormalValue != al.Discrete.NormalValue && discrete.NormalValue != 0)
                                            {
                                                al.Discrete.NormalValue = discrete.NormalValue;
                                            }
                                            else if (discrete.PowerSystemResource != al.Discrete.PowerSystemResource && discrete.PowerSystemResource.ToString() != "")
                                            {
                                                al.Discrete.PowerSystemResource = discrete.PowerSystemResource;
                                            }
                                            else if (discrete.Direction != al.Discrete.Direction && discrete.Direction.ToString() != "")
                                            {
                                                al.Discrete.Direction = discrete.Direction;
                                            }
                                            else if (discrete.ScadaAddress != al.Discrete.ScadaAddress && discrete.ScadaAddress.ToString() != "")
                                            {
                                                al.Discrete.ScadaAddress = discrete.ScadaAddress;
                                            }
                                        }
                                    }
                                }
                            }
                            else if ((DMSType)ModelCodeHelper.ExtractTypeFromGlobalId(discrete.PowerSystemResource) == DMSType.GENERATOR)
                            {
                                if (ContainsMridDiscrete(discrete, generatorDscretesCopy))
                                {
                                    foreach (DiscreteLocation al in generatorDscretesCopy)
                                    {
                                        if (al.Discrete.Mrid.Equals(discrete.Mrid))
                                        {
                                            if (discrete.MaxValue != al.Discrete.MaxValue && discrete.MaxValue != 0)
                                            {
                                                al.Discrete.MaxValue = discrete.MaxValue;
                                            }
                                            else if (discrete.MeasurmentType != al.Discrete.MeasurmentType && discrete.MeasurmentType.ToString() != "")
                                            {
                                                al.Discrete.MeasurmentType = discrete.MeasurmentType;
                                            }
                                            else if (discrete.MinValue != al.Discrete.MinValue && discrete.MinValue != 0)
                                            {
                                                al.Discrete.MinValue = discrete.MinValue;
                                            }
                                            else if (discrete.Name != al.Discrete.Name && discrete.Name.ToString() != "")
                                            {
                                                al.Discrete.Name = discrete.Name;
                                            }
                                            else if (discrete.AliasName != al.Discrete.AliasName && discrete.AliasName.ToString() != "")
                                            {
                                                al.Discrete.AliasName = discrete.AliasName;
                                            }
                                            else if (discrete.NormalValue != al.Discrete.NormalValue && discrete.NormalValue != 0)
                                            {
                                                al.Discrete.NormalValue = discrete.NormalValue;
                                            }
                                            else if (discrete.PowerSystemResource != al.Discrete.PowerSystemResource && discrete.PowerSystemResource.ToString() != "")
                                            {
                                                al.Discrete.PowerSystemResource = discrete.PowerSystemResource;
                                            }
                                            else if (discrete.Direction != al.Discrete.Direction && discrete.Direction.ToString() != "")
                                            {
                                                al.Discrete.Direction = discrete.Direction;
                                            }
                                            else if (discrete.ScadaAddress != al.Discrete.ScadaAddress && discrete.ScadaAddress.ToString() != "")
                                            {
                                                al.Discrete.ScadaAddress = discrete.ScadaAddress;
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }

                updateResult.Message = "SCADA PR Transaction Prepare finished.";
                updateResult.Result  = ResultType.Succeeded;
                CommonTrace.WriteTrace(CommonTrace.TraceInfo, "SCADA PR Transaction Prepare finished successfully.");
                transactionCallback.Response("OK");
            }
            catch (Exception e)
            {
                updateResult.Message = "SCADA PR Transaction Prepare finished.";
                updateResult.Result  = ResultType.Failed;
                CommonTrace.WriteTrace(CommonTrace.TraceWarning, "SCADA PR Transaction Prepare failed. Message: {0}", e.Message);
                transactionCallback.Response("ERROR");
            }

            return(updateResult);
        }
Пример #3
0
        public bool InitiateIntegrityUpdate()
        {
            List <ModelCode> properties         = new List <ModelCode>(10); //analog has 10 properties
            List <ModelCode> propertiesDiscrete = new List <ModelCode>(10);
            ModelCode        modelCode          = ModelCode.ANALOG;
            ModelCode        modelCodeDiscrete  = ModelCode.DISCRETE;

            int resourcesLeft     = 0;
            int numberOfResources = 2;

            List <ResourceDescription> retList         = new List <ResourceDescription>(5);
            List <ResourceDescription> retListDiscrete = new List <ResourceDescription>(5);

            try
            {
                properties         = modelResourcesDesc.GetAllPropertyIds(modelCode);
                propertiesDiscrete = modelResourcesDesc.GetAllPropertyIds(modelCodeDiscrete);

                var iteratorId = NetworkModelGDAProxy.Instance.GetExtentValues(modelCode, properties);
                resourcesLeft = NetworkModelGDAProxy.Instance.IteratorResourcesLeft(iteratorId);

                while (resourcesLeft > 0)
                {
                    List <ResourceDescription> rds = NetworkModelGDAProxy.Instance.IteratorNext(numberOfResources, iteratorId);
                    retList.AddRange(rds);
                    resourcesLeft = NetworkModelGDAProxy.Instance.IteratorResourcesLeft(iteratorId);
                }
                NetworkModelGDAProxy.Instance.IteratorClose(iteratorId);

                var iteratorIdDiscrete = NetworkModelGDAProxy.Instance.GetExtentValues(modelCodeDiscrete, propertiesDiscrete);
                resourcesLeft = NetworkModelGDAProxy.Instance.IteratorResourcesLeft(iteratorIdDiscrete);

                while (resourcesLeft > 0)
                {
                    List <ResourceDescription> rds = NetworkModelGDAProxy.Instance.IteratorNext(numberOfResources, iteratorIdDiscrete);
                    retListDiscrete.AddRange(rds);
                    resourcesLeft = NetworkModelGDAProxy.Instance.IteratorResourcesLeft(iteratorIdDiscrete);
                }
                NetworkModelGDAProxy.Instance.IteratorClose(iteratorIdDiscrete);
            }
            catch (Exception e)
            {
                NetworkModelGDAProxy.Instance = null;
                Thread.Sleep(1000);
                InitiateIntegrityUpdate();

                return(false);
            }

            try
            {
                foreach (ResourceDescription rd in retList)
                {
                    Analog analog = ResourcesDescriptionConverter.ConvertTo <Analog>(rd);

                    if ((DMSType)ModelCodeHelper.ExtractTypeFromGlobalId(analog.PowerSystemResource) == DMSType.ENERGY_CONSUMER)
                    {
                        energyConsumerAnalogs.Add(new AnalogLocation()
                        {
                            Analog        = analog,
                            StartAddress  = Int32.Parse(analog.ScadaAddress.Split('_')[1]),
                            Length        = 2,
                            LengthInBytes = 4
                        });
                    }
                    else
                    {
                        generatorAnalogs.Add(new AnalogLocation()
                        {
                            Analog        = analog,
                            StartAddress  = Int32.Parse(analog.ScadaAddress.Split('_')[1]),
                            Length        = 2,
                            LengthInBytes = 4
                        });
                    }
                }

                foreach (ResourceDescription rd in retListDiscrete)
                {
                    Discrete discrete = ResourcesDescriptionConverter.ConvertTo <Discrete>(rd);

                    if ((DMSType)ModelCodeHelper.ExtractTypeFromGlobalId(discrete.PowerSystemResource) == DMSType.ENERGY_CONSUMER)
                    {
                        energyConsumerDiscretes.Add(new DiscreteLocation()
                        {
                            Discrete      = discrete,
                            StartAddress  = Int32.Parse(discrete.ScadaAddress.Split('_')[1]),
                            Length        = 1,
                            LengthInBytes = 2
                        });
                    }
                    else
                    {
                        generatorDscretes.Add(new DiscreteLocation()
                        {
                            Discrete      = discrete,
                            StartAddress  = Int32.Parse(discrete.ScadaAddress.Split('_')[1]),
                            Length        = 1,
                            LengthInBytes = 2
                        });
                    }
                }
            }
            catch (Exception e)
            {
                var message1 = string.Format("Conversion to Analog object failed.\n\t{0}", e.Message);
                Console.WriteLine(message1);
                CommonTrace.WriteTrace(CommonTrace.TraceError, message1);
                return(false);
            }

            var message = string.Format("Integrity update: Number of {0} values: {1}", modelCode.ToString(), retList.Count.ToString());

            CommonTrace.WriteTrace(CommonTrace.TraceInfo, message);
            Console.WriteLine("Integrity update: Number of {0} values: {1}", modelCode.ToString(), retList.Count.ToString());

            Console.WriteLine("EnergyConsumer:");
            foreach (AnalogLocation al in energyConsumerAnalogs)
            {
                Console.WriteLine(al.Analog.Mrid + " " + al.Analog.NormalValue);
                var dic = energyConsumerDiscretes.Find(x => x.Discrete.PowerSystemResource == al.Analog.PowerSystemResource);
                Console.WriteLine(dic.Discrete.Mrid + " " + dic.Discrete.NormalValue);
            }
            Console.WriteLine("Generator:");
            foreach (AnalogLocation al in generatorAnalogs)
            {
                Console.WriteLine(al.Analog.Mrid + " " + al.Analog.NormalValue);
                var dic = generatorDscretes.Find(x => x.Discrete.PowerSystemResource == al.Analog.PowerSystemResource);
                Console.WriteLine(dic.Discrete.Mrid + " " + dic.Discrete.NormalValue);
            }

            return(true);
        }
Пример #4
0
        /// <summary>
        /// Method implements integrity update logic for scada cr component
        /// </summary>
        /// <returns></returns>
        public bool InitiateIntegrityUpdate()
        {
            List <ModelCode> properties         = new List <ModelCode>(10);
            List <ModelCode> propertiesDiscrete = new List <ModelCode>(10);
            ModelCode        modelCode          = ModelCode.ANALOG;
            ModelCode        modelCodeDiscrete  = ModelCode.DISCRETE;
            int iteratorId        = 0;
            int resourcesLeft     = 0;
            int numberOfResources = 2;

            List <ResourceDescription> retList         = new List <ResourceDescription>(5);
            List <ResourceDescription> retListDiscrete = new List <ResourceDescription>(5);

            try
            {
                properties         = modelResourcesDesc.GetAllPropertyIds(modelCode);
                propertiesDiscrete = modelResourcesDesc.GetAllPropertyIds(modelCodeDiscrete);

                iteratorId    = NetworkModelGDAProxy.Instance.GetExtentValues(modelCode, properties);
                resourcesLeft = NetworkModelGDAProxy.Instance.IteratorResourcesLeft(iteratorId);

                while (resourcesLeft > 0)
                {
                    List <ResourceDescription> rds = NetworkModelGDAProxy.Instance.IteratorNext(numberOfResources, iteratorId);
                    retList.AddRange(rds);
                    resourcesLeft = NetworkModelGDAProxy.Instance.IteratorResourcesLeft(iteratorId);
                }
                NetworkModelGDAProxy.Instance.IteratorClose(iteratorId);


                var iteratorIdDiscrete = NetworkModelGDAProxy.Instance.GetExtentValues(modelCodeDiscrete, propertiesDiscrete);
                resourcesLeft = NetworkModelGDAProxy.Instance.IteratorResourcesLeft(iteratorIdDiscrete);

                while (resourcesLeft > 0)
                {
                    List <ResourceDescription> rds = NetworkModelGDAProxy.Instance.IteratorNext(numberOfResources, iteratorIdDiscrete);
                    retListDiscrete.AddRange(rds);
                    resourcesLeft = NetworkModelGDAProxy.Instance.IteratorResourcesLeft(iteratorIdDiscrete);
                }
                NetworkModelGDAProxy.Instance.IteratorClose(iteratorIdDiscrete);
            }
            catch (Exception e)
            {
                message = string.Format("Getting extent values method failed for {0}.\n\t{1}", modelCode, e.Message);
                Console.WriteLine(message);

                Console.WriteLine("Trying again...");
                CommonTrace.WriteTrace(CommonTrace.TraceError, "Trying again...");
                NetworkModelGDAProxy.Instance = null;
                Thread.Sleep(1000);
                InitiateIntegrityUpdate();
                return(false);
            }

            listOfAnalog.Clear();

            try
            {
                foreach (ResourceDescription rd in retList)
                {
                    Analog analog = ResourcesDescriptionConverter.ConvertTo <Analog>(rd);

                    if ((DMSType)ModelCodeHelper.ExtractTypeFromGlobalId(analog.PowerSystemResource) == DMSType.ENERGY_CONSUMER)
                    {
                        listOfAnalog.Add(new AnalogLocation()
                        {
                            Analog        = analog,
                            StartAddress  = Int32.Parse(analog.ScadaAddress.Split('_')[1]),
                            Length        = 2,
                            LengthInBytes = 4
                        });
                    }
                    else
                    {
                        listOfAnalog.Add(new AnalogLocation()
                        {
                            Analog        = analog,
                            StartAddress  = Int32.Parse(analog.ScadaAddress.Split('_')[1]),
                            Length        = 2,
                            LengthInBytes = 4
                        });
                    }
                }


                foreach (ResourceDescription rd in retListDiscrete)
                {
                    Discrete discrete = ResourcesDescriptionConverter.ConvertTo <Discrete>(rd);

                    if ((DMSType)ModelCodeHelper.ExtractTypeFromGlobalId(discrete.PowerSystemResource) == DMSType.ENERGY_CONSUMER)
                    {
                        listOfDiscretes.Add(new DiscreteLocation()
                        {
                            Discrete      = discrete,
                            StartAddress  = Int32.Parse(discrete.ScadaAddress.Split('_')[1]),
                            Length        = 1,
                            LengthInBytes = 2
                        });
                    }
                    else
                    {
                        listOfDiscretes.Add(new DiscreteLocation()
                        {
                            Discrete      = discrete,
                            StartAddress  = Int32.Parse(discrete.ScadaAddress.Split('_')[1]),
                            Length        = 1,
                            LengthInBytes = 2
                        });
                    }
                }
            }
            catch (Exception e)
            {
                message = string.Format("Conversion to Analog object failed.\n\t{0}", e.Message);
                Console.WriteLine(message);
                CommonTrace.WriteTrace(CommonTrace.TraceError, message);
                return(false);
            }

            message = string.Format("Integrity update: Number of {0} values: {1}", modelCode.ToString(), listOfAnalog.Count.ToString());
            CommonTrace.WriteTrace(CommonTrace.TraceInfo, message);
            Console.WriteLine("Integrity update: Number of {0} values: {1}", modelCode.ToString(), listOfAnalog.Count.ToString());
            return(true);
        }