-
워터폴 그래프 BDT 데이터 수집 예제 함수업무용 소스 예제 2021. 10. 4. 11:58728x90반응형728x90
- 워터폴 그래프 BDT 데이터 수집 예제 함수
private void TaskAcquisitionBDTDatas(ushort unType) { try { while (_closed) { Thread.Sleep(100); DateTime dt = _dt_taskMainBDT[unType - 1]; TimeSpan ts = _ts_taskMainBDT[unType - 1].Value; if ((DateTime.Now - dt).TotalMilliseconds >= ts.TotalMilliseconds) { _dt_taskMainBDT[unType - 1] = DateTime.Now; AcquisitionBDTDatas(unType, DataManagerUnit1.dic_BDTInfos, false); switch (unType) { case 1: if (DataManagerUnit1.BDTSystemInfo.unSensorIndex[0].Equals(0)) { if (DataManagerUnit1.BDTSystemInfo.unSensorIndex[1].Equals(13)) { if (DataManagerUnit1.dic_BDTInfos.ContainsKey(1)) { Action act = delegate { MainWaterfall.DrawWaterfall(DataManagerUnit1.dic_BDTInfos[1]); }; MainWaterfall.Dispatcher.Invoke(DispatcherPriority.Loaded, act); act = null; } else { Action act = delegate { MainWaterfall.ClearWaterfall(); }; MainWaterfall.Dispatcher.Invoke(DispatcherPriority.Loaded, act); act = null; } } } break; case 2: if (DataManagerUnit1.BDTSystemInfo.unSensorIndex[0].Equals(1)) { if (DataManagerUnit1.BDTSystemInfo.unSensorIndex[1].Equals(13)) { if (DataManagerUnit1.dic_BDTInfos.ContainsKey(2)) { Action act = delegate { MainWaterfall.DrawWaterfall(DataManagerUnit1.dic_BDTInfos[2]); }; MainWaterfall.Dispatcher.Invoke(DispatcherPriority.Loaded, act); act = null; } else { Action act = delegate { MainWaterfall.ClearWaterfall(); }; MainWaterfall.Dispatcher.Invoke(DispatcherPriority.Loaded, act); act = null; } } } break; case 3: if (DataManagerUnit1.BDTSystemInfo.unSensorIndex[0].Equals(4)) { if (DataManagerUnit1.BDTSystemInfo.unSensorIndex[1].Equals(13)) { if (DataManagerUnit1.dic_BDTInfos.ContainsKey(3)) { Action act = delegate { MainWaterfall.DrawWaterfall(DataManagerUnit1.dic_BDTInfos[3]); }; MainWaterfall.Dispatcher.Invoke(DispatcherPriority.Loaded, act); act = null; } else { Action act = delegate { MainWaterfall.ClearWaterfall(); }; MainWaterfall.Dispatcher.Invoke(DispatcherPriority.Loaded, act); act = null; } } } break; case 4: if (DataManagerUnit1.BDTSystemInfo.unSensorIndex[0].Equals(5)) { if (DataManagerUnit1.BDTSystemInfo.unSensorIndex[1].Equals(13)) { if (DataManagerUnit1.dic_BDTInfos.ContainsKey(4)) { Action act = delegate { MainWaterfall.DrawWaterfall(DataManagerUnit1.dic_BDTInfos[4]); }; MainWaterfall.Dispatcher.Invoke(DispatcherPriority.Loaded, act); act = null; } else { Action act = delegate { MainWaterfall.ClearWaterfall(); }; MainWaterfall.Dispatcher.Invoke(DispatcherPriority.Loaded, act); act = null; } } } break; case 5: if (DataManagerUnit1.BDTSystemInfo.unSensorIndex[0].Equals(10)) { if (DataManagerUnit1.BDTSystemInfo.unSensorIndex[1].Equals(13)) { if (DataManagerUnit1.dic_BDTInfos.ContainsKey(5)) { Action act = delegate { MainWaterfall.DrawWaterfall(DataManagerUnit1.dic_BDTInfos[5]); }; MainWaterfall.Dispatcher.Invoke(DispatcherPriority.Loaded, act); act = null; } else { Action act = delegate { MainWaterfall.ClearWaterfall(); }; MainWaterfall.Dispatcher.Invoke(DispatcherPriority.Loaded, act); act = null; } } } break; } } } } catch (Exception ee) { TraceManager.AddLog(string.Format("{0}r\n{1}", ee.StackTrace, ee.Message)); System.Diagnostics.Debug.WriteLine(string.Format("{0}r\n{1}", ee.StackTrace, ee.Message)); } }
728x90반응형'업무용 소스 예제' 카테고리의 다른 글
펄스 정보 전시용 함수 예제 소스 (3) 2021.10.16 C# 시간 변경 함수 예제 (2) 2021.10.10 TMGR Make SubBearing Info Process 예제 (1) 2021.09.23 시스템 상태 알람 경보 Set 예제 (2) 2021.09.17 gridScheduleView_DoubleClick 그리드 더블클릭 시 처리 예제 (3) 2021.09.11