regularcycle_rate.h 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. #ifndef REGULARCYCLE_RATE_H
  2. #define REGULARCYCLE_RATE_H
  3. #include "tr_tool.h"
  4. #include <memory>
  5. class regularcycle_rate
  6. {
  7. public:
  8. regularcycle_rate();
  9. ~regularcycle_rate(){};
  10. /*
  11. * 初始化参数
  12. */
  13. void init();
  14. /*初始化采煤机有关正规循环率计算的先前参数
  15. * param
  16. * return
  17. * 函数正常执行返回0,否则返回1
  18. */
  19. int init_data_pre_coalmining_RegularCycle();
  20. /*初始化半刀未完成的正规循环率情况
  21. * param
  22. * return
  23. * 函数正常执行返回0,否则返回1
  24. */
  25. int init_restart_halfcoalmining_regularcycle();
  26. /*初始化采煤机有关正规循环率计算的中间参数
  27. * param
  28. * return
  29. * 函数正常执行返回0,否则返回1
  30. */
  31. int init_data_coalmining_RegularCycle(const std::string& face_id = "-1");
  32. void remove_data_coalmining_RegularCycle(int face_id);
  33. /*初始化综采面有关正规循环率计算的参数
  34. * param
  35. * return
  36. * 函数正常执行返回0,否则返回1
  37. */
  38. int init_data_coalminingface_RegularCycle(const std::string& face_id = "-1");
  39. void remove_data_coalminingface_RegularCycle(int face_id);
  40. /*获取采煤机的计划刀数
  41. * param
  42. * return
  43. * 函数正常执行返回0,否则返回1
  44. */
  45. int get_data_coalmining_scheduletimes(int workface_id,double& scheduletimes);
  46. /* 完成半刀,更新刀数值为0.5
  47. * param
  48. * reguilarCycle --- 采煤机0.5刀的参数
  49. * return
  50. * 函数正常执行返回0,否则返回1
  51. */
  52. int update_halfknife_coalmining_Regular_cycle(std::shared_ptr<CoalminingRegularCycleDetail> reguilarCycle );
  53. /*存储采煤机完成1刀的情况
  54. * param
  55. * reguilarCycle --- 采煤机1刀的参数
  56. * return
  57. * 函数正常执行返回0,否则返回1
  58. */
  59. int Update_data_coalmining_Regular_cycle ( std::shared_ptr<CoalminingRegularCycleDetail> reguilarCycle );
  60. /*存储挖煤机前半刀开始数据
  61. * param
  62. * reguilarCycle --- 采煤机1刀的参数
  63. * return
  64. * 函数正常执行返回0,否则返回1
  65. */
  66. int store_halfknife_coalmining_Regular_cycle(std::shared_ptr<CoalminingRegularCycleDetail> reguilarCycle );
  67. /*存储采煤机1刀开始的情况
  68. * param
  69. * reguilarCycle --- 采煤机1刀的参数
  70. * return
  71. * 函数正常执行返回0,否则返回1
  72. */
  73. int store_data_coalmining_Regular_cycle ( std::shared_ptr<CoalminingRegularCycleDetail> reguilarCycle );
  74. /*发送采煤机距离固定点距离(现在设置为机头)
  75. * param
  76. * vehicle_id --- 车ID
  77. * dis_record --- 过去一分钟记录的位置
  78. * return
  79. * 函数正常执行返回0,否则返回1
  80. */
  81. int store_data_coalmining_Pos(int workface_id, double dis_record);
  82. /*计算采煤机的正规循环率
  83. * param
  84. * card --- 车卡信息
  85. * return
  86. */
  87. void Calc_CoalMining_RegularCycleRate ( std::shared_ptr<coaldrivingface_card> card);
  88. private:
  89. CoalMiningRegularCycleMap m_coalmining_regularcycle_list;//挖煤机正规循环率计算中间值
  90. CoalMiningAreaMap m_coalmining_area_list;//综采面计算挖煤机正规循环率的参数
  91. };
  92. #endif