using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace JiShe.CollectBus.IoTDBProvider { /// /// 设备路径构建器 /// public static class DevicePathBuilder { /// /// 构建设备路径,由于路径的层级约束规范不能是纯数字字符,所以需要做特殊处理。 /// /// /// /// public static string GetDeviceId(T entity) where T : IoTEntity { return $"root.{entity.SystemName.ToLower()}.`{entity.ProjectCode}`.`{entity.DeviceId}`"; } /// /// 获取表名称 /// /// /// /// public static string GetTableName() where T : IoTEntity { var type = typeof(T); return $"{type.Name.ToLower()}"; } } }