You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

63 lines
1.4 KiB

3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
  1. //
  2. // Created by zwsd
  3. //
  4. #pragma once
  5. #include <fstream>
  6. #include <iostream>
  7. #include <list>
  8. #include <map>
  9. #include <memory>
  10. #include <set>
  11. #include <sstream>
  12. #include <string>
  13. #include <vector>
  14. #include "configs/gconfig.hpp"
  15. #include "iflytopcpp/core/spdlogfactory/logger.hpp"
  16. //
  17. #include "configs/gconfig.hpp"
  18. #include "zservice_container/zservice_container.hpp"
  19. //
  20. #include "configs/gconfig.hpp"
  21. #include "iflytopcpp/core/components/jobs/work_queue.hpp"
  22. #include "iflytopcpp/core/components/timer/simple_timer.hpp"
  23. #include "zlinuxcomponents/alsaplayer/smart_soundbox_player.hpp"
  24. #include "zlinuxcomponents/iflytop_can_protocol_stack/iflytop_can_protocol_controler.hpp"
  25. #include "zlinuxcomponents/iflytop_can_protocol_stack/basic/iflytop_virtual_can_slave.hpp"
  26. /**
  27. * @brief
  28. *
  29. * service: MainControlService
  30. *
  31. * :
  32. * :
  33. * :
  34. * :
  35. *
  36. */
  37. namespace iflytop {
  38. using namespace std;
  39. using namespace core;
  40. class MainControlService : public enable_shared_from_this<MainControlService> {
  41. ENABLE_LOGGER(MainControlService);
  42. shared_ptr<GConfig> m_zconfig;
  43. shared_ptr<IflytopCanProtocolControler> iflytopCanProtocolControler;
  44. public:
  45. MainControlService(){};
  46. void initialize();
  47. private:
  48. void dosystem(string order, bool dump) {
  49. if (dump) logger->info("do:{}", order);
  50. system(order.c_str());
  51. }
  52. void localVirtualCanSlaveInitialize();
  53. };
  54. } // namespace iflytop