Пример #1
0
        public override void Start()
        {
            logger.Log("Started: {0}", ToString());

            CameraImagerSvc service = new CameraImagerSvc(logger, this);

            serviceHost = new SafeServiceHost(logger, typeof(ISmartCamContract), service, this, Constants.AjaxSuffix, moduleInfo.BaseURL());
            serviceHost.Open();

            appServer = new WebFileServer(moduleInfo.BinaryDir(), moduleInfo.BaseURL(), logger);

            this.imagesDir     = moduleInfo.WorkingDir() + "\\" + IMAGE_SUB_DIR_NAME;
            this.imagesBaseUrl = moduleInfo.BaseURL() + "/" + IMAGE_SUB_DIR_NAME;

            recordingServer = new WebFileServer(imagesDir, imagesBaseUrl, logger);

            logger.Log("camera service is open for business at " + moduleInfo.BaseURL());

            //..... get the list of current ports from the platform
            IList <VPort> allPortsList = GetAllPortsFromPlatform();

            if (allPortsList != null)
            {
                foreach (VPort port in allPortsList)
                {
                    PortRegistered(port);
                }
            }
        }
Пример #2
0
        public override void Start()
        {
            logger.Log("Started: {0}", ToString());

            CameraImagerSvc service = new CameraImagerSvc(logger, this);
            serviceHost = new SafeServiceHost(logger, typeof(ISmartCamContract), service, this, Constants.AjaxSuffix, moduleInfo.BaseURL());
            serviceHost.Open();

            appServer = new WebFileServer(moduleInfo.BinaryDir(), moduleInfo.BaseURL(), logger);

            this.videosDir = moduleInfo.WorkingDir() + "\\" + VIDEO_SUB_DIR_NAME;
            this.videosBaseUrl = moduleInfo.BaseURL() + "/" + VIDEO_SUB_DIR_NAME;

            recordingServer = new WebFileServer(videosDir, videosBaseUrl, logger);

            logger.Log("camera service is open for business at " + moduleInfo.BaseURL());

            //..... get the list of current ports from the platform
            IList<VPort> allPortsList = GetAllPortsFromPlatform();

            if (allPortsList != null)
            {
                foreach (VPort port in allPortsList)
                {
                    PortRegistered(port);
                }
            }
        }