Beispiel #1
0
        public void Start(WdaqRequest request)
        {
            _request     = request;
            _currentFile = _wdaqFileService.StartNewRecord(request);

            _thread = new Thread(ReadFromPort);
            _thread.Start();
        }
Beispiel #2
0
        public string StartNewRecord(WdaqRequest request)
        {
            var fileName = $"{DateTime.Now:yyyy.MM.dd.HH.mm.ss}.wdaqs.{request.PortNumber}.json";

            var setting = _settingService.LoadSetting();

            var path = $"{setting.RunFolder}\\{fileName}";

            System.IO.File.WriteAllText(path, string.Empty);

            _logService.Log(LogEventLevel.Information, "started a new run file: {file}", path);

            return(path);
        }