@@ -127,13 +127,24 @@ rmw_create_client(
127
127
}
128
128
client_req = uxr_buffer_create_requester_xml (
129
129
& custom_node -> context -> session ,
130
- custom_node -> context -> reliable_output , custom_client -> client_id ,
131
- custom_node -> participant_id , rmw_uxrce_xml_buffer , UXR_REPLACE );
130
+ * custom_node -> context -> entity_creation_output ,
131
+ custom_client -> client_id ,
132
+ custom_node -> participant_id ,
133
+ rmw_uxrce_xml_buffer ,
134
+ UXR_REPLACE );
132
135
#elif defined(MICRO_XRCEDDS_USE_REFS )
133
- // TODO(pablogs9): Is possible to instantiate a replier by ref?
134
- // client_req = uxr_buffer_create_replier_ref(&custom_node->context->session,
135
- // custom_node->context->reliable_output, custom_service->subscriber_id,
136
- // custom_node->participant_id, "", UXR_REPLACE);
136
+ if (!build_requester_profile (service_name , rmw_uxrce_profile_name , sizeof (rmw_uxrce_profile_name ))) {
137
+ RMW_SET_ERROR_MSG ("failed to generate ref request for client creation" );
138
+ goto fail ;
139
+ }
140
+
141
+ client_req = uxr_buffer_create_requester_ref (
142
+ & custom_node -> context -> session ,
143
+ * custom_node -> context -> entity_creation_output ,
144
+ custom_client -> client_id ,
145
+ custom_node -> participant_id ,
146
+ rmw_uxrce_profile_name ,
147
+ UXR_REPLACE );
137
148
#endif
138
149
139
150
rmw_client -> data = custom_client ;
@@ -144,7 +155,7 @@ rmw_create_client(
144
155
& custom_node -> context -> session , 1000 , requests ,
145
156
status , 1 ))
146
157
{
147
- RMW_SET_ERROR_MSG ("Issues creating Micro XRCE-DDS entities" );
158
+ RMW_SET_ERROR_MSG ("Issues creating Requester Micro XRCE-DDS entities" );
148
159
put_memory (& client_memory , & custom_client -> mem );
149
160
goto fail ;
150
161
}
@@ -162,8 +173,10 @@ rmw_create_client(
162
173
163
174
custom_client -> request_id = uxr_buffer_request_data (
164
175
& custom_node -> context -> session ,
165
- custom_node -> context -> reliable_output , custom_client -> client_id ,
166
- custom_client -> stream_id , & delivery_control );
176
+ * custom_node -> context -> entity_creation_output ,
177
+ custom_client -> client_id ,
178
+ custom_client -> stream_id ,
179
+ & delivery_control );
167
180
}
168
181
return rmw_client ;
169
182
@@ -203,7 +216,8 @@ rmw_destroy_client(
203
216
rmw_uxrce_client_t * custom_client = (rmw_uxrce_client_t * )client -> data ;
204
217
uint16_t delete_client =
205
218
uxr_buffer_delete_entity (
206
- & custom_node -> context -> session , custom_node -> context -> reliable_output ,
219
+ & custom_node -> context -> session ,
220
+ * custom_node -> context -> entity_creation_output ,
207
221
custom_client -> client_id );
208
222
209
223
uint16_t requests [] = {delete_client };
@@ -212,7 +226,7 @@ rmw_destroy_client(
212
226
& custom_node -> context -> session , 1000 , requests , status ,
213
227
sizeof (status )))
214
228
{
215
- RMW_SET_ERROR_MSG ("unable to remove client from the server" );
229
+ RMW_SET_ERROR_MSG ("Unable to remove client from the server" );
216
230
result_ret = RMW_RET_ERROR ;
217
231
} else {
218
232
rmw_uxrce_fini_client_memory (client );
0 commit comments