internal OPCSessionServer(OPCCliConfiguration.ServersRow server, OpcDa::BrowseFilters filters, OPCEnvironment node) : base(server.Name, null, node) { LastEception = null; try { m_Menu = new ContextMenuServer(this); Opc.URL url = new Opc.URL(server.URL); if (server.GetConnectDataRows().Length > 0) { m_ConnectData = server.GetConnectDataRows()[0].GetConnectData(); } m_Spcification = new Opc.Specification() { ID = server.PreferedSpecyficationID, Description = server.PreferedSpecyficationDsc }; Tag = (Server)Factory.GetServerForURL(url, m_Spcification); server.GetOptions(this); foreach (OPCCliConfiguration.SubscriptionsRow rw in server.GetSubscriptionsRows()) { new SubscriptionTreeNodeSession(rw, this); } State = state.disconnectd; } catch (Exception ex) { ReportException(ex); } }
public ServerTreeNode(OPCCliConfiguration.ServersRow server) : base(new ServerWrapperForPropertyGrid(server), server.Name) { foreach (OPCCliConfiguration.SubscriptionsRow item in server.GetSubscriptionsRows()) { this.Nodes.Add(new SubscriptionTreeNodes(item)); } }
/// <summary> /// Creates new instance of an OPC client and /// </summary> /// <param name="server">The server.</param> /// <param name="volumeConstrain">The volume constrain.</param> private void CrateServer(OPCCliConfiguration.ServersRow server, ref uint?volumeConstrain) { OPC_Interface m_Server = new OPC_Interface(server.PreferedSpecification, server.URL, server.Name); foreach (OPCCliConfiguration.SubscriptionsRow group in server.GetSubscriptionsRows()) { OPCClientGroup(group, group.GetItemsRows(), m_Server, ref volumeConstrain); } }
internal OPCItemIdentifier GetItemIdentifier(string description, out ConfigurationManagement.AdditionalResultInfo resultInfo) { if ((!Opened) && !Open(m_DefaultFileName, out resultInfo)) { return(null); } foreach (OPCCliConfiguration.ItemsRow item in m_ConfigurationManagement.Configuartion.Items) { if (item.Name.Contains(description)) { OPCCliConfiguration.SubscriptionsRow subscription = item.SUBSCRIPTIONRow; OPCCliConfiguration.ServersRow server = subscription.SERVERSRow; resultInfo = ConfigurationManagement.AdditionalResultInfo.OK; return(new OPCItemIdentifier() { ItemName = item.Name, SubscriptionName = subscription.Name, ServerName = server.Name }); } } resultInfo = ConfigurationManagement.AdditionalResultInfo.Exception; return(null); }
internal ServerWrapperForPropertyGrid(OPCCliConfiguration.ServersRow server) { this.mServer = server; }