Esempio n. 1
0
 public OPCGroup AddGroup(string groupName, int updateRate)
 {
     OPCGroup opcGroup = new OPCGroup(this, groupName, updateRate);
     this.AddGroup(opcGroup);
     this.groups.Add(groupName, opcGroup);
     return opcGroup;
 }
Esempio n. 2
0
 internal OPCItem(OPCGroup opcGroup, string itemName, string opcItemName, int clientHandler, bool isActive)
 {
     this.parent        = opcGroup;
     this.ItemName      = itemName;
     this.opcItemName   = opcItemName;
     this.clientHandler = clientHandler;
     this.isActive      = isActive;
 }
 protected void AddGroup(string groupName, OPCGroup group)
 {
     if (this.defaultGroup == null)
     {
         this.defaultGroup = groupName.ToUpper();
     }
     this.groupTable.Add(groupName.ToUpper(), group);
 }
Esempio n. 4
0
 internal OPCItem(OPCGroup opcGroup, string itemName, string opcItemName, int clientHandler, bool isActive)
 {
     this.parent = opcGroup;
     this.ItemName = itemName;
     this.opcItemName = opcItemName;
     this.clientHandler = clientHandler;
     this.isActive = isActive;
 }
Esempio n. 5
0
        public OPCGroup AddGroup(string groupName, int updateRate)
        {
            OPCGroup opcGroup = new OPCGroup(this, groupName, updateRate);

            this.AddGroup(opcGroup);
            this.groups.Add(groupName, opcGroup);
            return(opcGroup);
        }
Esempio n. 6
0
 protected void AddGroup(string groupName, OPCGroup group)
 {
     if (this.defaultGroup == null)
     {
         this.defaultGroup = groupName.ToUpper();
     }
     this.groupTable.Add(groupName.ToUpper(), group);
 }
Esempio n. 7
0
        private bool AddGroup(OPCGroup opcGroup)
        {
            bool     flag          = true;
            float    num2          = 0f;
            int      phServerGroup = 0;
            GCHandle handle        = GCHandle.Alloc(num2, GCHandleType.Pinned);
            IntPtr   zero          = IntPtr.Zero;

            try
            {
                int              num;
                object           obj2;
                IConnectionPoint point;
                int              num4;
                this.pIOPCServer.AddGroup(opcGroup.GroupName, 1, opcGroup.UpdateRate, 0, zero, IntPtr.Zero, 0x86, out phServerGroup, out num, ref this.itemMgtInterface, out obj2);
                opcGroup.UpdateRate    = num;
                opcGroup.ServerHandler = phServerGroup;
                IConnectionPointContainer container = (IConnectionPointContainer)obj2;
                Guid gUID = typeof(IOPCDataCallback).GUID;
                container.FindConnectionPoint(ref gUID, out point);
                point.Advise(opcGroup, out num4);
                opcGroup.SetParam(num4, obj2);
            }
            catch (Exception)
            {
                flag = false;
            }
            finally
            {
                if (handle.IsAllocated)
                {
                    handle.Free();
                }
            }
            return(flag);
        }
Esempio n. 8
0
 private bool AddGroup(OPCGroup opcGroup)
 {
     bool flag = true;
     float num2 = 0f;
     int phServerGroup = 0;
     GCHandle handle = GCHandle.Alloc(num2, GCHandleType.Pinned);
     IntPtr zero = IntPtr.Zero;
     try
     {
         int num;
         object obj2;
         IConnectionPoint point;
         int num4;
         this.pIOPCServer.AddGroup(opcGroup.GroupName, 1, opcGroup.UpdateRate, 0, zero, IntPtr.Zero, 0x86, out phServerGroup, out num, ref this.itemMgtInterface, out obj2);
         opcGroup.UpdateRate = num;
         opcGroup.ServerHandler = phServerGroup;
         IConnectionPointContainer container = (IConnectionPointContainer) obj2;
         Guid gUID = typeof(IOPCDataCallback).GUID;
         container.FindConnectionPoint(ref gUID, out point);
         point.Advise(opcGroup, out num4);
         opcGroup.SetParam(num4, obj2);
     }
     catch (Exception)
     {
         flag = false;
     }
     finally
     {
         if (handle.IsAllocated)
         {
             handle.Free();
         }
     }
     return flag;
 }
 internal void Add(string groupName, OPCGroup group)
 {
     this.AddGroup(groupName, group);
 }
Esempio n. 10
0
 internal void Add(string groupName, OPCGroup group)
 {
     this.AddGroup(groupName, group);
 }