Пример #1
0
        public Leaf(Branch Parent, string Name, int ClientHandle, OPCBrowser Browser)
        {
            this._Parent       = Parent;
            this._Name         = Name;
            this._ClientHandle = ClientHandle;

            this._Parent.addLeaf(this);

            this._OPCItem          = this._Parent.OPCGroup.OPCItems.AddItem(Browser.GetItemID(this._Name), this._ClientHandle);
            this._OPCItem.IsActive = true;
        }
Пример #2
0
        public Leaf(Branch Parent, string Name, int ClientHandle, OPCBrowser Browser)
        {
            this._Parent            = Parent;
            this._Name              = Name;
            this._ClientHandle      = ClientHandle;

            this._Parent.addLeaf(this);

            this._OPCItem           = this._Parent.OPCGroup.OPCItems.AddItem(Browser.GetItemID(this._Name), this._ClientHandle);
            this._OPCItem.IsActive  = true;
        }
Пример #3
0
        static void Browser()
        {
            OPCBrowser        browser = _opcServer.CreateBrowser();
            OPCNamespaceTypes type    = (OPCNamespaceTypes)(browser.Organization);

            PrintInfo("browser Type", type.ToString());

            browser.ShowBranches();

            for (int i = 1; i <= browser.Count; i++)
            {
                Console.WriteLine(browser.Item(i));

                browser.MoveDown(browser.Item(i));
                browser.ShowBranches();

                for (int j = 1; j <= browser.Count; j++)
                {
                    Console.WriteLine(string.Format("   {0}", browser.Item(j)));


                    browser.MoveDown(browser.Item(j));
                    browser.ShowLeafs();

                    for (int k = 1; k <= browser.Count; k++)
                    {
                        Console.WriteLine(string.Format("      {0}   ItemID = {1}", browser.Item(k), browser.GetItemID(browser.Item(k))));
                    }
                }
            }
        }