예제 #1
0
        public CameraAPIHandle(ProCommon.Communal.Camera cam)
        {
            if (cam != null)
            {
                CameraConfig = cam;
                switch (cam.CtrllerBrand)
                {
                case ProCommon.Communal.CtrllerBrand.Baumer:
                    break;

                case ProCommon.Communal.CtrllerBrand.Dalsa:
                    break;

                case ProCommon.Communal.CtrllerBrand.Imaging:
                    break;

                case ProCommon.Communal.CtrllerBrand.MindVision:
                    ProDriver.Driver.CameraDriver_MindVision camdriver_mindvision = new ProDriver.Driver.CameraDriver_MindVision(cam);
                    ICamDriverable = (camdriver_mindvision as ProDriver.Driver.ICamDriver);
                    break;

                case ProCommon.Communal.CtrllerBrand.Basler:
                    ProDriver.Driver.CameraDriver_Basler camdriver_basler = new ProDriver.Driver.CameraDriver_Basler(cam);
                    ICamDriverable = (camdriver_basler as ProDriver.Driver.ICamDriver);
                    break;

                case ProCommon.Communal.CtrllerBrand.HikVision:
                    ProDriver.Driver.CameraDriver_HikVision camdriver_hikvision = new ProDriver.Driver.CameraDriver_HikVision(cam);
                    ICamDriverable = (camdriver_hikvision as ProDriver.Driver.ICamDriver);
                    break;

                case ProCommon.Communal.CtrllerBrand.DaHeng:
                    ProDriver.Driver.CameraDriver_DaHeng camdriver_DaHeng = new ProDriver.Driver.CameraDriver_DaHeng(cam);
                    ICamDriverable = (camdriver_DaHeng as ProDriver.Driver.ICamDriver);
                    break;

                case ProCommon.Communal.CtrllerBrand.DaHua:
                    ProDriver.Driver.CameraDriver_OPT cameraDriver_OPT = new Driver.CameraDriver_OPT(cam);
                    ICamDriverable = (cameraDriver_OPT as ProDriver.Driver.ICamDriver);
                    break;

                default:
                    break;
                }
            }
        }
예제 #2
0
        public CameraAPI(ProCommon.Communal.CameraProperty camProperty)
        {
            if (camProperty != null)
            {
                _cameraProperty = camProperty;
                switch (camProperty.Brand)
                {
                case ProCommon.Communal.DeviceBrand.Baumer:
                    break;

                case ProCommon.Communal.DeviceBrand.Dalsa:
                    break;

                case ProCommon.Communal.DeviceBrand.Imaging:
                    break;

                case ProCommon.Communal.DeviceBrand.MindVision:
                    ProDriver.Driver.CameraDriver_MindVision camdriver_mindvision = new ProDriver.Driver.CameraDriver_MindVision(camProperty);
                    ICameraDriverable = (camdriver_mindvision as ProDriver.Driver.ICameraDriver);
                    break;

                case ProCommon.Communal.DeviceBrand.Basler:
                    ProDriver.Driver.CameraDriver_Basler camdriver_basler = new ProDriver.Driver.CameraDriver_Basler(camProperty);
                    ICameraDriverable = (camdriver_basler as ProDriver.Driver.ICameraDriver);
                    break;

                case ProCommon.Communal.DeviceBrand.HikVision:
                    ProDriver.Driver.CameraDriver_HikVision camdriver_hikvision = new ProDriver.Driver.CameraDriver_HikVision(camProperty);
                    ICameraDriverable = (camdriver_hikvision as ProDriver.Driver.ICameraDriver);
                    break;

                case ProCommon.Communal.DeviceBrand.DaHua:
                    ProDriver.Driver.CameraDriver_DaHua camdriver_dahua = new ProDriver.Driver.CameraDriver_DaHua(camProperty);
                    ICameraDriverable = (camdriver_dahua as ProDriver.Driver.ICameraDriver);
                    break;

                default:
                    break;
                }
            }
        }