| | |
| | | } |
| | | } |
| | | |
| | | public override ImageSet Snapshot(IOperationConfig config) |
| | | public override IImageSet Snapshot(IOperationConfig config) |
| | | { |
| | | ImageSet set = base.Snapshot(config); |
| | | ImageSet set = new ImageSet(); |
| | | InitialImageSet(set, (config as CameraOprerationConfigBase).ImageSaveOption); |
| | | |
| | | MyCamera.MV_FRAME_OUT frameInfo = new MyCamera.MV_FRAME_OUT(); |
| | | nRet = MyCamera.MV_OK; |
| | | |
| | |
| | | { |
| | | if (nMsgType == MyCamera.MV_EXCEPTION_DEV_DISCONNECT) |
| | | { |
| | | Thread.Sleep(1000); |
| | | |
| | | Stop(); |
| | | |
| | | if (CurrentState != EnumHelper.DeviceState.DSClose) |
| | | { |
| | | int reTryTimes = 3; |
| | | do |
| | | { |
| | | Thread.Sleep(1000); |
| | | Stop(); |
| | | |
| | | try |
| | | { |
| | | Start(); |
| | |
| | | if (reTryTimes > 0) |
| | | { |
| | | //OnLog?.Invoke(DateTime.Now, this, "重新连接相机异常\r\n" + ex.GetExceptionMessage()); |
| | | LogAsync(DateTime.Now, "重新连接异常", ex.GetExceptionMessage()); |
| | | LogAsync(DateTime.Now, $"{this.Name}重新连接异常", ex.GetExceptionMessage()); |
| | | } |
| | | else |
| | | { |