Beispiel #1
0
 internal OPCGroup(OPCServer server, string groupName, int updateRate)
 {
     this.parent = server;
     this.GroupName = groupName;
     this.updateRate = updateRate;
     this.items = new OPCItemCollection();
 }
Beispiel #2
0
        public override void Initialize(string file)
        {
            opcServer = new OPCServer(Name);

            Config.Configuration config = new Config.Configuration(file);
            opcServer.Connect(config.ConnectionString);

            OPCGroup group = opcServer.AddGroup(config.GroupName, config.UpdateRate);
            foreach (Config.ItemInfo item in config.Items)
            {
                group.AddItem(item.ItemName, item.OpcItemName, item.ClientHandler, item.IsActive);
            }
            opcServer.Groups.DefaultGroup.OnDataChanged += new OPCGroup.DataChangedEventHandler(DefaultGroup_OnDataChanged);
        }