Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
tmp/
build/
build-*/

*.so
*.a
*.tmp
3 changes: 0 additions & 3 deletions dynmsg/include/dynmsg/string_utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,10 @@

#include <string>

extern "C"
{
/// Convert a std::string (8-bit characters) to a std::u16string (16-bit characters).
std::u16string string_to_u16string(const std::string & input);

/// Convert a std::u16string (16-bit characters) to a std::string (8-bit characters).
std::string u16string_to_string(const std::u16string & input);
} // extern "C"

#endif // DYNMSG__STRING_UTILS_HPP_
2 changes: 1 addition & 1 deletion dynmsg/include/dynmsg/typesupport.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ using MemberInfo = MemberInfo_C;
using RosMessage = RosMessage_C;

typedef const rosidl_message_type_support_t * (* get_message_ts_func)();
} // extern "C"

// An interface type can be identified by its namespace (i.e. the package that stores it) and its
// type name
using InterfaceTypeName = std::pair<std::string, std::string>;
} // extern "C"

namespace dynmsg
{
Expand Down
6 changes: 3 additions & 3 deletions dynmsg/src/message_reading_cpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -396,9 +396,9 @@ dynamic_array_to_yaml_impl_bool(
{
DYNMSG_DEBUG(std::cout << "DEBUG: dynamic_array_to_yaml_impl_bool" << std::endl);
static_cast<void>(member_info);
for (size_t ii = 0; ii < v->size(); ++ii) {
DYNMSG_DEBUG(std::cout << (v->operator[](ii) ? "true" : "false") << ", ");
array_node.push_back(v->operator[](ii));
for (const bool val : (*v)) {
DYNMSG_DEBUG(std::cout << (val ? "true" : "false") << ", ");
array_node.push_back(val);
}
DYNMSG_DEBUG(std::cout << std::endl);
}
Expand Down
4 changes: 1 addition & 3 deletions dynmsg_demo/include/dynmsg_demo/typesupport_utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
#include "rcl/node.h"
#include "rcl/types.h"

extern "C"
{
// Get the type name of an existing topic.
// The topic must be being published or subscribed to by at least one node. If it is not, then the
// topic will not exist and so no type information will be retrievable.
Expand All @@ -45,5 +43,5 @@ InterfaceTypeName get_topic_type_from_string_type(const std::string & type);
// interface type. This pointer is returned. It can be passed to functions such as
// rcl_subscription_init().
const TypeSupport * get_type_support(const InterfaceTypeName & interface_type);
} // extern "C"

#endif // DYNMSG_DEMO__TYPESUPPORT_UTILS_HPP_
4 changes: 2 additions & 2 deletions dynmsg_demo/src/cli_tool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ echo_topic(
if (count > 0) {
break;
}
sleep(0.25);
usleep(250000);
}

bool taken = false;
Expand Down Expand Up @@ -364,7 +364,7 @@ main(int argc, char ** argv)
return 1;
}
} catch (const std::runtime_error & e) {
RCUTILS_LOG_ERROR_NAMED("cli-tool", e.what());
RCUTILS_LOG_ERROR_NAMED("cli-tool", "Runtime error caught while dispatching command");
return 1;
}

Expand Down