예제 #1
0
        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);
        }
예제 #2
0
        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);
        }
예제 #3
0
 public static int CreateAddress(string addressString, out IOamAddress address)
 {
     return(OamObjectCreator.CreateAddress(addressString, out address));
 }