Skip to content
Merged
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
2 changes: 2 additions & 0 deletions ros2cli/ros2cli/daemon/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ def main(*, script_name='_ros2_daemon', argv=None):
_print_invoked_function_name(node.get_namespace))
server.register_function(
_print_invoked_function_name(node.get_node_names_and_namespaces))
server.register_function(
_print_invoked_function_name(node.get_node_names_and_namespaces_with_enclaves))
server.register_function(
_print_invoked_function_name(node.get_topic_names_and_types))
server.register_function(
Expand Down
6 changes: 6 additions & 0 deletions ros2cli/test/test_daemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

TEST_NODE_NAME = 'test_node'
TEST_NODE_NAMESPACE = '/test'
TEST_NODE_ENCLAVE = '/'
TEST_TOPIC_NAME = '/test/topic'
TEST_TOPIC_TYPE = 'test_msgs/msg/Empty'
TEST_TOPIC_PUBLISHER_QOS = rclpy.qos.QoSProfile(
Expand Down Expand Up @@ -124,6 +125,11 @@ def test_get_node_names_and_namespaces(daemon_node):
assert [TEST_NODE_NAME, TEST_NODE_NAMESPACE] in node_names_and_namespaces


def test_get_node_names_and_namespaces_with_enclaves(daemon_node):
node_names_and_namespaces = daemon_node.get_node_names_and_namespaces_with_enclaves()
assert [TEST_NODE_NAME, TEST_NODE_NAMESPACE, TEST_NODE_ENCLAVE] in node_names_and_namespaces


def test_get_topic_names_and_types(daemon_node):
topic_names_and_types = daemon_node.get_topic_names_and_types()
assert [TEST_TOPIC_NAME, [TEST_TOPIC_TYPE]] in topic_names_and_types
Expand Down