three_rates.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. #ifndef THREE_RATES_H
  2. #define THREE_RATES_H
  3. #include "struct_def.h"
  4. #include"memory"
  5. class three_rates
  6. {
  7. public:
  8. // Constructor
  9. three_rates(){}
  10. // Destructor
  11. virtual ~three_rates(){}
  12. /*
  13. * Functon: Init the three_rates module
  14. * Parameters:
  15. * init_param& para - in&out, three_rates parameters
  16. * Returns: void
  17. * Throws: void
  18. */
  19. virtual void init(const init_para& para, const db_para& dpara ) = 0;
  20. /*
  21. * Functon: Start the three_rates module
  22. * Parameters: void
  23. * Returns: void
  24. * Throws: void
  25. */
  26. virtual void start() = 0;
  27. /*
  28. * Functon: Stop the three_rates module
  29. * Parameters: void
  30. * Returns: void
  31. * Throws: void
  32. */
  33. virtual void stop() = 0;
  34. /*
  35. * Functon: Input the located datas
  36. * Parameters:
  37. * card_pos& pos - in, position informations
  38. * Returns: void
  39. * Throws: void
  40. */
  41. virtual void put(const card_pos& pos) = 0;
  42. /*
  43. * Functon: Enter one area
  44. * Parameters:
  45. * card_pos& pos - in, the located datas
  46. * area_data& area - in, the area informations
  47. * Returns: void
  48. * Throws: void
  49. */
  50. virtual void enter_area(std::shared_ptr<card_pos> &card_ptr, std::shared_ptr<area_data> &area_ptr) = 0;
  51. /*
  52. * Functon: Leave one area
  53. * Parameters:
  54. * card_pos& pos - in, the located datas
  55. * area_data& area - in, the area informations
  56. * Returns: void
  57. * Throws: void
  58. */
  59. virtual void leave_area(std::shared_ptr<card_pos> &card_ptr, std::shared_ptr<area_data> &area_ptr) = 0;
  60. /*
  61. * 获取掘进机或者采煤机的开机状态
  62. */
  63. virtual bool GetVehicleState(int vehicleId) = 0;
  64. /*
  65. * Functon: WEB通知数据有更新
  66. * Parameters:
  67. * std::string webname, - in, 更新表名
  68. * std::string param - in, 更新表内容(id)
  69. * Returns: void
  70. * Throws: void
  71. */
  72. virtual void update_db_data(const std::string& webname, const std::string& param, int edit_type_id)=0;
  73. static three_rates* get_instance();
  74. };
  75. #endif