public ConnectionProviderAndAttributes(AxisHardwareConnectionProvider connectionProvider) { AxisHardwareConnection = connectionProvider; if (AxisHardwareConnection != null) { addressIn = AxisHardwareConnection.ActorInterface.InputAddress; addressOut = AxisHardwareConnection.ActorInterface.OutputAddress; connectOption = AxisHardwareConnection.ActorInterface.ConnectOption; isConnected = AxisHardwareConnection.ActorInterface.IsConnected; } }
public void GetAllToConnections() { foreach (TechnologicalInstanceDB currentTechnologicalInstanceDB in plcSoftware.TechnologicalObjectGroup.TechnologicalObjects) { AxisHardwareConnectionProvider connectionProvider = currentTechnologicalInstanceDB.GetService <AxisHardwareConnectionProvider>(); if (connectionProvider != null) { ConnectionProviderAndAttributes newItem = new ConnectionProviderAndAttributes(connectionProvider); if (newItem != null) { AllToConnections.Add(newItem); } } } }