Skip to content

Commit

Permalink
Fix parameter block naming
Browse files Browse the repository at this point in the history
  • Loading branch information
Sascha Wirges committed Jun 22, 2020
1 parent ea3c2d0 commit a5f1583
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
8 changes: 4 additions & 4 deletions include/rosinterface_handler/simple_node_status.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ class SimpleNodeStatus {

//! Lightweight way to set or report a new status. The status remains until overwritten by a new status.
template <typename Arg, typename... Args>
void set(NodeStatus s, const Arg& arg, const Args&... args) {
void set(NodeStatus s, const Arg& arg, const Args&... Args_) {
bool modified = false;
{
std::lock_guard<std::mutex> g{statusMutex_};
Status newStatus{s, asString(arg, args...)};
Status newStatus{s, asString(arg, Args_...)};
modified = status_ != newStatus;
status_ = newStatus;
}
Expand All @@ -60,9 +60,9 @@ class SimpleNodeStatus {
//! Add/overwrite extra information about the status in form of key/value pairs. The information will be shared
//! along with the overall node status. It remains until explicitly cleared or overwritten.
template <typename Arg, typename... Args>
void info(const std::string& name, const Arg& arg, const Args&... args) {
void info(const std::string& name, const Arg& arg, const Args&... Args_) {
std::lock_guard<std::mutex> g{statusMutex_};
extraInfo_[name] = asString(arg, args...);
extraInfo_[name] = asString(arg, Args_...);
}

//! Clears previously set information. Returns true on success.
Expand Down
4 changes: 2 additions & 2 deletions include/rosinterface_handler/utilities.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -309,10 +309,10 @@ inline void testMax(const std::string key, std::map<K, T>& val, T max = std::num
/// \param args Additional arguments (optional)
/// \return
template <typename Arg, typename... Args>
inline std::string asString(Arg&& arg, Args&&... args) {
inline std::string asString(Arg&& arg, Args&&... Args_) {
std::ostringstream oss;
oss << std::forward<Arg>(arg);
(oss << ... << std::forward<Args>(args));
(oss << ... << std::forward<Args>(Args_));
return oss.str();
}

Expand Down
20 changes: 10 additions & 10 deletions templates/Interface.h.template
Original file line number Diff line number Diff line change
Expand Up @@ -122,36 +122,36 @@ $string_representation;
/// \brief logs to the debug output. Works also within nodelets.
// NOLINTNEXTLINE(readability-function-size)
template <typename Msg, typename... Msgs>
inline void logDebug(const Msg& msg, const Msgs&... msgs) const {
ROS_DEBUG_STREAM_NAMED(nodeNameWithNamespace(), rosinterface_handler::asString(msg, msgs...));
inline void logDebug(const Msg& msg, const Msgs&... Msgs_) const {
ROS_DEBUG_STREAM_NAMED(nodeNameWithNamespace(), rosinterface_handler::asString(msg, Msgs_...));
}

/// \brief logs to the debug output. Works also within nodelets. Output is throttled.
// NOLINTNEXTLINE(readability-function-size)
template <typename Msg, typename... Msgs>
inline void logInfo(const Msg& msg, const Msgs&... msgs) const {
ROS_INFO_STREAM_THROTTLE_NAMED(5, nodeNameWithNamespace(), rosinterface_handler::asString(msg, msgs...));
inline void logInfo(const Msg& msg, const Msgs&... Msgs_) const {
ROS_INFO_STREAM_THROTTLE_NAMED(5, nodeNameWithNamespace(), rosinterface_handler::asString(msg, Msgs_...));
}

/// \brief logs to the debug output. Works also within nodelets. Output is throttled.
// NOLINTNEXTLINE(readability-function-size)
template <typename Msg, typename... Msgs>
inline void logWarn(const Msg& msg, const Msgs&... msgs) const {
ROS_WARN_STREAM_THROTTLE_NAMED(5, nodeNameWithNamespace(), rosinterface_handler::asString(msg, msgs...));
inline void logWarn(const Msg& msg, const Msgs&... Msgs_) const {
ROS_WARN_STREAM_THROTTLE_NAMED(5, nodeNameWithNamespace(), rosinterface_handler::asString(msg, Msgs_...));
}

/// \brief logs to the error output. Works also within nodelets. Output is throttled.
// NOLINTNEXTLINE(readability-function-size)
template <typename Msg, typename... Msgs>
inline void logError(const Msg& msg, const Msgs&... msgs) const {
ROS_ERROR_STREAM_THROTTLE_NAMED(5, nodeNameWithNamespace(), rosinterface_handler::asString(msg, msgs...));
inline void logError(const Msg& msg, const Msgs&... Msgs_) const {
ROS_ERROR_STREAM_THROTTLE_NAMED(5, nodeNameWithNamespace(), rosinterface_handler::asString(msg, Msgs_...));
}

/// \brief logs to the error output. Works also within nodelets. Not throttled! Dont call this in loops!
// NOLINTNEXTLINE(readability-function-size)
template <typename Msg, typename... Msgs>
inline void logErrorDirect(const Msg& msg, const Msgs&... msgs) const {
ROS_ERROR_STREAM_NAMED(nodeNameWithNamespace(), rosinterface_handler::asString(msg, msgs...));
inline void logErrorDirect(const Msg& msg, const Msgs&... Msgs_) const {
ROS_ERROR_STREAM_NAMED(nodeNameWithNamespace(), rosinterface_handler::asString(msg, Msgs_...));
}

/// \brief logs subscribed and advertised topics to the command line. Works also within nodelets.
Expand Down

0 comments on commit a5f1583

Please sign in to comment.