예제 #1
0
        public override void Start()
        {
            logger.Log("Started: {0}", ToString());

            SmartCamSvc service = new SmartCamSvc(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);
                }
            }
        }
예제 #2
0
        public override void Start()
        {
            logger.Log("Started: {0}", ToString());

            SmartCamSvc service = new SmartCamSvc(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);
                }
            }
        }