コード例 #1
0
        /// <summary>
        /// Ctor for the ContosoPerformanceSetting.
        /// </summary>
        public ContosoPerformanceSetting(ContosoPerformanceSettingAggregator perfType, string key, ContosoPerformanceDescription performanceDescription)
        {
            PerfType = perfType;
            Minimum  = performanceDescription.Minimum;
            Target   = performanceDescription.Target;
            Maximum  = performanceDescription.Maximum;

            MinimumAlertActions = new List <ContosoAlertActionDefinition>();
            MinimumAlertActions.AddRange(ContosoAlertActionDefinition.Init(performanceDescription.MinimumAlertActions));
            MaximumAlertActions = new List <ContosoAlertActionDefinition>();
            MaximumAlertActions.AddRange(ContosoAlertActionDefinition.Init(performanceDescription.MaximumAlertActions));
        }
コード例 #2
0
        /// <summary>
        /// Ctor for a Contoso OPC UA node, using alert related descriptions.
        /// </summary>

        public ContosoOpcUaNode(
            string opcUaNodeId,
            string opcUaSymbolicName,
            List <ContosoPerformanceRelevance> opcUaNodeRelevance,
            ContosoOpcNodeDescription opcNodeDescription)
            : base(opcUaNodeId, opcUaSymbolicName)
        {
            Relevance  = opcUaNodeRelevance;
            OpCode     = opcNodeDescription.OpCode;
            Units      = opcNodeDescription.Units;
            Visible    = opcNodeDescription.Visible;
            ConstValue = opcNodeDescription.ConstValue;
            Minimum    = opcNodeDescription.Minimum;
            Maximum    = opcNodeDescription.Maximum;

            MinimumAlertActions = new List <ContosoAlertActionDefinition>();
            MinimumAlertActions.AddRange(ContosoAlertActionDefinition.Init(opcNodeDescription.MinimumAlertActions));
            MaximumAlertActions = new List <ContosoAlertActionDefinition>();
            MaximumAlertActions.AddRange(ContosoAlertActionDefinition.Init(opcNodeDescription.MaximumAlertActions));
            Last = new ContosoDataItem();
        }