DataCacheService.cs
1.03 KB
using HHECS.DAQShared.Dto;
using HHECS.DAQShared.Models;
using System.Collections.Concurrent;
namespace HHECS.DAQServer.Services
{
public class DataCacheService
{
/// <summary>
/// 设备数据记录队列
/// </summary>
public ConcurrentQueue<EquipmentDataDto> EquipmentDataRecordQueue { get; set; } = new ConcurrentQueue<EquipmentDataDto>();
/// <summary>
/// 客户端状态缓存
/// </summary>
public ConcurrentDictionary<Guid, DateTime> ClientStatusDictionary { get; set; } = new ConcurrentDictionary<Guid, DateTime>();
/// <summary>
/// 设备状态缓存
/// </summary>
/// <remarks>Key:EquipmentCode,Value:<see cref="EquipmentDataDto"/></remarks>
public ConcurrentDictionary<string, EquipmentDataDto> EquipmentStatusDictionary { get; set; } = new ConcurrentDictionary<string, EquipmentDataDto>();
public ConcurrentQueue<TrafficRecord> TrafficRecords { get; set; } = new ConcurrentQueue<TrafficRecord>();
}
}