public static Tuple <IConnection, IConnection> CreateConnectionFromAddress( string boardName, int boardNumber, int configIndex, OamConnectionType connectionType, string addressString ) { IOamConfiguration config = GetConfigurationByIndex(boardName, boardNumber, configIndex); IOamAddress address; int createResult = OamObjectCreator.CreateAddress(addressString, out address); OamNodeBase node = OamObjectCreator.CreateNode(config, address); IConnection connectionMaster = OamObjectCreator.CreateConnection( connectionType, node, true, OamConnection.OamConnectionRole.SharedMaster); IConnection connectionProxy = OamObjectCreator.CreateConnection( connectionType, node, true, OamConnection.OamConnectionRole.SharedProxy); Tuple <IConnection, IConnection> result = new Tuple <IConnection, IConnection>(connectionMaster, connectionProxy); return(result); }
public static ICoreObject GetLocalInterfaceCardByBoardConfiguration(this ILifelistService lifelist, IOamConfiguration physicalConfiguration) { ICoreObjectCollection localInterfaceCards = lifelist.GetLocalInterfaceCards(true); ICoreObject coreBoard = LifelistNavigator.FindCoreBoard(localInterfaceCards, physicalConfiguration.Board); return(coreBoard); }
public static INode CreateNode(IOamConfiguration ioc, string addressString) { OamConfigurationBase ocb = ioc as OamConfigurationBase; IOamAddress address; int createResult = OamObjectCreator.CreateAddress(addressString, out address); INode node = ocb.CreateNode(address); return(node); }
public static IOamConfiguration GetConfigurationByIndex( string boardName, int boardNumber, int configIndex ) { IOnlineSession onlineSession = OnlineSession.GetOnlineSession(); List <IOamLocalBoard> boards = onlineSession.Boards; IOamLocalBoard board = onlineSession.GetBoard(boardName, boardNumber); OamConfigurationScanner OCS = new OamConfigurationScanner(); OCS.Board = board; IEnumerable <IOamConfiguration> configs = OCS.Scan(); List <IOamConfiguration> configList = new List <IOamConfiguration>(configs); IOamConfiguration config = configList[configIndex]; return(config); }