终端一体化运控平台
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 

65 satır
1.8 KiB

  1. using System;
  2. using System.Collections.Concurrent;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. namespace BPASmartClient.SCADAControl
  8. {
  9. /// <summary>
  10. /// 数据总线
  11. /// </summary>
  12. public class Class_DataBus
  13. {
  14. #region 单例模式
  15. public static Class_DataBus dataBus = null;
  16. public static Class_DataBus GetInstance()
  17. {
  18. if (dataBus == null)
  19. {
  20. dataBus = new Class_DataBus();
  21. }
  22. return dataBus;
  23. }
  24. #endregion
  25. #region 基础配置
  26. #endregion
  27. #region 实时数据->大数据量
  28. public EventHandler BindingAction { get; set; }
  29. /// <summary>
  30. /// 绑定数据
  31. /// </summary>
  32. public Dictionary<string, object> Dic_RedisDataBinding = new Dictionary<string, object>();
  33. /// <summary>
  34. /// 刷新数据
  35. /// </summary>
  36. /// <param name="Name"></param>
  37. public void refreshDataAction(string Name)
  38. {
  39. BindingAction?.Invoke(Name, null);
  40. }
  41. /// <summary>
  42. /// 缓存Redis数据
  43. /// </summary>
  44. public ConcurrentDictionary<string, Dictionary<string, object>> Dic_RedisData = new ConcurrentDictionary<string, Dictionary<string, object>>();
  45. /// <summary>
  46. /// 缓存Redis数据相关类型
  47. /// </summary>
  48. public ConcurrentDictionary<string, Dictionary<string, string>> Dic_RedisDataType = new ConcurrentDictionary<string, Dictionary<string, string>>();
  49. /// <summary>
  50. /// API数据
  51. /// </summary>
  52. public ConcurrentDictionary<string, string> Dic_APIData = new ConcurrentDictionary<string, string>();
  53. #endregion
  54. #region 配置数据
  55. #endregion
  56. }
  57. }