From 6b0438f4b07e0b0467bb558a37a9b9cad7e1ae59 Mon Sep 17 00:00:00 2001 From: Antonio Cuadros Date: Wed, 3 Nov 2021 08:52:40 +0100 Subject: [PATCH 1/2] Update domain id API --- e2studio_project_freeRTOS/src/net_thread_entry.c | 12 +++++++----- .../client_tests/CustomTypeIntrospection.c | 12 +++++++----- .../client_tests/Domain.c | 10 ++++++---- .../client_tests/EntitiesQoS.c | 11 ++++++----- .../client_tests/EntityCreation.c | 10 ++++++---- .../client_tests/EntityDestruction.c | 10 ++++++---- .../client_tests/MultiplePublisherProfiling.c | 12 +++++++----- .../client_tests/Parameters.c | 12 +++++++----- .../client_tests/Ping.c | 14 ++++++++------ .../client_tests/Publisher.c | 14 ++++++++------ .../client_tests/PublisherContinousFragment.c | 15 +++++++++------ .../client_tests/PublisherRate.c | 14 ++++++++------ .../client_tests/RTT.c | 15 +++++++++------ .../client_tests/ServiceClient.c | 14 ++++++++------ .../client_tests/ServiceServer.c | 14 ++++++++------ .../client_tests/SinglePublisherProfiling.c | 14 ++++++++------ .../client_tests/Subscriber.c | 14 ++++++++------ .../client_tests/Throughput.c | 15 +++++++++------ .../client_tests/TimeSync.c | 12 +++++++----- 19 files changed, 142 insertions(+), 102 deletions(-) diff --git a/e2studio_project_freeRTOS/src/net_thread_entry.c b/e2studio_project_freeRTOS/src/net_thread_entry.c index 661ec4ca..b7f4e846 100644 --- a/e2studio_project_freeRTOS/src/net_thread_entry.c +++ b/e2studio_project_freeRTOS/src/net_thread_entry.c @@ -132,13 +132,15 @@ void send_micro_ros_profiling_data(void) //create init_options rclc_support_t support; - rclc_support_init(&support, 0, NULL, &allocator); - // create nodes + rcl_init_options_t init_options = rcl_get_zero_initialized_init_options(); + rcl_init_options_init(&init_options, allocator); + rcl_init_options_set_domain_id(&init_options, DOMAIN_ID); + rclc_support_init_with_options(&support, 0, NULL, &init_options, &allocator); + + // create node rcl_node_t node; - rcl_node_options_t node_ops = rcl_node_get_default_options(); - node_ops.domain_id = (size_t)(DOMAIN_ID); - rclc_node_init_with_options(&node, "profiling_node", "", &support, &node_ops); + rclc_node_init_default(&node, "profiling_node", "", &support); // create publisher rcl_publisher_t publisher; diff --git a/test/micro_ros_renesas_testbench/client_tests/CustomTypeIntrospection.c b/test/micro_ros_renesas_testbench/client_tests/CustomTypeIntrospection.c index de03cdaf..3755c336 100644 --- a/test/micro_ros_renesas_testbench/client_tests/CustomTypeIntrospection.c +++ b/test/micro_ros_renesas_testbench/client_tests/CustomTypeIntrospection.c @@ -19,13 +19,15 @@ void microros_app(void) //create init_options rclc_support_t support; - rclc_support_init(&support, 0, NULL, &allocator); - // create nodes + rcl_init_options_t init_options = rcl_get_zero_initialized_init_options(); + rcl_init_options_init(&init_options, allocator); + rcl_init_options_set_domain_id(&init_options, DOMAIN_ID); + rclc_support_init_with_options(&support, 0, NULL, &init_options, &allocator); + + // create node rcl_node_t node; - rcl_node_options_t node_ops = rcl_node_get_default_options(); - node_ops.domain_id = (size_t)(DOMAIN_ID); - rclc_node_init_with_options(&node, "test_node", "", &support, &node_ops); + rclc_node_init_default(&node, "test_node", "", &support); // create publisher rcl_publisher_t publisher; diff --git a/test/micro_ros_renesas_testbench/client_tests/Domain.c b/test/micro_ros_renesas_testbench/client_tests/Domain.c index a4253924..d667f43e 100644 --- a/test/micro_ros_renesas_testbench/client_tests/Domain.c +++ b/test/micro_ros_renesas_testbench/client_tests/Domain.c @@ -36,13 +36,15 @@ void microros_app(void) //create init_options rclc_support_t support; - rclc_support_init(&support, 0, NULL, &allocator); + + rcl_init_options_t init_options = rcl_get_zero_initialized_init_options(); + rcl_init_options_init(&init_options, allocator); + rcl_init_options_set_domain_id(&init_options, DOMAIN_ID); + rclc_support_init_with_options(&support, 0, NULL, &init_options, &allocator); // create node rcl_node_t node; - rcl_node_options_t node_ops = rcl_node_get_default_options(); - node_ops.domain_id = (size_t)(DOMAIN_ID); - rclc_node_init_with_options(&node, "test_node", "", &support, &node_ops); + rclc_node_init_default(&node, "test_node", "", &support); // create publisher rclc_publisher_init_default( diff --git a/test/micro_ros_renesas_testbench/client_tests/EntitiesQoS.c b/test/micro_ros_renesas_testbench/client_tests/EntitiesQoS.c index 78731407..033c04b2 100644 --- a/test/micro_ros_renesas_testbench/client_tests/EntitiesQoS.c +++ b/test/micro_ros_renesas_testbench/client_tests/EntitiesQoS.c @@ -16,14 +16,15 @@ void microros_app(void) //create init_options rclc_support_t support; - rclc_support_init(&support, 0, NULL, &allocator); + + rcl_init_options_t init_options = rcl_get_zero_initialized_init_options(); + rcl_init_options_init(&init_options, allocator); + rcl_init_options_set_domain_id(&init_options, DOMAIN_ID); + rclc_support_init_with_options(&support, 0, NULL, &init_options, &allocator); // create node rcl_node_t node; - rcl_node_options_t node_ops = rcl_node_get_default_options(); - node_ops.domain_id = (size_t)(DOMAIN_ID); - rclc_node_init_with_options(&node, "test_node", "", &support, &node_ops); - + rclc_node_init_default(&node, "test_node", "", &support); // create publisher reliable rcl_publisher_t publisher_reliable; diff --git a/test/micro_ros_renesas_testbench/client_tests/EntityCreation.c b/test/micro_ros_renesas_testbench/client_tests/EntityCreation.c index af6bcef9..cf107921 100644 --- a/test/micro_ros_renesas_testbench/client_tests/EntityCreation.c +++ b/test/micro_ros_renesas_testbench/client_tests/EntityCreation.c @@ -18,7 +18,11 @@ void microros_app(void) //create init_options rclc_support_t support; - rclc_support_init(&support, 0, NULL, &allocator); + + rcl_init_options_t init_options = rcl_get_zero_initialized_init_options(); + rcl_init_options_init(&init_options, allocator); + rcl_init_options_set_domain_id(&init_options, DOMAIN_ID); + rclc_support_init_with_options(&support, 0, NULL, &init_options, &allocator); // create nodes rcl_node_t nodes[ENTITY_NUMBER]; @@ -29,9 +33,7 @@ void microros_app(void) snprintf(buf_namespace, 100, "ns_%d", i); // create node - rcl_node_options_t node_ops = rcl_node_get_default_options(); - node_ops.domain_id = (size_t)(DOMAIN_ID); - rclc_node_init_with_options(&nodes[i], buf_name, buf_namespace, &support, &node_ops); + rclc_node_init_default(&nodes[i], buf_name, buf_namespace, &support); } // create publishers diff --git a/test/micro_ros_renesas_testbench/client_tests/EntityDestruction.c b/test/micro_ros_renesas_testbench/client_tests/EntityDestruction.c index b0863829..4e3aaa2c 100644 --- a/test/micro_ros_renesas_testbench/client_tests/EntityDestruction.c +++ b/test/micro_ros_renesas_testbench/client_tests/EntityDestruction.c @@ -31,7 +31,11 @@ void microros_app(void) //create init_options rclc_support_t support; - rclc_support_init(&support, 0, NULL, &allocator); + + rcl_init_options_t init_options = rcl_get_zero_initialized_init_options(); + rcl_init_options_init(&init_options, allocator); + rcl_init_options_set_domain_id(&init_options, DOMAIN_ID); + rclc_support_init_with_options(&support, 0, NULL, &init_options, &allocator); // create nodes for(size_t i = 0; i < ENTITY_NUMBER; i++){ @@ -41,9 +45,7 @@ void microros_app(void) snprintf(buf_namespace, 100, "ns_%d", i); // create node - rcl_node_options_t node_ops = rcl_node_get_default_options(); - node_ops.domain_id = (size_t)(DOMAIN_ID); - rclc_node_init_with_options(&nodes[i], buf_name, buf_namespace, &support, &node_ops); + rclc_node_init_default(&nodes[i], buf_name, buf_namespace, &support); } // create publishers diff --git a/test/micro_ros_renesas_testbench/client_tests/MultiplePublisherProfiling.c b/test/micro_ros_renesas_testbench/client_tests/MultiplePublisherProfiling.c index fb685e18..5c7dbe2e 100644 --- a/test/micro_ros_renesas_testbench/client_tests/MultiplePublisherProfiling.c +++ b/test/micro_ros_renesas_testbench/client_tests/MultiplePublisherProfiling.c @@ -27,13 +27,15 @@ void microros_app(void) //create init_options rclc_support_t support; - rclc_support_init(&support, 0, NULL, &allocator); - // create nodes + rcl_init_options_t init_options = rcl_get_zero_initialized_init_options(); + rcl_init_options_init(&init_options, allocator); + rcl_init_options_set_domain_id(&init_options, DOMAIN_ID); + rclc_support_init_with_options(&support, 0, NULL, &init_options, &allocator); + + // create node rcl_node_t node; - rcl_node_options_t node_ops = rcl_node_get_default_options(); - node_ops.domain_id = (size_t)(DOMAIN_ID); - rclc_node_init_with_options(&node, "test_node", "", &support, &node_ops); + rclc_node_init_default(&node, "test_node", "", &support); // create publishers rcl_publisher_t publishers[ENTITY_NUMBER]; diff --git a/test/micro_ros_renesas_testbench/client_tests/Parameters.c b/test/micro_ros_renesas_testbench/client_tests/Parameters.c index cd5f1432..01568f64 100644 --- a/test/micro_ros_renesas_testbench/client_tests/Parameters.c +++ b/test/micro_ros_renesas_testbench/client_tests/Parameters.c @@ -16,13 +16,15 @@ void microros_app(void) //create init_options rclc_support_t support; - rclc_support_init(&support, 0, NULL, &allocator); - // create nodes + rcl_init_options_t init_options = rcl_get_zero_initialized_init_options(); + rcl_init_options_init(&init_options, allocator); + rcl_init_options_set_domain_id(&init_options, DOMAIN_ID); + rclc_support_init_with_options(&support, 0, NULL, &init_options, &allocator); + + // create node rcl_node_t node; - rcl_node_options_t node_ops = rcl_node_get_default_options(); - node_ops.domain_id = (size_t)(DOMAIN_ID); - rclc_node_init_with_options(&node, "test_node", "", &support, &node_ops); + rclc_node_init_default(&node, "test_node", "", &support); // Create parameter service rclc_parameter_server_t param_server; diff --git a/test/micro_ros_renesas_testbench/client_tests/Ping.c b/test/micro_ros_renesas_testbench/client_tests/Ping.c index edff21a0..2a767ffc 100644 --- a/test/micro_ros_renesas_testbench/client_tests/Ping.c +++ b/test/micro_ros_renesas_testbench/client_tests/Ping.c @@ -17,15 +17,17 @@ void microros_app(void) // micro-ROS app rcl_allocator_t allocator = rcl_get_default_allocator(); - // create init_options + // Create init_options rclc_support_t support; - rclc_support_init(&support, 0, NULL, &allocator); - // create node + rcl_init_options_t init_options = rcl_get_zero_initialized_init_options(); + rcl_init_options_init(&init_options, allocator); + rcl_init_options_set_domain_id(&init_options, DOMAIN_ID); + rclc_support_init_with_options(&support, 0, NULL, &init_options, &allocator); + + // Create node rcl_node_t node; - rcl_node_options_t node_ops = rcl_node_get_default_options(); - node_ops.domain_id = (size_t)(DOMAIN_ID); - rclc_node_init_with_options(&node, "test_node_ping", "", &support, &node_ops); + rclc_node_init_default(&node, "test_node_ping", "", &support); // create publisher rcl_publisher_t publisher; diff --git a/test/micro_ros_renesas_testbench/client_tests/Publisher.c b/test/micro_ros_renesas_testbench/client_tests/Publisher.c index 8058f2ce..8e83c38d 100644 --- a/test/micro_ros_renesas_testbench/client_tests/Publisher.c +++ b/test/micro_ros_renesas_testbench/client_tests/Publisher.c @@ -14,15 +14,17 @@ void microros_app(void) { rcl_allocator_t allocator = rcl_get_default_allocator(); - //create init_options + // Create init_options rclc_support_t support; - rclc_support_init(&support, 0, NULL, &allocator); - // create nodes + rcl_init_options_t init_options = rcl_get_zero_initialized_init_options(); + rcl_init_options_init(&init_options, allocator); + rcl_init_options_set_domain_id(&init_options, DOMAIN_ID); + rclc_support_init_with_options(&support, 0, NULL, &init_options, &allocator); + + // Create node rcl_node_t node; - rcl_node_options_t node_ops = rcl_node_get_default_options(); - node_ops.domain_id = (size_t)(DOMAIN_ID); - rclc_node_init_with_options(&node, "test_node", "", &support, &node_ops); + rclc_node_init_default(&node, "test_node", "", &support); // create publisher rcl_publisher_t publisher; diff --git a/test/micro_ros_renesas_testbench/client_tests/PublisherContinousFragment.c b/test/micro_ros_renesas_testbench/client_tests/PublisherContinousFragment.c index 34f11918..5c1d29ca 100644 --- a/test/micro_ros_renesas_testbench/client_tests/PublisherContinousFragment.c +++ b/test/micro_ros_renesas_testbench/client_tests/PublisherContinousFragment.c @@ -20,14 +20,17 @@ void microros_app(void) { rcl_allocator_t allocator = rcl_get_default_allocator(); + // Create init_options rclc_support_t support; - rclc_support_init(&support, 0, NULL, &allocator); - // create node - rcl_node_t node; - rcl_node_options_t node_ops = rcl_node_get_default_options(); - node_ops.domain_id = (size_t)(DOMAIN_ID); - rclc_node_init_with_options(&node, "char_long_sequence_publisher_rcl", "", &support, &node_ops); + rcl_init_options_t init_options = rcl_get_zero_initialized_init_options(); + rcl_init_options_init(&init_options, allocator); + rcl_init_options_set_domain_id(&init_options, DOMAIN_ID); + rclc_support_init_with_options(&support, 0, NULL, &init_options, &allocator); + + // Create node + rcl_node_t node; + rclc_node_init_default(&node, "char_long_sequence_publisher_rcl", "", &support); // create publisher rcl_publisher_t publisher; diff --git a/test/micro_ros_renesas_testbench/client_tests/PublisherRate.c b/test/micro_ros_renesas_testbench/client_tests/PublisherRate.c index f6931fb0..adb28080 100644 --- a/test/micro_ros_renesas_testbench/client_tests/PublisherRate.c +++ b/test/micro_ros_renesas_testbench/client_tests/PublisherRate.c @@ -33,15 +33,17 @@ void microros_app(void) // micro-ROS app rcl_allocator_t allocator = rcl_get_default_allocator(); - // create init_options + // Create init_options rclc_support_t support; - rclc_support_init(&support, 0, NULL, &allocator); - // create node + rcl_init_options_t init_options = rcl_get_zero_initialized_init_options(); + rcl_init_options_init(&init_options, allocator); + rcl_init_options_set_domain_id(&init_options, DOMAIN_ID); + rclc_support_init_with_options(&support, 0, NULL, &init_options, &allocator); + + // Create node rcl_node_t node; - rcl_node_options_t node_ops = rcl_node_get_default_options(); - node_ops.domain_id = (size_t)(DOMAIN_ID); - rclc_node_init_with_options(&node, "test_node", "", &support, &node_ops); + rclc_node_init_default(&node, "test_node", "", &support); // create publisher rclc_publisher_init_best_effort( diff --git a/test/micro_ros_renesas_testbench/client_tests/RTT.c b/test/micro_ros_renesas_testbench/client_tests/RTT.c index 1119c673..43548df7 100644 --- a/test/micro_ros_renesas_testbench/client_tests/RTT.c +++ b/test/micro_ros_renesas_testbench/client_tests/RTT.c @@ -34,14 +34,17 @@ void microros_app(void) { rcl_allocator_t allocator = rcl_get_default_allocator(); + // Create init_options rclc_support_t support; - rclc_support_init(&support, 0, NULL, &allocator); - // Create node - rcl_node_t node; - rcl_node_options_t node_ops = rcl_node_get_default_options(); - node_ops.domain_id = (size_t)(DOMAIN_ID); - rclc_node_init_with_options(&node, "test_node", "", &support, &node_ops); + rcl_init_options_t init_options = rcl_get_zero_initialized_init_options(); + rcl_init_options_init(&init_options, allocator); + rcl_init_options_set_domain_id(&init_options, DOMAIN_ID); + rclc_support_init_with_options(&support, 0, NULL, &init_options, &allocator); + + // Create node + rcl_node_t node; + rclc_node_init_default(&node, "test_node", "", &support); // Create publisher rclc_publisher_init_default( diff --git a/test/micro_ros_renesas_testbench/client_tests/ServiceClient.c b/test/micro_ros_renesas_testbench/client_tests/ServiceClient.c index 3577c792..4ef6cd87 100644 --- a/test/micro_ros_renesas_testbench/client_tests/ServiceClient.c +++ b/test/micro_ros_renesas_testbench/client_tests/ServiceClient.c @@ -26,15 +26,17 @@ void microros_app(void) { rcl_allocator_t allocator = rcl_get_default_allocator(); - //create init_options + // Create init_options rclc_support_t support; - rclc_support_init(&support, 0, NULL, &allocator); - // create node + rcl_init_options_t init_options = rcl_get_zero_initialized_init_options(); + rcl_init_options_init(&init_options, allocator); + rcl_init_options_set_domain_id(&init_options, DOMAIN_ID); + rclc_support_init_with_options(&support, 0, NULL, &init_options, &allocator); + + // Create node rcl_node_t node; - rcl_node_options_t node_ops = rcl_node_get_default_options(); - node_ops.domain_id = (size_t)(DOMAIN_ID); - rclc_node_init_with_options(&node, "test_node", "", &support, &node_ops); + rclc_node_init_default(&node, "test_node", "", &support); // create publisher rclc_publisher_init_default( diff --git a/test/micro_ros_renesas_testbench/client_tests/ServiceServer.c b/test/micro_ros_renesas_testbench/client_tests/ServiceServer.c index dc76d2d7..bad0d7bb 100644 --- a/test/micro_ros_renesas_testbench/client_tests/ServiceServer.c +++ b/test/micro_ros_renesas_testbench/client_tests/ServiceServer.c @@ -22,15 +22,17 @@ void microros_app(void) { rcl_allocator_t allocator = rcl_get_default_allocator(); - //create init_options + // Create init_options rclc_support_t support; - rclc_support_init(&support, 0, NULL, &allocator); - // create node + rcl_init_options_t init_options = rcl_get_zero_initialized_init_options(); + rcl_init_options_init(&init_options, allocator); + rcl_init_options_set_domain_id(&init_options, DOMAIN_ID); + rclc_support_init_with_options(&support, 0, NULL, &init_options, &allocator); + + // Create node rcl_node_t node; - rcl_node_options_t node_ops = rcl_node_get_default_options(); - node_ops.domain_id = (size_t)(DOMAIN_ID); - rclc_node_init_with_options(&node, "test_node", "", &support, &node_ops); + rclc_node_init_default(&node, "test_node", "", &support); // create service rcl_service_t service; diff --git a/test/micro_ros_renesas_testbench/client_tests/SinglePublisherProfiling.c b/test/micro_ros_renesas_testbench/client_tests/SinglePublisherProfiling.c index 0bf1dbd5..84ed5cac 100644 --- a/test/micro_ros_renesas_testbench/client_tests/SinglePublisherProfiling.c +++ b/test/micro_ros_renesas_testbench/client_tests/SinglePublisherProfiling.c @@ -23,15 +23,17 @@ void microros_app(void) { rcl_allocator_t allocator = rcl_get_default_allocator(); - //create init_options + // Create init_options rclc_support_t support; - rclc_support_init(&support, 0, NULL, &allocator); - // create nodes + rcl_init_options_t init_options = rcl_get_zero_initialized_init_options(); + rcl_init_options_init(&init_options, allocator); + rcl_init_options_set_domain_id(&init_options, DOMAIN_ID); + rclc_support_init_with_options(&support, 0, NULL, &init_options, &allocator); + + // Create node rcl_node_t node; - rcl_node_options_t node_ops = rcl_node_get_default_options(); - node_ops.domain_id = (size_t)(DOMAIN_ID); - rclc_node_init_with_options(&node, "test_node", "", &support, &node_ops); + rclc_node_init_default(&node, "test_node", "", &support); // create publisher rcl_publisher_t publisher; diff --git a/test/micro_ros_renesas_testbench/client_tests/Subscriber.c b/test/micro_ros_renesas_testbench/client_tests/Subscriber.c index 38ed38f5..788089aa 100644 --- a/test/micro_ros_renesas_testbench/client_tests/Subscriber.c +++ b/test/micro_ros_renesas_testbench/client_tests/Subscriber.c @@ -26,15 +26,17 @@ void microros_app(void) { rcl_allocator_t allocator = rcl_get_default_allocator(); - //create init_options + // create init_options rclc_support_t support; - rclc_support_init(&support, 0, NULL, &allocator); - // create nodes + rcl_init_options_t init_options = rcl_get_zero_initialized_init_options(); + rcl_init_options_init(&init_options, allocator); + rcl_init_options_set_domain_id(&init_options, DOMAIN_ID); + rclc_support_init_with_options(&support, 0, NULL, &init_options, &allocator); + + // create node rcl_node_t node; - rcl_node_options_t node_ops = rcl_node_get_default_options(); - node_ops.domain_id = (size_t)(DOMAIN_ID); - rclc_node_init_with_options(&node, "test_node", "", &support, &node_ops); + rclc_node_init_default(&node, "test_node", "", &support); // create publisher rclc_publisher_init_default( diff --git a/test/micro_ros_renesas_testbench/client_tests/Throughput.c b/test/micro_ros_renesas_testbench/client_tests/Throughput.c index 9048d107..186fe663 100644 --- a/test/micro_ros_renesas_testbench/client_tests/Throughput.c +++ b/test/micro_ros_renesas_testbench/client_tests/Throughput.c @@ -20,14 +20,17 @@ void microros_app(void) { rcl_allocator_t allocator = rcl_get_default_allocator(); + // Create init_options rclc_support_t support; - rclc_support_init(&support, 0, NULL, &allocator); - // create node - rcl_node_t node; - rcl_node_options_t node_ops = rcl_node_get_default_options(); - node_ops.domain_id = (size_t)(DOMAIN_ID); - rclc_node_init_with_options(&node, "test_node", "", &support, &node_ops); + rcl_init_options_t init_options = rcl_get_zero_initialized_init_options(); + rcl_init_options_init(&init_options, allocator); + rcl_init_options_set_domain_id(&init_options, DOMAIN_ID); + rclc_support_init_with_options(&support, 0, NULL, &init_options, &allocator); + + // Create node + rcl_node_t node; + rclc_node_init_default(&node, "test_node", "", &support); // create publisher rcl_publisher_t publisher; diff --git a/test/micro_ros_renesas_testbench/client_tests/TimeSync.c b/test/micro_ros_renesas_testbench/client_tests/TimeSync.c index e4325d38..c4ae4e60 100644 --- a/test/micro_ros_renesas_testbench/client_tests/TimeSync.c +++ b/test/micro_ros_renesas_testbench/client_tests/TimeSync.c @@ -17,13 +17,15 @@ void microros_app(void) //create init_options rclc_support_t support; - rclc_support_init(&support, 0, NULL, &allocator); - // create nodes + rcl_init_options_t init_options = rcl_get_zero_initialized_init_options(); + rcl_init_options_init(&init_options, allocator); + rcl_init_options_set_domain_id(&init_options, DOMAIN_ID); + rclc_support_init_with_options(&support, 0, NULL, &init_options, &allocator); + + // create node rcl_node_t node; - rcl_node_options_t node_ops = rcl_node_get_default_options(); - node_ops.domain_id = (size_t)(DOMAIN_ID); - rclc_node_init_with_options(&node, "test_node", "", &support, &node_ops); + rclc_node_init_default(&node, "test_node", "", &support); // create publisher rcl_publisher_t publisher; From 302607e8d34f0c43918d1b4a310c4aaff88cc9ef Mon Sep 17 00:00:00 2001 From: Pablo Garrido Date: Wed, 3 Nov 2021 10:42:03 +0100 Subject: [PATCH 2/2] Convert indentation to spaces --- .../client_tests/ComplexSubscriber.c | 12 ++-- .../client_tests/CustomTypeIntrospection.c | 12 ++-- .../client_tests/Domain.c | 70 +++++++++---------- .../client_tests/EntitiesQoS.c | 12 ++-- .../client_tests/EntityCreation.c | 10 +-- .../client_tests/EntityDestruction.c | 10 +-- .../client_tests/MultiplePublisherProfiling.c | 12 ++-- .../client_tests/Parameters.c | 14 ++-- .../client_tests/Ping.c | 12 ++-- .../client_tests/Publisher.c | 12 ++-- .../client_tests/PublisherContinousFragment.c | 12 ++-- .../client_tests/PublisherRate.c | 12 ++-- .../client_tests/RTT.c | 12 ++-- .../client_tests/ServiceClient.c | 12 ++-- .../client_tests/SinglePublisherProfiling.c | 12 ++-- .../client_tests/Subscriber.c | 12 ++-- .../client_tests/Throughput.c | 12 ++-- .../client_tests/TimeSync.c | 12 ++-- 18 files changed, 136 insertions(+), 136 deletions(-) diff --git a/test/micro_ros_renesas_testbench/client_tests/ComplexSubscriber.c b/test/micro_ros_renesas_testbench/client_tests/ComplexSubscriber.c index b050d8a1..c99a2872 100644 --- a/test/micro_ros_renesas_testbench/client_tests/ComplexSubscriber.c +++ b/test/micro_ros_renesas_testbench/client_tests/ComplexSubscriber.c @@ -44,13 +44,13 @@ void microros_app(void) //create init_options rclc_support_t support; - rcl_init_options_t init_options = rcl_get_zero_initialized_init_options(); - rcl_init_options_init(&init_options, allocator); - rcl_init_options_set_domain_id(&init_options, DOMAIN_ID); - rclc_support_init_with_options(&support, 0, NULL, &init_options, &allocator); + rcl_init_options_t init_options = rcl_get_zero_initialized_init_options(); + rcl_init_options_init(&init_options, allocator); + rcl_init_options_set_domain_id(&init_options, DOMAIN_ID); + rclc_support_init_with_options(&support, 0, NULL, &init_options, &allocator); - // create node - rcl_node_t node; + // create node + rcl_node_t node; rclc_node_init_default(&node, "test_node", "", &support); // create publisher diff --git a/test/micro_ros_renesas_testbench/client_tests/CustomTypeIntrospection.c b/test/micro_ros_renesas_testbench/client_tests/CustomTypeIntrospection.c index 3755c336..d1a6aaf3 100644 --- a/test/micro_ros_renesas_testbench/client_tests/CustomTypeIntrospection.c +++ b/test/micro_ros_renesas_testbench/client_tests/CustomTypeIntrospection.c @@ -20,13 +20,13 @@ void microros_app(void) //create init_options rclc_support_t support; - rcl_init_options_t init_options = rcl_get_zero_initialized_init_options(); - rcl_init_options_init(&init_options, allocator); - rcl_init_options_set_domain_id(&init_options, DOMAIN_ID); - rclc_support_init_with_options(&support, 0, NULL, &init_options, &allocator); + rcl_init_options_t init_options = rcl_get_zero_initialized_init_options(); + rcl_init_options_init(&init_options, allocator); + rcl_init_options_set_domain_id(&init_options, DOMAIN_ID); + rclc_support_init_with_options(&support, 0, NULL, &init_options, &allocator); - // create node - rcl_node_t node; + // create node + rcl_node_t node; rclc_node_init_default(&node, "test_node", "", &support); // create publisher diff --git a/test/micro_ros_renesas_testbench/client_tests/Domain.c b/test/micro_ros_renesas_testbench/client_tests/Domain.c index d667f43e..6331aa47 100644 --- a/test/micro_ros_renesas_testbench/client_tests/Domain.c +++ b/test/micro_ros_renesas_testbench/client_tests/Domain.c @@ -23,11 +23,11 @@ std_msgs__msg__Int32 msg; void timer_callback(rcl_timer_t * timer, int64_t last_call_time) { - (void) last_call_time; - if (timer != NULL) { - rcl_publish(&publisher, &msg, NULL); - msg.data++; - } + (void) last_call_time; + if (timer != NULL) { + rcl_publish(&publisher, &msg, NULL); + msg.data++; + } } void microros_app(void) @@ -37,39 +37,39 @@ void microros_app(void) //create init_options rclc_support_t support; - rcl_init_options_t init_options = rcl_get_zero_initialized_init_options(); - rcl_init_options_init(&init_options, allocator); - rcl_init_options_set_domain_id(&init_options, DOMAIN_ID); - rclc_support_init_with_options(&support, 0, NULL, &init_options, &allocator); + rcl_init_options_t init_options = rcl_get_zero_initialized_init_options(); + rcl_init_options_init(&init_options, allocator); + rcl_init_options_set_domain_id(&init_options, DOMAIN_ID); + rclc_support_init_with_options(&support, 0, NULL, &init_options, &allocator); - // create node - rcl_node_t node; + // create node + rcl_node_t node; rclc_node_init_default(&node, "test_node", "", &support); - // create publisher - rclc_publisher_init_default( - &publisher, - &node, - ROSIDL_GET_MSG_TYPE_SUPPORT(std_msgs, msg, Int32), - "test_publisher_domain"); - - // create timer, - rcl_timer_t timer; - const unsigned int timer_timeout = 1000; - rclc_timer_init_default( - &timer, - &support, - RCL_MS_TO_NS(timer_timeout), - timer_callback); - - // create executor - rclc_executor_t executor = rclc_executor_get_zero_initialized_executor(); - rclc_executor_init(&executor, &support.context, 1, &allocator); - rclc_executor_add_timer(&executor, &timer); - - msg.data = 0; - - for(;;){ + // create publisher + rclc_publisher_init_default( + &publisher, + &node, + ROSIDL_GET_MSG_TYPE_SUPPORT(std_msgs, msg, Int32), + "test_publisher_domain"); + + // create timer, + rcl_timer_t timer; + const unsigned int timer_timeout = 1000; + rclc_timer_init_default( + &timer, + &support, + RCL_MS_TO_NS(timer_timeout), + timer_callback); + + // create executor + rclc_executor_t executor = rclc_executor_get_zero_initialized_executor(); + rclc_executor_init(&executor, &support.context, 1, &allocator); + rclc_executor_add_timer(&executor, &timer); + + msg.data = 0; + + for(;;){ rclc_executor_spin_some(&executor, RCL_MS_TO_NS(100)); sleep_ms(10); } diff --git a/test/micro_ros_renesas_testbench/client_tests/EntitiesQoS.c b/test/micro_ros_renesas_testbench/client_tests/EntitiesQoS.c index 033c04b2..8c852389 100644 --- a/test/micro_ros_renesas_testbench/client_tests/EntitiesQoS.c +++ b/test/micro_ros_renesas_testbench/client_tests/EntitiesQoS.c @@ -17,13 +17,13 @@ void microros_app(void) //create init_options rclc_support_t support; - rcl_init_options_t init_options = rcl_get_zero_initialized_init_options(); - rcl_init_options_init(&init_options, allocator); - rcl_init_options_set_domain_id(&init_options, DOMAIN_ID); - rclc_support_init_with_options(&support, 0, NULL, &init_options, &allocator); + rcl_init_options_t init_options = rcl_get_zero_initialized_init_options(); + rcl_init_options_init(&init_options, allocator); + rcl_init_options_set_domain_id(&init_options, DOMAIN_ID); + rclc_support_init_with_options(&support, 0, NULL, &init_options, &allocator); - // create node - rcl_node_t node; + // create node + rcl_node_t node; rclc_node_init_default(&node, "test_node", "", &support); // create publisher reliable diff --git a/test/micro_ros_renesas_testbench/client_tests/EntityCreation.c b/test/micro_ros_renesas_testbench/client_tests/EntityCreation.c index cf107921..ecc9786c 100644 --- a/test/micro_ros_renesas_testbench/client_tests/EntityCreation.c +++ b/test/micro_ros_renesas_testbench/client_tests/EntityCreation.c @@ -19,10 +19,10 @@ void microros_app(void) //create init_options rclc_support_t support; - rcl_init_options_t init_options = rcl_get_zero_initialized_init_options(); - rcl_init_options_init(&init_options, allocator); - rcl_init_options_set_domain_id(&init_options, DOMAIN_ID); - rclc_support_init_with_options(&support, 0, NULL, &init_options, &allocator); + rcl_init_options_t init_options = rcl_get_zero_initialized_init_options(); + rcl_init_options_init(&init_options, allocator); + rcl_init_options_set_domain_id(&init_options, DOMAIN_ID); + rclc_support_init_with_options(&support, 0, NULL, &init_options, &allocator); // create nodes rcl_node_t nodes[ENTITY_NUMBER]; @@ -33,7 +33,7 @@ void microros_app(void) snprintf(buf_namespace, 100, "ns_%d", i); // create node - rclc_node_init_default(&nodes[i], buf_name, buf_namespace, &support); + rclc_node_init_default(&nodes[i], buf_name, buf_namespace, &support); } // create publishers diff --git a/test/micro_ros_renesas_testbench/client_tests/EntityDestruction.c b/test/micro_ros_renesas_testbench/client_tests/EntityDestruction.c index 4e3aaa2c..74580318 100644 --- a/test/micro_ros_renesas_testbench/client_tests/EntityDestruction.c +++ b/test/micro_ros_renesas_testbench/client_tests/EntityDestruction.c @@ -32,10 +32,10 @@ void microros_app(void) //create init_options rclc_support_t support; - rcl_init_options_t init_options = rcl_get_zero_initialized_init_options(); - rcl_init_options_init(&init_options, allocator); - rcl_init_options_set_domain_id(&init_options, DOMAIN_ID); - rclc_support_init_with_options(&support, 0, NULL, &init_options, &allocator); + rcl_init_options_t init_options = rcl_get_zero_initialized_init_options(); + rcl_init_options_init(&init_options, allocator); + rcl_init_options_set_domain_id(&init_options, DOMAIN_ID); + rclc_support_init_with_options(&support, 0, NULL, &init_options, &allocator); // create nodes for(size_t i = 0; i < ENTITY_NUMBER; i++){ @@ -97,6 +97,6 @@ void microros_app(void) { rcl_publisher_fini(&publishers[i], &nodes[i]); rcl_subscription_fini(&subscribers[i], &nodes[i]); - rcl_node_fini(&nodes[i]); + rcl_node_fini(&nodes[i]); } } \ No newline at end of file diff --git a/test/micro_ros_renesas_testbench/client_tests/MultiplePublisherProfiling.c b/test/micro_ros_renesas_testbench/client_tests/MultiplePublisherProfiling.c index 5c7dbe2e..89875a59 100644 --- a/test/micro_ros_renesas_testbench/client_tests/MultiplePublisherProfiling.c +++ b/test/micro_ros_renesas_testbench/client_tests/MultiplePublisherProfiling.c @@ -28,13 +28,13 @@ void microros_app(void) //create init_options rclc_support_t support; - rcl_init_options_t init_options = rcl_get_zero_initialized_init_options(); - rcl_init_options_init(&init_options, allocator); - rcl_init_options_set_domain_id(&init_options, DOMAIN_ID); - rclc_support_init_with_options(&support, 0, NULL, &init_options, &allocator); + rcl_init_options_t init_options = rcl_get_zero_initialized_init_options(); + rcl_init_options_init(&init_options, allocator); + rcl_init_options_set_domain_id(&init_options, DOMAIN_ID); + rclc_support_init_with_options(&support, 0, NULL, &init_options, &allocator); - // create node - rcl_node_t node; + // create node + rcl_node_t node; rclc_node_init_default(&node, "test_node", "", &support); // create publishers diff --git a/test/micro_ros_renesas_testbench/client_tests/Parameters.c b/test/micro_ros_renesas_testbench/client_tests/Parameters.c index 01568f64..bc18057c 100644 --- a/test/micro_ros_renesas_testbench/client_tests/Parameters.c +++ b/test/micro_ros_renesas_testbench/client_tests/Parameters.c @@ -17,16 +17,16 @@ void microros_app(void) //create init_options rclc_support_t support; - rcl_init_options_t init_options = rcl_get_zero_initialized_init_options(); - rcl_init_options_init(&init_options, allocator); - rcl_init_options_set_domain_id(&init_options, DOMAIN_ID); - rclc_support_init_with_options(&support, 0, NULL, &init_options, &allocator); + rcl_init_options_t init_options = rcl_get_zero_initialized_init_options(); + rcl_init_options_init(&init_options, allocator); + rcl_init_options_set_domain_id(&init_options, DOMAIN_ID); + rclc_support_init_with_options(&support, 0, NULL, &init_options, &allocator); - // create node - rcl_node_t node; + // create node + rcl_node_t node; rclc_node_init_default(&node, "test_node", "", &support); - // Create parameter service + // Create parameter service rclc_parameter_server_t param_server; rclc_parameter_server_init_default(¶m_server, &node); diff --git a/test/micro_ros_renesas_testbench/client_tests/Ping.c b/test/micro_ros_renesas_testbench/client_tests/Ping.c index 2a767ffc..ad5fa4a8 100644 --- a/test/micro_ros_renesas_testbench/client_tests/Ping.c +++ b/test/micro_ros_renesas_testbench/client_tests/Ping.c @@ -20,13 +20,13 @@ void microros_app(void) // Create init_options rclc_support_t support; - rcl_init_options_t init_options = rcl_get_zero_initialized_init_options(); - rcl_init_options_init(&init_options, allocator); - rcl_init_options_set_domain_id(&init_options, DOMAIN_ID); - rclc_support_init_with_options(&support, 0, NULL, &init_options, &allocator); + rcl_init_options_t init_options = rcl_get_zero_initialized_init_options(); + rcl_init_options_init(&init_options, allocator); + rcl_init_options_set_domain_id(&init_options, DOMAIN_ID); + rclc_support_init_with_options(&support, 0, NULL, &init_options, &allocator); - // Create node - rcl_node_t node; + // Create node + rcl_node_t node; rclc_node_init_default(&node, "test_node_ping", "", &support); // create publisher diff --git a/test/micro_ros_renesas_testbench/client_tests/Publisher.c b/test/micro_ros_renesas_testbench/client_tests/Publisher.c index 8e83c38d..5b52e2cd 100644 --- a/test/micro_ros_renesas_testbench/client_tests/Publisher.c +++ b/test/micro_ros_renesas_testbench/client_tests/Publisher.c @@ -17,13 +17,13 @@ void microros_app(void) // Create init_options rclc_support_t support; - rcl_init_options_t init_options = rcl_get_zero_initialized_init_options(); - rcl_init_options_init(&init_options, allocator); - rcl_init_options_set_domain_id(&init_options, DOMAIN_ID); - rclc_support_init_with_options(&support, 0, NULL, &init_options, &allocator); + rcl_init_options_t init_options = rcl_get_zero_initialized_init_options(); + rcl_init_options_init(&init_options, allocator); + rcl_init_options_set_domain_id(&init_options, DOMAIN_ID); + rclc_support_init_with_options(&support, 0, NULL, &init_options, &allocator); - // Create node - rcl_node_t node; + // Create node + rcl_node_t node; rclc_node_init_default(&node, "test_node", "", &support); // create publisher diff --git a/test/micro_ros_renesas_testbench/client_tests/PublisherContinousFragment.c b/test/micro_ros_renesas_testbench/client_tests/PublisherContinousFragment.c index 5c1d29ca..e8da80c3 100644 --- a/test/micro_ros_renesas_testbench/client_tests/PublisherContinousFragment.c +++ b/test/micro_ros_renesas_testbench/client_tests/PublisherContinousFragment.c @@ -23,13 +23,13 @@ void microros_app(void) // Create init_options rclc_support_t support; - rcl_init_options_t init_options = rcl_get_zero_initialized_init_options(); - rcl_init_options_init(&init_options, allocator); - rcl_init_options_set_domain_id(&init_options, DOMAIN_ID); - rclc_support_init_with_options(&support, 0, NULL, &init_options, &allocator); + rcl_init_options_t init_options = rcl_get_zero_initialized_init_options(); + rcl_init_options_init(&init_options, allocator); + rcl_init_options_set_domain_id(&init_options, DOMAIN_ID); + rclc_support_init_with_options(&support, 0, NULL, &init_options, &allocator); - // Create node - rcl_node_t node; + // Create node + rcl_node_t node; rclc_node_init_default(&node, "char_long_sequence_publisher_rcl", "", &support); // create publisher diff --git a/test/micro_ros_renesas_testbench/client_tests/PublisherRate.c b/test/micro_ros_renesas_testbench/client_tests/PublisherRate.c index adb28080..aa0755eb 100644 --- a/test/micro_ros_renesas_testbench/client_tests/PublisherRate.c +++ b/test/micro_ros_renesas_testbench/client_tests/PublisherRate.c @@ -36,13 +36,13 @@ void microros_app(void) // Create init_options rclc_support_t support; - rcl_init_options_t init_options = rcl_get_zero_initialized_init_options(); - rcl_init_options_init(&init_options, allocator); - rcl_init_options_set_domain_id(&init_options, DOMAIN_ID); - rclc_support_init_with_options(&support, 0, NULL, &init_options, &allocator); + rcl_init_options_t init_options = rcl_get_zero_initialized_init_options(); + rcl_init_options_init(&init_options, allocator); + rcl_init_options_set_domain_id(&init_options, DOMAIN_ID); + rclc_support_init_with_options(&support, 0, NULL, &init_options, &allocator); - // Create node - rcl_node_t node; + // Create node + rcl_node_t node; rclc_node_init_default(&node, "test_node", "", &support); // create publisher diff --git a/test/micro_ros_renesas_testbench/client_tests/RTT.c b/test/micro_ros_renesas_testbench/client_tests/RTT.c index 43548df7..ff2f811d 100644 --- a/test/micro_ros_renesas_testbench/client_tests/RTT.c +++ b/test/micro_ros_renesas_testbench/client_tests/RTT.c @@ -37,13 +37,13 @@ void microros_app(void) // Create init_options rclc_support_t support; - rcl_init_options_t init_options = rcl_get_zero_initialized_init_options(); - rcl_init_options_init(&init_options, allocator); - rcl_init_options_set_domain_id(&init_options, DOMAIN_ID); - rclc_support_init_with_options(&support, 0, NULL, &init_options, &allocator); + rcl_init_options_t init_options = rcl_get_zero_initialized_init_options(); + rcl_init_options_init(&init_options, allocator); + rcl_init_options_set_domain_id(&init_options, DOMAIN_ID); + rclc_support_init_with_options(&support, 0, NULL, &init_options, &allocator); - // Create node - rcl_node_t node; + // Create node + rcl_node_t node; rclc_node_init_default(&node, "test_node", "", &support); // Create publisher diff --git a/test/micro_ros_renesas_testbench/client_tests/ServiceClient.c b/test/micro_ros_renesas_testbench/client_tests/ServiceClient.c index 4ef6cd87..22e9cae8 100644 --- a/test/micro_ros_renesas_testbench/client_tests/ServiceClient.c +++ b/test/micro_ros_renesas_testbench/client_tests/ServiceClient.c @@ -29,13 +29,13 @@ void microros_app(void) // Create init_options rclc_support_t support; - rcl_init_options_t init_options = rcl_get_zero_initialized_init_options(); - rcl_init_options_init(&init_options, allocator); - rcl_init_options_set_domain_id(&init_options, DOMAIN_ID); - rclc_support_init_with_options(&support, 0, NULL, &init_options, &allocator); + rcl_init_options_t init_options = rcl_get_zero_initialized_init_options(); + rcl_init_options_init(&init_options, allocator); + rcl_init_options_set_domain_id(&init_options, DOMAIN_ID); + rclc_support_init_with_options(&support, 0, NULL, &init_options, &allocator); - // Create node - rcl_node_t node; + // Create node + rcl_node_t node; rclc_node_init_default(&node, "test_node", "", &support); // create publisher diff --git a/test/micro_ros_renesas_testbench/client_tests/SinglePublisherProfiling.c b/test/micro_ros_renesas_testbench/client_tests/SinglePublisherProfiling.c index 84ed5cac..3415f39a 100644 --- a/test/micro_ros_renesas_testbench/client_tests/SinglePublisherProfiling.c +++ b/test/micro_ros_renesas_testbench/client_tests/SinglePublisherProfiling.c @@ -26,13 +26,13 @@ void microros_app(void) // Create init_options rclc_support_t support; - rcl_init_options_t init_options = rcl_get_zero_initialized_init_options(); - rcl_init_options_init(&init_options, allocator); - rcl_init_options_set_domain_id(&init_options, DOMAIN_ID); - rclc_support_init_with_options(&support, 0, NULL, &init_options, &allocator); + rcl_init_options_t init_options = rcl_get_zero_initialized_init_options(); + rcl_init_options_init(&init_options, allocator); + rcl_init_options_set_domain_id(&init_options, DOMAIN_ID); + rclc_support_init_with_options(&support, 0, NULL, &init_options, &allocator); - // Create node - rcl_node_t node; + // Create node + rcl_node_t node; rclc_node_init_default(&node, "test_node", "", &support); // create publisher diff --git a/test/micro_ros_renesas_testbench/client_tests/Subscriber.c b/test/micro_ros_renesas_testbench/client_tests/Subscriber.c index 788089aa..864bdbb5 100644 --- a/test/micro_ros_renesas_testbench/client_tests/Subscriber.c +++ b/test/micro_ros_renesas_testbench/client_tests/Subscriber.c @@ -29,13 +29,13 @@ void microros_app(void) // create init_options rclc_support_t support; - rcl_init_options_t init_options = rcl_get_zero_initialized_init_options(); - rcl_init_options_init(&init_options, allocator); - rcl_init_options_set_domain_id(&init_options, DOMAIN_ID); - rclc_support_init_with_options(&support, 0, NULL, &init_options, &allocator); + rcl_init_options_t init_options = rcl_get_zero_initialized_init_options(); + rcl_init_options_init(&init_options, allocator); + rcl_init_options_set_domain_id(&init_options, DOMAIN_ID); + rclc_support_init_with_options(&support, 0, NULL, &init_options, &allocator); - // create node - rcl_node_t node; + // create node + rcl_node_t node; rclc_node_init_default(&node, "test_node", "", &support); // create publisher diff --git a/test/micro_ros_renesas_testbench/client_tests/Throughput.c b/test/micro_ros_renesas_testbench/client_tests/Throughput.c index 186fe663..1871508b 100644 --- a/test/micro_ros_renesas_testbench/client_tests/Throughput.c +++ b/test/micro_ros_renesas_testbench/client_tests/Throughput.c @@ -23,13 +23,13 @@ void microros_app(void) // Create init_options rclc_support_t support; - rcl_init_options_t init_options = rcl_get_zero_initialized_init_options(); - rcl_init_options_init(&init_options, allocator); - rcl_init_options_set_domain_id(&init_options, DOMAIN_ID); - rclc_support_init_with_options(&support, 0, NULL, &init_options, &allocator); + rcl_init_options_t init_options = rcl_get_zero_initialized_init_options(); + rcl_init_options_init(&init_options, allocator); + rcl_init_options_set_domain_id(&init_options, DOMAIN_ID); + rclc_support_init_with_options(&support, 0, NULL, &init_options, &allocator); - // Create node - rcl_node_t node; + // Create node + rcl_node_t node; rclc_node_init_default(&node, "test_node", "", &support); // create publisher diff --git a/test/micro_ros_renesas_testbench/client_tests/TimeSync.c b/test/micro_ros_renesas_testbench/client_tests/TimeSync.c index c4ae4e60..672eddee 100644 --- a/test/micro_ros_renesas_testbench/client_tests/TimeSync.c +++ b/test/micro_ros_renesas_testbench/client_tests/TimeSync.c @@ -18,13 +18,13 @@ void microros_app(void) //create init_options rclc_support_t support; - rcl_init_options_t init_options = rcl_get_zero_initialized_init_options(); - rcl_init_options_init(&init_options, allocator); - rcl_init_options_set_domain_id(&init_options, DOMAIN_ID); - rclc_support_init_with_options(&support, 0, NULL, &init_options, &allocator); + rcl_init_options_t init_options = rcl_get_zero_initialized_init_options(); + rcl_init_options_init(&init_options, allocator); + rcl_init_options_set_domain_id(&init_options, DOMAIN_ID); + rclc_support_init_with_options(&support, 0, NULL, &init_options, &allocator); - // create node - rcl_node_t node; + // create node + rcl_node_t node; rclc_node_init_default(&node, "test_node", "", &support); // create publisher