|
- using System.Collections.Concurrent;
-
- namespace BPASmartClient.DATABUS
- {
- /// <summary>
- /// 数据总线
- /// </summary>
- public class Class_DataBus
- {
- #region 单例模式
- public static Class_DataBus dataBus = null;
-
- public static Class_DataBus GetInstance()
- {
- if (dataBus == null)
- {
- dataBus = new Class_DataBus();
- }
- return dataBus;
- }
- #endregion
-
- #region 基础配置
-
- #endregion
-
- #region 实时数据->大数据量
- /// <summary>
- /// 设备数据
- /// </summary>
- public ConcurrentDictionary<string, Dictionary<string,DeviceDataModel>> Dic_DeviceData = new ConcurrentDictionary<string,Dictionary<string,DeviceDataModel>>();
- /// <summary>
- /// API数据
- /// </summary>
- public ConcurrentDictionary<string,string> Dic_APIData = new ConcurrentDictionary<string,string>();
- #endregion
- }
-
-
- public class DeviceDataModel
- {
- public string VarName { get; set; }
- public string VarVaule { get; set; }
- public string DataType { get; set; }
-
- }
-
- }
|