forked from RobotWebTools/web_video_server
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add QoS profile query parameters (RobotWebTools#133)
- Loading branch information
Showing
7 changed files
with
78 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#pragma once | ||
|
||
#include <string> | ||
#include <optional> | ||
#include "rmw/qos_profiles.h" | ||
|
||
namespace web_video_server | ||
{ | ||
|
||
/** | ||
* @brief Gets a QoS profile given an input name, if valid. | ||
* @param name The name of the QoS profile name. | ||
* @return An optional containing the matching QoS profile. | ||
*/ | ||
std::optional < rmw_qos_profile_t > get_qos_profile_from_name(const std::string name); | ||
|
||
} // namespace web_video_server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#include "web_video_server/utils.h" | ||
|
||
namespace web_video_server | ||
{ | ||
|
||
std::optional<rmw_qos_profile_t> get_qos_profile_from_name(const std::string name) | ||
{ | ||
if (name == "default") { | ||
return rmw_qos_profile_default; | ||
} else if (name == "system_default") { | ||
return rmw_qos_profile_system_default; | ||
} else if (name == "sensor_data") { | ||
return rmw_qos_profile_sensor_data; | ||
} else { | ||
return std::nullopt; | ||
} | ||
} | ||
|
||
} // namespace web_video_server |