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.

59 lines
1.4 KiB

2 years ago
5 months ago
2 years ago
5 months ago
2 years ago
5 months ago
5 months ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
5 months ago
2 years ago
5 months ago
5 months ago
2 years ago
2 years ago
1 year ago
2 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 "iflytop/components/iflytop_front_end_service/iflytop_front_end_service.hpp"
  15. // #include "iflytop/components/restful_server/restful_server.hpp"
  16. // #include "iflytop/core/components/jobs/work_queue.hpp"
  17. // #include "iflytop/core/components/timer/simple_timer.hpp"
  18. // #include "iflytop/core/spdlogfactory/logger.hpp"
  19. // #include "iflytop/components/iflytop_front_end_service/iflytop_front_end_service.hpp"
  20. // #include "iflytoplinuxsdk/src/iflytop/core/components/zservice_container/zservice_container.hpp"
  21. //
  22. #include "components/zservice_container/zservice_container.hpp"
  23. #include "configs/gconfig.hpp"
  24. #include "ixwebsocket/IXWebSocketServer.h"
  25. #include "spdlogfactory/logger.hpp"
  26. #include "components/zcanreceiver/zcanreceiverhost.hpp"
  27. //
  28. //
  29. #include <mutex>
  30. /**
  31. * @brief
  32. *
  33. * service:
  34. *
  35. */
  36. namespace iflytop {
  37. using namespace std;
  38. using namespace core;
  39. class ExtAPIService {
  40. ENABLE_LOGGER(ExtAPIService);
  41. shared_ptr<GConfig> m_zconfig;
  42. shared_ptr<ix::WebSocketServer> m_canPassthroughServer; // 19003
  43. shared_ptr<ZCanReceiverHost> m_zcanreceiverhost;
  44. public:
  45. ExtAPIService() {};
  46. void initialize(string can_if_name, int baudrate);
  47. private:
  48. void initCanPassthroughServer();
  49. };
  50. } // namespace iflytop