gtdatasource.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. //
  2. // Created by lloyd on 2020/9/28.
  3. //
  4. #ifndef GTCVR_GTDATASOURCE_H
  5. #define GTCVR_GTDATASOURCE_H
  6. #include <stdint-gcc.h>
  7. #include "DataMapping/dgns_gtbaseparam.h"
  8. #include "DataMapping/dgns_gtstandard.h"
  9. class gtdatasource {
  10. public:
  11. //double **gtformatedata;
  12. //int sgtpointnum;
  13. //double N;
  14. //double S;
  15. //std::string gtprocdate;
  16. public:
  17. std::vector<std::vector<double>> getGTTest();
  18. void getGTFromModbus(dgns_gtbaseparam *gt_data);
  19. void get_std_gt(dgns_gtbaseparam &gt_data, std::string sgtprodate);
  20. /**
  21. * 瑞飞modbus 接口回写工况
  22. * @param gk_name_CH 工况中文名称(已配置的)
  23. * @return 是否写入成功
  24. */
  25. bool send_gtcvr_out_content_to_modbuscode_rf(std::string gk_name_CH);
  26. /**
  27. * 瑞飞modbus 接口回写单张功图所示液量
  28. * @param liqproc 计算出的24h产能 t
  29. * @param gtnumdaily 一天内功图数量
  30. * @return
  31. */
  32. bool send_gtaoid_out_singlegtproc_to_modbuscode_rf(double liqproc, int gtnumdaily);
  33. private:
  34. bool write_gtcvr_out_content_to_modbus_tcp_server(uint16_t buff);
  35. /**
  36. * 标准工况类型编码后内容输入到modbus server
  37. * @param buff 工况既定标准输出编码数组
  38. * @param buffnum 个数
  39. * @return
  40. */
  41. bool write_gtcvr_out_content_to_modbus_tcp_server(uint16_t *buff, unsigned int buffnum);
  42. bool write_gtaoid_out_singlegtproc_to_modbus_tcp_server(uint16_t buff);
  43. };
  44. #endif //GTCVR_GTDATASOURCE_H