Exemple #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;
 }
Exemple #2
0
 protected void AddGroup(string groupName, OPCGroup group)
 {
     if (this.defaultGroup == null)
     {
         this.defaultGroup = groupName.ToUpper();
     }
     this.groupTable.Add(groupName.ToUpper(), group);
 }
Exemple #3
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;
 }
Exemple #4
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;
 }
Exemple #5
0
 internal void Add(string groupName, OPCGroup group)
 {
     this.AddGroup(groupName, group);
 }