Ejemplo n.º 1
0
        }           //	end QueryProperties

        public void HandleAddedToAddressSpace()
        {
            if (ItemId == "stringBased")
            {
                ObjectType = 20;
            }
            else if ((ItemId == "stringBased.N1") || (ItemId == "stringBased.N2"))
            {
                ObjectType = 21;
            }
            else if (ItemId == "stringBased.T1")
            {
                ObjectType = 22;
            }
            else if ((ItemId == "stringBased.N1.T1") ||
                     (ItemId == "stringBased.N2.T1") ||
                     (ItemId == "stringBased.N2.T2"))
            {
                ObjectType = 23;
            }
            else if (ItemId == "syntaxBased")
            {
                ObjectType = 40;
            }
            else if (ItemId.StartsWith("syntaxBased"))
            {
                Int32 index;
                index = ItemId.LastIndexOf(".T");
                if (index > 0)
                {
                    ObjectType = 42;                     // T
                }
                else
                {
                    ObjectType = 41; // N
                }                    //	end if ... else
            }                        //	end if ... else



            if (this.IoMode != EnumIoMode.NONE)
            {
                ValueQT initialValue = new ValueQT(0, EnumQuality.GOOD, DateTime.Now);
                ValueChanged(initialValue);
            }

            OpcServer.AddressSpaceChanged.Set();
        }           //	end HandleAddedToAddressSpace