当前位置: 首页>>代码示例>>C#>>正文


C# Ua.BaseInstanceState类代码示例

本文整理汇总了C#中Opc.Ua.BaseInstanceState的典型用法代码示例。如果您正苦于以下问题:C# BaseInstanceState类的具体用法?C# BaseInstanceState怎么用?C# BaseInstanceState使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


BaseInstanceState类属于Opc.Ua命名空间,在下文中一共展示了BaseInstanceState类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Initialize

 /// <summary>
 /// Initializes the snapshot from an instance.
 /// </summary>
 /// <param name="context">The context.</param>
 /// <param name="state">The state.</param>
 public void Initialize(
     ISystemContext context, 
     BaseInstanceState state)
 {
     m_typeDefinitionId = state.TypeDefinitionId;
     m_snapshot = CreateChildNode(context, state);
 }
开发者ID:yuriik83,项目名称:UA-.NET,代码行数:12,代码来源:BaseInstanceStateSnapshot.cs

示例2: FindChild

        /// <summary>
        /// Finds the child with the specified browse name.
        /// </summary>
        protected override BaseInstanceState FindChild(
            ISystemContext context,
            QualifiedName browseName,
            bool createOrReplace,
            BaseInstanceState replacement)
        {
            if (QualifiedName.IsNull(browseName))
            {
                return null;
            }

            BaseInstanceState instance = null;

            switch (browseName.Name)
            {
                case DsatsDemo.BrowseNames.Measurements:
                {
                    if (createOrReplace)
                    {
                        if (Measurements == null)
                        {
                            if (replacement == null)
                            {
                                Measurements = new MudPumpMeasurementsFolderState(this);
                            }
                            else
                            {
                                Measurements = (MudPumpMeasurementsFolderState)replacement;
                            }
                        }
                    }

                    instance = Measurements;
                    break;
                }

                case DsatsDemo.BrowseNames.SetPoints:
                {
                    if (createOrReplace)
                    {
                        if (SetPoints == null)
                        {
                            if (replacement == null)
                            {
                                SetPoints = new MudPumpSetPointsFolderState(this);
                            }
                            else
                            {
                                SetPoints = (MudPumpSetPointsFolderState)replacement;
                            }
                        }
                    }

                    instance = SetPoints;
                    break;
                }
            }

            if (instance != null)
            {
                return instance;
            }

            return base.FindChild(context, browseName, createOrReplace, replacement);
        }
开发者ID:OPCFoundation,项目名称:UA-.NET,代码行数:68,代码来源:DsatsDemo.Classes.cs

示例3: FindChild

        /// <summary>
        /// Finds the child with the specified browse name.
        /// </summary>
        protected override BaseInstanceState FindChild(
            ISystemContext context,
            QualifiedName browseName,
            bool createOrReplace,
            BaseInstanceState replacement)
        {
            if (QualifiedName.IsNull(browseName))
            {
                return null;
            }

            BaseInstanceState instance = null;

            switch (browseName.Name)
            {
                case FileSystem.BrowseNames.Humidity:
                {
                    if (createOrReplace)
                    {
                        if (Humidity == null)
                        {
                            if (replacement == null)
                            {
                                Humidity = new AnalogItemState<double>(this);
                            }
                            else
                            {
                                Humidity = (AnalogItemState<double>)replacement;
                            }
                        }
                    }

                    instance = Humidity;
                    break;
                }

                case FileSystem.BrowseNames.HumiditySetPoint:
                {
                    if (createOrReplace)
                    {
                        if (HumiditySetPoint == null)
                        {
                            if (replacement == null)
                            {
                                HumiditySetPoint = new AnalogItemState<double>(this);
                            }
                            else
                            {
                                HumiditySetPoint = (AnalogItemState<double>)replacement;
                            }
                        }
                    }

                    instance = HumiditySetPoint;
                    break;
                }
            }

            if (instance != null)
            {
                return instance;
            }

            return base.FindChild(context, browseName, createOrReplace, replacement);
        }
开发者ID:yuriik83,项目名称:UA-.NET,代码行数:68,代码来源:FileSystem.Classes.cs

示例4: FindChild

        /// <summary>
        /// Finds the child with the specified browse name.
        /// </summary>
        protected override BaseInstanceState FindChild(
            ISystemContext context,
            QualifiedName browseName,
            bool createOrReplace,
            BaseInstanceState replacement)
        {
            if (QualifiedName.IsNull(browseName))
            {
                return null;
            }

            BaseInstanceState instance = null;

            switch (browseName.Name)
            {
                case BrowseNames.InputArguments:
                {
                    if (createOrReplace)
                    {
                        if (InputArguments == null)
                        {
                            if (replacement == null)
                            {
                                InputArguments = new PropertyState<Argument[]>(this);
                            }
                            else
                            {
                                InputArguments = (PropertyState<Argument[]>)replacement;
                            }
                        }
                    }

                    instance = InputArguments;
                    break;
                }

                case BrowseNames.OutputArguments:
                {
                    if (createOrReplace)
                    {
                        if (OutputArguments == null)
                        {
                            if (replacement == null)
                            {
                                OutputArguments = new PropertyState<Argument[]>(this);
                            }
                            else
                            {
                                OutputArguments = (PropertyState<Argument[]>)replacement;
                            }
                        }
                    }

                    instance = OutputArguments;
                    break;
                }
            }

            if (instance != null)
            {
                return instance;
            }

            return base.FindChild(context, browseName, createOrReplace, replacement);
        }
开发者ID:OPCFoundation,项目名称:Misc-Tools,代码行数:68,代码来源:MethodState.cs

示例5: CreateNode

        /// <summary>
        /// Creates a new instance and assigns unique identifiers to all children.
        /// </summary>
        /// <param name="context">The operation context.</param>
        /// <param name="parentId">An optional parent identifier.</param>
        /// <param name="referenceTypeId">The reference type from the parent.</param>
        /// <param name="browseName">The browse name.</param>
        /// <param name="instance">The instance to create.</param>
        /// <returns>The new node id.</returns>
        public NodeId CreateNode(
            ServerSystemContext context,
            NodeId parentId,
            NodeId referenceTypeId,
            QualifiedName browseName,
            BaseInstanceState instance)
        {
            ServerSystemContext contextToUse = (ServerSystemContext)m_systemContext.Copy(context);

            lock (Lock)
            {
                if (m_predefinedNodes == null)
                {
                    m_predefinedNodes = new NodeIdDictionary<NodeState>();
                }

                instance.ReferenceTypeId = referenceTypeId;

                NodeState parent = null;

                if (parentId != null)
                {
                    if (!m_predefinedNodes.TryGetValue(parentId, out parent))
                    {
                        throw ServiceResultException.Create(
                            StatusCodes.BadNodeIdUnknown,
                            "Cannot find parent with id: {0}",
                            parentId);
                    }

                    parent.AddChild(instance);
                }

                instance.Create(contextToUse, null, browseName, null, true);
                AddPredefinedNode(contextToUse, instance);

                return instance.NodeId;
            }
        }
开发者ID:OPCFoundation,项目名称:UA-.NET,代码行数:48,代码来源:QuickstartNodeManager.cs

示例6: FindChild

        /// <summary>
        /// Finds the child with the specified browse name.
        /// </summary>
        protected override BaseInstanceState FindChild(
            ISystemContext context,
            QualifiedName browseName,
            bool createOrReplace,
            BaseInstanceState replacement)
        {
            if (QualifiedName.IsNull(browseName))
            {
                return null;
            }

            BaseInstanceState instance = null;

            switch (browseName.Name)
            {
                case Opc.Ua.Fdi7.BrowseNames.ProtocolIdentifier:
                {
                    if (createOrReplace)
                    {
                        if (ProtocolIdentifier == null)
                        {
                            if (replacement == null)
                            {
                                ProtocolIdentifier = new PropertyState<string>(this);
                            }
                            else
                            {
                                ProtocolIdentifier = (PropertyState<string>)replacement;
                            }
                        }
                    }

                    instance = ProtocolIdentifier;
                    break;
                }

                case Opc.Ua.Fdi7.BrowseNames.ServiceProvider:
                {
                    if (createOrReplace)
                    {
                        if (ServiceProvider == null)
                        {
                            if (replacement == null)
                            {
                                ServiceProvider = new ServerCommunicationGENERICServiceState(this);
                            }
                            else
                            {
                                ServiceProvider = (ServerCommunicationGENERICServiceState)replacement;
                            }
                        }
                    }

                    instance = ServiceProvider;
                    break;
                }
            }

            if (instance != null)
            {
                return instance;
            }

            return base.FindChild(context, browseName, createOrReplace, replacement);
        }
开发者ID:OPCFoundation,项目名称:UA-Nodeset,代码行数:68,代码来源:Opc.Ua.Fdi7.Classes.cs

示例7: FindChild

        /// <summary>
        /// Finds the child with the specified browse name.
        /// </summary>
        protected override BaseInstanceState FindChild(
            ISystemContext context,
            QualifiedName browseName,
            bool createOrReplace,
            BaseInstanceState replacement)
        {
            if (QualifiedName.IsNull(browseName))
            {
                return null;
            }

            BaseInstanceState instance = null;

            switch (browseName.Name)
            {
                case Boiler.BrowseNames.UpdateRate:
                {
                    if (createOrReplace)
                    {
                        if (UpdateRate == null)
                        {
                            if (replacement == null)
                            {
                                UpdateRate = new PropertyState<uint>(this);
                            }
                            else
                            {
                                UpdateRate = (PropertyState<uint>)replacement;
                            }
                        }
                    }

                    instance = UpdateRate;
                    break;
                }
            }

            if (instance != null)
            {
                return instance;
            }

            return base.FindChild(context, browseName, createOrReplace, replacement);
        }
开发者ID:yuriik83,项目名称:UA-.NET,代码行数:47,代码来源:Boiler.Classes.cs

示例8: FindChild

        /// <summary>
        /// Finds the child with the specified browse name.
        /// </summary>
        protected override BaseInstanceState FindChild(
            ISystemContext context,
            QualifiedName browseName,
            bool createOrReplace,
            BaseInstanceState replacement)
        {
            if (QualifiedName.IsNull(browseName))
            {
                return null;
            }

            BaseInstanceState instance = null;

            switch (browseName.Name)
            {
                case Quickstarts.HistoricalEvents.BrowseNames.TestDuration:
                {
                    if (createOrReplace)
                    {
                        if (TestDuration == null)
                        {
                            if (replacement == null)
                            {
                                TestDuration = new AnalogItemState<double>(this);
                            }
                            else
                            {
                                TestDuration = (AnalogItemState<double>)replacement;
                            }
                        }
                    }

                    instance = TestDuration;
                    break;
                }

                case Quickstarts.HistoricalEvents.BrowseNames.InjectedFluid:
                {
                    if (createOrReplace)
                    {
                        if (InjectedFluid == null)
                        {
                            if (replacement == null)
                            {
                                InjectedFluid = new PropertyState<string>(this);
                            }
                            else
                            {
                                InjectedFluid = (PropertyState<string>)replacement;
                            }
                        }
                    }

                    instance = InjectedFluid;
                    break;
                }
            }

            if (instance != null)
            {
                return instance;
            }

            return base.FindChild(context, browseName, createOrReplace, replacement);
        }
开发者ID:yuriik83,项目名称:UA-.NET,代码行数:68,代码来源:Quickstarts.HistoricalEvents.Classes.cs

示例9: UpdateDisplayName

        /// <summary>
        /// Updates the display name for an instance with the unit label name.
        /// </summary>
        /// <param name="instance">The instance to update.</param>
        /// <param name="label">The label to apply.</param>
        /// <remarks>This method assumes the DisplayName has the form NameX001 where X0 is the unit label placeholder.</remarks>
        private void UpdateDisplayName(BaseInstanceState instance, string unitLabel)
        {
            LocalizedText displayName = instance.DisplayName;

            if (displayName != null)
            {
                string text = displayName.Text;

                if (text != null)
                {
                    text = text.Replace("X0", unitLabel);
                }

                displayName = new LocalizedText(displayName.Locale, text);
            }

            instance.DisplayName = displayName;
        }
开发者ID:yuriik83,项目名称:UA-.UWP-Universal-Windows-Platform,代码行数:24,代码来源:BoilerNodeManager.cs

示例10: FindChild

        /// <summary>
        /// Finds the child with the specified browse name.
        /// </summary>
        protected override BaseInstanceState FindChild(
            ISystemContext context,
            QualifiedName browseName,
            bool createOrReplace,
            BaseInstanceState replacement)
        {
            if (QualifiedName.IsNull(browseName))
            {
                return null;
            }

            BaseInstanceState instance = null;

            switch (browseName.Name)
            {
                case MemoryBuffer.BrowseNames.StartAddress:
                {
                    if (createOrReplace)
                    {
                        if (StartAddress == null)
                        {
                            if (replacement == null)
                            {
                                StartAddress = new PropertyState<uint>(this);
                            }
                            else
                            {
                                StartAddress = (PropertyState<uint>)replacement;
                            }
                        }
                    }

                    instance = StartAddress;
                    break;
                }

                case MemoryBuffer.BrowseNames.SizeInBytes:
                {
                    if (createOrReplace)
                    {
                        if (SizeInBytes == null)
                        {
                            if (replacement == null)
                            {
                                SizeInBytes = new PropertyState<uint>(this);
                            }
                            else
                            {
                                SizeInBytes = (PropertyState<uint>)replacement;
                            }
                        }
                    }

                    instance = SizeInBytes;
                    break;
                }
            }

            if (instance != null)
            {
                return instance;
            }

            return base.FindChild(context, browseName, createOrReplace, replacement);
        }
开发者ID:yuriik83,项目名称:UA-.NET,代码行数:68,代码来源:MemoryBuffer.Classes.cs

示例11: FindChild

        /// <summary>
        /// Finds the child with the specified browse name.
        /// </summary>
        protected override BaseInstanceState FindChild(
            ISystemContext context,
            QualifiedName browseName,
            bool createOrReplace,
            BaseInstanceState replacement)
        {
            if (QualifiedName.IsNull(browseName))
            {
                return null;
            }

            BaseInstanceState instance = null;

            switch (browseName.Name)
            {
                case TutorialModel.BrowseNames.Input:
                {
                    if (createOrReplace)
                    {
                        if (Input == null)
                        {
                            if (replacement == null)
                            {
                                Input = new AnalogItemState<double>(this);
                            }
                            else
                            {
                                Input = (AnalogItemState<double>)replacement;
                            }
                        }
                    }

                    instance = Input;
                    break;
                }
            }

            if (instance != null)
            {
                return instance;
            }

            return base.FindChild(context, browseName, createOrReplace, replacement);
        }
开发者ID:yuriik83,项目名称:UA-.NET,代码行数:47,代码来源:TutorialModel.Classes.cs


注:本文中的Opc.Ua.BaseInstanceState类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。