yolo_seg_mqtt_async.h 976 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #pragma once
  2. #include <pcl/point_types.h>
  3. #include <pcl/point_cloud.h>
  4. #include "pahoc/mqtt_async.h"
  5. #include "tool/log.hpp"
  6. #include "net_message_trans.h"
  7. #ifdef ENABLE_TENSORRT_DETECT
  8. #include "detect/tensorrt_detect/wheel-detector.h"
  9. #else
  10. #include "detect/onnx_detect/wheel-detector.h"
  11. #endif
  12. #include "communication/data_buf_lable.hpp"
  13. class YoloSegmentMqttAsyncClient : public MqttAsyncClient {
  14. friend class MqttAsyncClient;
  15. public:
  16. static YoloSegmentMqttAsyncClient *iter() {
  17. static YoloSegmentMqttAsyncClient *instance = nullptr;
  18. if (instance == nullptr) {
  19. instance = new YoloSegmentMqttAsyncClient();
  20. }
  21. return instance;
  22. }
  23. void init(const std::string &file);
  24. protected:
  25. private:
  26. YoloSegmentMqttAsyncClient() = default;
  27. static int CloudDataArrived(void *client, char *topicName, int topicLen, MQTTAsync_message *message);
  28. public:
  29. TensorrtWheelDetector *detector = nullptr;
  30. private:
  31. };