forked from ros2/rclcpp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* ros2GH-23 Get all topics from node and sanitize * ros2GH-23 Move methods to node for better interface * ros2GH-23 Use rmw_serialized_message_t consistently * ros2GH-23 Improve santization of topics * ros2GH-65 Introduce and use better logging macros * ros2GH-23 Use publisher to serialized message directly * ros2GH-23 Improve readability of sanitizing topics and types * ros2GH-23 Allow to write all available topics * ros2GH-23 Add test for record all * ros2GH-23 Cleanup: add missing const ref to record interface * Cleanup for doxygen * Improve topic sanitization - correctly expand topic names using rcl - do not check type correctness (supposed to be done internally) * Pass topic_name by reference
- Loading branch information
1 parent
52d5ab3
commit 3b23acc
Showing
19 changed files
with
651 additions
and
295 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
// Copyright 2018, Bosch Software Innovations GmbH. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
#ifndef ROSBAG2__LOGGING_HPP_ | ||
#define ROSBAG2__LOGGING_HPP_ | ||
|
||
#include <sstream> | ||
#include <string> | ||
|
||
#include "rcutils/logging_macros.h" | ||
|
||
#define ROSBAG2_PACKAGE_NAME "rosbag2" | ||
|
||
#define ROSBAG2_LOG_INFO(...) \ | ||
RCUTILS_LOG_INFO_NAMED(ROSBAG2_PACKAGE_NAME, __VA_ARGS__) | ||
|
||
#define ROSBAG2_LOG_INFO_STREAM(args) do { \ | ||
std::stringstream __ss; \ | ||
__ss << args; \ | ||
RCUTILS_LOG_INFO_NAMED(ROSBAG2_PACKAGE_NAME, __ss.str().c_str()); \ | ||
} while (0) | ||
|
||
#define ROSBAG2_LOG_ERROR(...) \ | ||
RCUTILS_LOG_ERROR_NAMED(ROSBAG2_PACKAGE_NAME, __VA_ARGS__) | ||
|
||
#define ROSBAG2_LOG_ERROR_STREAM(args) do { \ | ||
std::stringstream __ss; \ | ||
__ss << args; \ | ||
RCUTILS_LOG_ERROR_NAMED(ROSBAG2_PACKAGE_NAME, __ss.str().c_str()); \ | ||
} while (0) | ||
|
||
#define ROSBAG2_LOG_WARN(...) \ | ||
RCUTILS_LOG_WARN_NAMED(ROSBAG2_PACKAGE_NAME, __VA_ARGS__) | ||
|
||
#define ROSBAG2_LOG_WARN_STREAM(args) do { \ | ||
std::stringstream __ss; \ | ||
__ss << args; \ | ||
RCUTILS_LOG_WARN_NAMED(ROSBAG2_PACKAGE_NAME, __ss.str().c_str()); \ | ||
} while (0) | ||
|
||
#define ROSBAG2_LOG_DEBUG(...) \ | ||
RCUTILS_LOG_DEBUG_NAMED(ROSBAG2_PACKAGE_NAME, __VA_ARGS__) | ||
|
||
#define ROSBAG2_LOG_DEBUG_STREAM(args) do { \ | ||
std::stringstream __ss; \ | ||
__ss << args; \ | ||
RCUTILS_LOG_DEBUG_NAMED(ROSBAG2_PACKAGE_NAME, __ss.str().c_str()); \ | ||
} while (0) | ||
|
||
#endif // ROSBAG2__LOGGING_HPP_ |
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
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
Oops, something went wrong.