コード例 #1
0
        public void TestValidateItems01()
        {
            //Testing ---
            OPCItemDef[] arrDef = new OPCItemDef[1];
            OPCItemDef   opcDef = new OPCItemDef("DP1", true, 1, System.Runtime.InteropServices.VarEnum.VT_EMPTY);

            arrDef[0] = opcDef;
            bool blobUpd = false;

            OPCItemResult[] arrRes = null;
            //Test Procedure Call
            bool b = group.ValidateItems(arrDef, blobUpd, out arrRes);
        }
コード例 #2
0
        private void ValidateItemIds(ref List <string> p_ItemIds)
        {
            List <string> l_ItemIds = new List <string>(p_ItemIds);

            foreach (string l_ItemName in l_ItemIds)
            {
                OpcItemResult[] l_ItemResult;
                OpcItemDef[]    l_ItemDef = new OpcItemDef[1];

                l_ItemDef[0] = new OpcItemDef(l_ItemName, true, 0, VarEnum.VT_BSTR);

                if (!_group.ValidateItems(l_ItemDef, false, out l_ItemResult))
                {
                    p_ItemIds.Remove(l_ItemName);
                }
            }
        }