奥特QT DDS 插件库
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

27 行
527B

  1. #include "dds_manager.hpp"
  2. #include <QDebug>
  3. DDSManager::DDSManager(QObject *parent)
  4. : QObject(parent)
  5. , publisher_(std::make_unique<HelloWorldPublisher>())
  6. {
  7. }
  8. DDSManager::~DDSManager() = default;
  9. bool DDSManager::init()
  10. {
  11. return publisher_->init();
  12. }
  13. void DDSManager::publishOnce()
  14. {
  15. if (publisher_->publish())
  16. {
  17. emit messagePublished(
  18. QString::fromStdString(publisher_->getCurrentMessage()),
  19. publisher_->getCurrentIndex()
  20. );
  21. }
  22. }