예제 #1
0
 public ExecutionRunner(string testAssemblyPath, IControllerProxy controllerProxy,
                        IExecutionAdapter adapter)
 {
     this.testAssemblyPath = testAssemblyPath;
     this.controllerProxy  = controllerProxy;
     this.adapter          = adapter;
 }
예제 #2
0
 public ConsoleRunner(string testAssemblyPath, IControllerProxy controllerProxy,
                      LaunchOptions.NSpecPart nspecOptions)
 {
     this.testAssemblyPath = testAssemblyPath;
     this.controllerProxy  = controllerProxy;
     this.nspecOptions     = nspecOptions;
 }
예제 #3
0
        public DiscoveryRunner(string testAssemblyPath, IControllerProxy controllerProxy,
                               IDiscoveryAdapter adapter)
        {
            this.testAssemblyPath = testAssemblyPath;
            this.controllerProxy  = controllerProxy;
            this.adapter          = adapter;

            exampleMapper = new ExampleMapper();
        }
    public ITagProxy CreateTagWrapper(IControllerProxy clx, WrappedClasses.ATOMIC dataType, int length)
    {
        ConcreteControllerProxy controllerWrapper = clx as ConcreteControllerProxy;

        WrappedClasses.Tag tag = new WrappedClasses.Tag
        {
            Controller = controllerWrapper.Controller,
            DataType   = dataType,
            Length     = length
        };
        return(new ConcreteTagProxy(tag));
    }
 public bool Connect(string ip, string slot, int timeout, bool blockWrites, string tagName)
 {
     _clx = Factory.CreateControllerProxy(ip, slot, timeout);
     if (_clx != null)
     {
         _clx.Connect();
         if (_clx.IsConnected)
         {
             if (tagName != null)
             {
                 _tag = Factory.CreateTagProxy(_clx, tagName, WrappedClasses.ATOMIC.DINT);
                 return((_tag.ErrorCode == 0) && _tag.Controller.IsConnected);
             }
             _tag = Factory.CreateTagWrapper(_clx, WrappedClasses.ATOMIC.DINT, 1);
             return(_tag.Controller.IsConnected);
         }
     }
     return(false);
 }
    public ITagProxy CreateTagProxy(IControllerProxy clx, string tagName, WrappedClasses.ATOMIC dataType)
    {
        ConcreteControllerProxy controllerWrapper = clx as ConcreteControllerProxy;

        return(new ConcreteTagProxy(controllerWrapper.Controller, tagName, dataType));
    }