Пример #1
0
        public void Init(string baseUrl, string baseDir, ScoutViewOfPlatform platform, VLogger logger)
        {
            this.baseUrl = baseUrl;
            this.platform = platform;
            this.logger = logger;

            scoutService = new ArduinoScoutService(baseUrl + "/webapp", this, platform, logger);

            appServer = new WebFileServer(baseDir, baseUrl, logger);

            //create a time that fires ScanNow() periodically
            //var scanTimer = new Timer(ScoutHelper.DefaultDeviceDiscoveryPeriodSec * 1000);
            //scanTimer.Enabled = true;
            //scanTimer.Elapsed += new ElapsedEventHandler(ScanNow);

            ScanNow(null, null);

            logger.Log("ArduinoScout initialized");
        }
Пример #2
0
        public void Init(string baseUrl, string baseDir, ScoutViewOfPlatform platform, VLogger logger)
        {
            this.baseUrl  = baseUrl;
            this.platform = platform;
            this.logger   = logger;

            scoutService = new ArduinoScoutService(baseUrl + "/webapp", this, platform, logger);

            appServer = new WebFileServer(baseDir, baseUrl, logger);

            //create a time that fires ScanNow() periodically
            //var scanTimer = new Timer(ScoutHelper.DefaultDeviceDiscoveryPeriodSec * 1000);
            //scanTimer.Enabled = true;
            //scanTimer.Elapsed += new ElapsedEventHandler(ScanNow);

            ScanNow(null, null);

            logger.Log("ArduinoScout initialized");
        }