コード例 #1
0
        public DeviceDescriptor ConnectCamera(string endpoint)
        {
            var camera = new PanonoCamera();

            camera.Init(endpoint);
            Log.Debug("Camera found at " + endpoint);
            camera.DeviceName   = "Panono";
            camera.Manufacturer = "Panono";
            DeviceDescriptor descriptor = new DeviceDescriptor
            {
                WpdId        = "PanonoCamera",
                CameraDevice = camera
            };

            //cameraDevice.SerialNumber = StaticHelper.GetSerial(portableDevice.DeviceId);
            return(descriptor);
            //ws://192.168.80.80:42345/
        }
コード例 #2
0
        public DeviceDescriptor Connect(string address)
        {
            PanonoDiscovery cameraDiscover = new PanonoDiscovery();

            if (cameraDiscover.UDPSocketSetup())
            {
                if (cameraDiscover.MSearch())
                {
                    var camera = new PanonoCamera();
                    camera.Init(cameraDiscover.EndPoint);
                    camera.DeviceName = "Panono";
                    DeviceDescriptor descriptor = new DeviceDescriptor
                    {
                        WpdId        = "PanonoCamera",
                        CameraDevice = camera
                    };
                    //cameraDevice.SerialNumber = StaticHelper.GetSerial(portableDevice.DeviceId);
                    return(descriptor);
                }
            }
            throw new Exception("No camera was found !");
        }