internal OPCItemIdentifier GetIdentifier()
        {
            OPCItemIdentifier ret = new OPCItemIdentifier();

            FillUpIdentifier(ret);
            return(ret);
        }
        /// <summary>
        /// Gets the instance of this type.
        /// </summary>
        /// <returns>SourceBase.</returns>
        protected internal override SourceBase GetSourceBase()
        {
            OPCItemIdentifier ret = Main.EntryPoint.OPCDAClienteEntryPoint.GetItemIdentifier();

            if (ret != null)
            {
                ItemName = ret.ItemName;

                ServerName       = ret.ServerName;
                SubscriptionName = ret.SubscriptionName;
                Selected         = true;
            }
            return(this);
        }
        /// <summary>
        /// Creates the OPCDA client source configuration.
        /// </summary>
        /// <param name="item">The item.</param>
        /// <param name="LastResultInfo">The last result info.</param>
        /// <param name="SkipGetItemIdentifier">if set to <c>true</c> skip calling OPCDAClienteEntryPoint.GetItemIdentifier (OPCItemIdentifier==null) </param>
        public OPCDAClientSourceConfiguration(
            INodeDescriptor item,
            out ConfigurationManagement.AdditionalResultInfo LastResultInfo,
            bool SkipGetItemIdentifier)
        {
            LastResultInfo = ConfigurationManagement.AdditionalResultInfo.OK;
            OPCItemIdentifier ret = null;

            if (!SkipGetItemIdentifier)
            {
                ret = Main.EntryPoint.OPCDAClienteEntryPoint.GetItemIdentifier(item.BindingDescription, out LastResultInfo);
            }
            if (ret == null)
            {
                Selected       = false;
                LastResultInfo = ConfigurationManagement.AdditionalResultInfo.Cancel;
                return;
            }
            ItemName         = ret.ItemName;
            ServerName       = ret.ServerName;
            SubscriptionName = ret.SubscriptionName;
            Selected         = true;
        }
        internal static OPCDAClientSourceConfiguration CreateInstance()
        {
            OPCItemIdentifier ret = Main.EntryPoint.OPCDAClienteEntryPoint.GetItemIdentifier();

            if (ret == null)
            {
                return new OPCDAClientSourceConfiguration()
                       {
                           Selected = false
                       }
            }
            ;
            else
            {
                return new OPCDAClientSourceConfiguration()
                       {
                           ItemName         = ret.ItemName,
                           ServerName       = ret.ServerName,
                           SubscriptionName = ret.SubscriptionName,
                           Selected         = true
                       }
            };
        }
Exemplo n.º 5
0
 protected override void FillUpIdentifier(OPCItemIdentifier ret)
 {
     ret.SubscriptionName = MyWrapper.Name;
     base.FillUpIdentifier(ret);
 }