Ejemplo n.º 1
0
        public void Setup()
        {
            _channel = new Channel("localhost:39946", ChannelCredentials.Insecure);
            _client  = new VimbaCamera.VimbaCameraClient(_channel);

            ThrowIfError(
                _client.VimbaInstanceControl(new VimbaInstanceControlRequest()
            {
                Command = ConnectionCommands.Connect
            }));
            ThrowIfError(_client.RequestCameraConnection(new CameraConnectionRequest()
            {
                Command  = ConnectionCommands.Connect,
                CameraID = TestClass.CameraId
            }));

            ThrowIfError(_client.RequestReset(new ResetRequest()));

            Task.Delay(1000).Wait();

            ThrowIfError(_client.RequestCameraConnection(new CameraConnectionRequest()
            {
                Command  = ConnectionCommands.Connect,
                CameraID = TestClass.CameraId
            }));
        }
Ejemplo n.º 2
0
 public void TestResetDevice()
 {
     StartVimbaAndShutDown(() =>
     {
         _client.RequestCameraConnection(new CameraConnectionRequest()
         {
             Command  = ConnectionCommands.Connect,
             CameraID = CameraId
         });
         var response = _client.RequestReset(new ResetRequest());
         Assert.IsNull(response.Error);
     });
 }