IDataProvider.cs 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. using GDNXFD.Data;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. namespace GDNXFD.Alert.Interpreter
  8. {
  9. /// <summary>
  10. /// 取测点的值
  11. /// </summary>
  12. public interface IDataProvider
  13. {
  14. /// <summary>
  15. /// 取数值型测点的值
  16. /// </summary>
  17. /// <param name="PointAI">统一编码</param>
  18. /// <param name="objectId">对象(风机)ID</param>
  19. /// <param name="objectType">对象类型:风机、风电场、变电所、电气等</param>
  20. /// <returns></returns>
  21. double FindAIValue(string PointAI, string objectId, AlertObjectType objectType, ref string dataInfo);
  22. /// <summary>
  23. /// 取布尔型测点的值
  24. /// </summary>
  25. /// <param name="PointDI">统一编码</param>
  26. /// <param name="objectId">对象(风机)ID</param>
  27. /// <param name="objectType">对象类型:风机、风电场、变电所、电气等</param>
  28. /// <returns></returns>
  29. bool FindDIValue(string PointDI, string objectId, AlertObjectType objectType, ref string dataInfo);
  30. /// <summary>
  31. /// 取数值型测点的历史值
  32. /// </summary>
  33. /// <param name="PointDI">统一编码</param>
  34. /// <param name="objectId">对象(风机)ID</param>
  35. /// <param name="objectType">对象类型:风机、风电场、变电所、电气等</param>
  36. /// <param name="duration">持续时间,从当前倒推</param>
  37. /// <param name="interval">抽样间隔,默认为60秒</param>
  38. /// <returns></returns>
  39. double[] FindAIHistorySnap(string PointAI, string objectId, AlertObjectType objectType, DateTime tStart, DateTime tEnd, int interval = 60);
  40. /// <summary>
  41. /// 取布尔型测点的历史值
  42. /// </summary>
  43. /// <param name="PointDI">统一编码</param>
  44. /// <param name="objectId">对象(风机)ID</param>
  45. /// <param name="objectType">对象类型:风机、风电场、变电所、电气等</param>
  46. /// <param name="duration">持续时间,从当前倒推</param>
  47. /// <param name="interval">抽样间隔,默认为60秒</param>
  48. /// <returns></returns>
  49. bool[] FindDIHistorySnap(string PointDI, string objectId, AlertObjectType objectType, DateTime tStart, DateTime tEnd, int interval = 60);
  50. /// <summary>
  51. /// 取测点历史原始值
  52. /// </summary>
  53. /// <param name="PointAI"></param>
  54. /// <param name="objectId"></param>
  55. /// <param name="objectType"></param>
  56. /// <param name="tStart"></param>
  57. /// <param name="tEnd"></param>
  58. /// <returns></returns>
  59. double[] FindHistoryRaw(string PointAI, string objectId, AlertObjectType objectType, DateTime tStart, DateTime tEnd);
  60. /// <summary>
  61. /// 取测点最新值的时间
  62. /// </summary>
  63. /// <param name="pointKey">测点</param>
  64. /// <param name="objectId">对象的ID</param>
  65. /// <param name="objectType">报警类型</param>
  66. /// <returns></returns>
  67. int GetLastUpdateTime(string pointKey, string objectId, AlertObjectType objectType, ref string dataInfo);
  68. }
  69. }