File tree Expand file tree Collapse file tree 4 files changed +11
-11
lines changed Expand file tree Collapse file tree 4 files changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -15,10 +15,10 @@ if(${ROS_VERSION} EQUAL 2)
1515
1616 find_package (ament_cmake REQUIRED)
1717
18+ find_package (fmt REQUIRED)
1819 find_package (mqtt_client_interfaces REQUIRED)
1920 find_package (rclcpp REQUIRED)
2021 find_package (std_msgs REQUIRED)
21- find_package (fmt REQUIRED)
2222
2323 # Paho MQTT C++ apt package doesn't include CMake config
2424 # find_package(PahoMqttCpp REQUIRED)
@@ -37,10 +37,10 @@ if(${ROS_VERSION} EQUAL 2)
3737 )
3838
3939 ament_target_dependencies(${PROJECT_NAME}
40+ fmt
4041 mqtt_client_interfaces
4142 rclcpp
4243 std_msgs
43- fmt
4444 )
4545
4646 install (TARGETS
@@ -84,9 +84,9 @@ elseif(${ROS_VERSION} EQUAL 1)
8484 mqtt_client_interfaces
8585 nodelet
8686 roscpp
87+ rosfmt ## For fmt::format.
8788 std_msgs
8889 topic_tools
89- rosfmt ## For fmt::format.
9090 )
9191
9292 ## System dependencies are found with CMake's conventions
Original file line number Diff line number Diff line change @@ -31,12 +31,12 @@ SOFTWARE.
3131#include < map>
3232#include < memory>
3333#include < string>
34- #include < rosfmt/full.h> // fmt::format, fmt::join
3534
36- #include < mqtt/async_client.h>
3735#include < mqtt_client_interfaces/IsConnected.h>
36+ #include < mqtt/async_client.h>
3837#include < nodelet/nodelet.h>
3938#include < ros/ros.h>
39+ #include < rosfmt/full.h> // fmt::format, fmt::join
4040#include < topic_tools/shape_shifter.h>
4141
4242
@@ -364,7 +364,7 @@ class MqttClient : public nodelet::Nodelet,
364364 std::filesystem::path certificate; // /< client certificate
365365 std::filesystem::path key; // /< client private keyfile
366366 std::string password; // /< decryption password for private key
367- int version; // /< TLS version
367+ int version; // /< TLS version (https://github.com/eclipse/paho.mqtt.cpp/blob/master/src/mqtt/ssl_options.h#L305)
368368 bool verify; // /< Verify the client should conduct
369369 // /< post-connect checks
370370 std::vector<std::string> alpn_protos; // /< list of ALPN protocols
Original file line number Diff line number Diff line change @@ -31,11 +31,11 @@ SOFTWARE.
3131#include < map>
3232#include < memory>
3333#include < string>
34+
3435#define FMT_HEADER_ONLY
3536#include < fmt/format.h>
36-
37- #include < mqtt/async_client.h>
3837#include < mqtt_client_interfaces/srv/is_connected.hpp>
38+ #include < mqtt/async_client.h>
3939#include < rclcpp/rclcpp.hpp>
4040#include < rclcpp/serialization.hpp>
4141#include < std_msgs/msg/float64.hpp>
@@ -356,7 +356,7 @@ class MqttClient : public rclcpp::Node,
356356 std::filesystem::path certificate; // /< client certificate
357357 std::filesystem::path key; // /< client private keyfile
358358 std::string password; // /< decryption password for private key
359- int version; // /< TLS version
359+ int version; // /< TLS version (https://github.com/eclipse/paho.mqtt.cpp/blob/master/src/mqtt/ssl_options.h#L305)
360360 bool verify; // /< Verify the client should conduct
361361 // /< post-connect checks
362362 std::vector<std::string> alpn_protos; // /< list of ALPN protocols
Original file line number Diff line number Diff line change 2323
2424 <!-- ROS2 -->
2525 <buildtool_depend condition =" $ROS_VERSION == 2" >ament_cmake</buildtool_depend >
26+ <depend condition =" $ROS_VERSION == 2" >fmt</depend >
2627 <depend condition =" $ROS_VERSION == 2" >libpaho-mqtt-dev</depend >
2728 <depend condition =" $ROS_VERSION == 2" >libpaho-mqttpp-dev</depend >
2829 <depend condition =" $ROS_VERSION == 2" >rclcpp</depend >
2930 <depend condition =" $ROS_VERSION == 2" >rcpputils</depend >
30- <depend condition =" $ROS_VERSION == 2" >fmt</depend >
3131
3232 <!-- ROS1 -->
3333 <buildtool_depend condition =" $ROS_VERSION == 1" >catkin</buildtool_depend >
3434 <depend condition =" $ROS_VERSION == 1" >nodelet</depend >
3535 <depend condition =" $ROS_VERSION == 1" >paho-mqtt-cpp</depend >
3636 <depend condition =" $ROS_VERSION == 1" >roscpp</depend >
37- <depend condition =" $ROS_VERSION == 1" >topic_tools</depend >
3837 <depend condition =" $ROS_VERSION == 1" >rosfmt</depend > <!-- Needed for fmt library. -->
38+ <depend condition =" $ROS_VERSION == 1" >topic_tools</depend >
3939
4040 <export >
4141 <build_type condition =" $ROS_VERSION == 1" >catkin</build_type >
You can’t perform that action at this time.
0 commit comments