velodyne_manager_task.cpp 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. #include "velodyne_manager_task.h"
  2. Velodyne_manager_task::Velodyne_manager_task()
  3. {
  4. m_task_type = Task_type::VELODYNE_MANAGER_TASK;
  5. m_task_statu = TASK_CREATED;
  6. m_task_statu_information.clear();
  7. m_task_error_manager.error_manager_clear_all();
  8. m_terminal_id = 0;
  9. }
  10. Velodyne_manager_task::~Velodyne_manager_task()
  11. {
  12. }
  13. //初始化函数
  14. Error_manager Velodyne_manager_task::task_init(int terminal_id, std::chrono::system_clock::time_point command_time )
  15. {
  16. m_task_statu = TASK_CREATED;
  17. m_task_statu_information.clear();
  18. m_task_error_manager.error_manager_clear_all();
  19. m_terminal_id = terminal_id;
  20. m_command_time = command_time;
  21. return Error_code::SUCCESS;
  22. }
  23. Error_manager Velodyne_manager_task::task_init(Task_statu task_statu,
  24. std::string task_statu_information,
  25. void* p_tast_receiver,
  26. std::chrono::milliseconds task_over_time,
  27. int terminal_id,
  28. std::chrono::system_clock::time_point command_time
  29. )
  30. {
  31. m_task_statu = task_statu;
  32. m_task_statu_information = task_statu_information;
  33. mp_tast_receiver = p_tast_receiver;
  34. m_task_over_time = task_over_time;
  35. m_task_error_manager.error_manager_clear_all();
  36. m_terminal_id = terminal_id;
  37. m_command_time = command_time;
  38. return Error_code::SUCCESS;
  39. }
  40. int Velodyne_manager_task::get_terminal_id()
  41. {
  42. return m_terminal_id;
  43. }
  44. std::chrono::system_clock::time_point Velodyne_manager_task::get_command_time()
  45. {
  46. return m_command_time;
  47. }
  48. Common_data::Car_wheel_information Velodyne_manager_task::get_car_wheel_information()
  49. {
  50. return m_car_wheel_information;
  51. }
  52. void Velodyne_manager_task::set_car_wheel_information(Common_data::Car_wheel_information car_wheel_information)
  53. {
  54. m_car_wheel_information = car_wheel_information;
  55. }